Distributed Systems Chapter 4 Communication

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

multicast RPC

-2 or more processes at same time, don't want to be asynchronous -don't want to call first sever and wait to call second server -error mechanism in place -automatically call procedure on 2 servers - as soon as you deal with replication/redundancy you don't want to do one after another, you want to multitask -when you get response, you can compare result or go with the 1st one

OSI model

-Application, Presentation, Session, Transport, Network, Data Link, Physical -process A builds message and passes it to application (library procedure, OS, network processor) -application layer adds header to message and passes it to the presentation layer and so on

parameter specification and stub generation

-Interface definition language (IDL) -to simplify client-server applications based on RPC -procedure interface specified in IDL and then compiled into client and server stub

Transport Protocols: Transmission Control Protocol

-TCP: reliable communication, connect oriented -if packet is lost it automatically sends it out

layered protocol

-To enable a seamless flow of data across the networks that comprise an internet -process A can communicate with process B by building a message in its address space and making a system call to send to B

Transport Protocols: Universal datagram Protocol

-UDP -unreliable but more efficient communication -connectionless -allows to transmit packets/single message -no continuity -what you can fit in 1 datagram

message brokers

-act as application-level gateway integrating existing and new applications into single coherent distributed system -convert incoming messages to formats that can be understood by destination application -brokers can take on more than routing and communication

message oriented persistent communication: message queuing models

-applications communicate by inserting messages in queues -sender and receiver not necessarily active at same time -in principle each application has own private queue -messages transferred from one server to another until destination -guarantee of delivery at destination at unknown time -say what info they're interested in -implement low balancing add every message to message queue

message oriented transient communication

-berkley sockets: socket: communication end-point used by applications to read/write -OS reserves resources for accommodating communication

RPC

-call by value -call by reference (pointers) -call by copy/restore(variable copied to the stack by caller then copied back after call, overwriting callers original value)

basic RPC operation

-conventional procedure call -place where code is, procedure goes to stack code where element has run stack, then pop and send back to where call is from

passing reference parameters

-copy the data structure to server and back -when you are trying to get between different programs in a different language

Open Systems Interconnection Reference Model (OSI) (layered protocols)

-defined by ISO -never widely used and implemented, but useful to understand computer networks -allow open systems to communicate by means of protocols

message queuing models simple interface

-if Q is empty, add to queue -put: append message to Q -get: block until Q is non empty and remove 1st message -poll: check specified queue for messages and remove first, never block -notify: install handler to be called when message is put into specified queue

RPC operation: client and server stubs

-if client code not prepared, it will fail -RPC makes remote procedure calls look as much like local ones -when a read is performed, a client stub is called -client stub packs parameter into a message and sends to server -calling and called procedures are not aware of distribution

asynchronous RPC

-if procedure call returns no value, client can continue

communications basics

-interprocess communication is fundamental -building a system based on low-level message passing (i.e. as offered by the hardware) is difficult -higher level abstractions and protocols can help -models of communication: RPC, MOM, multicast

transient communication

-message is only delivered if both sender and reciever are executing -transport level communication services typically offer transient communications (store and forward routers) -trying to share something if it works it is wonky, if not it is lsot

Persistent communication

-message is stored by the communication middleware until it can be delivered to the receiver

Message passing interface MPI

-more appropriate abstraction for parallel applications than sockets -designed for high-speed interconnection networks -does not consider process crash and network partitions -slowly build message and try to send

middleware protocols

-mostly in application layer -application with general purpose protocols with their own layers ex1: authentication middleware (proof of a claimed identity) ex2: middleware for commit protocols ex3: distributed locking protocol -any layer you can choose to send request back -faster you can curve request the better

mesh based overlay

-multiple paths between nodes -more robust -multiple path, more redundant, need redundancy for robustness but more expensive

connectionless protocol

-no advance setup -dropping a letter in mailbox

application level multicasting (SLIDE 38)

-overlay construction -extreme realistic example: get mapped poorly to physical network

RPC parameter passing

-passing value parameters(marshalling) -add procedure locally -who sends message has to be set up -when you create client stub you say what machine to connect to

Architecture of message-queueing system

-queue managers: interact with applications but also relays -relays forward massages to other queue managers -overlay network: composed of sender, destination, and relays -Q is FIFO -forward messages from producers to consumers, multiple routers

tree based overlay

-single path between every pair of nodes +simplicity and determinism (single path) every recover gets once. good as long as there are no failures once a single process fails, all other nodes in subtree will fail

Architecture of message-queueing system

-source queue at the sender or nearby (LAN) -messages contain destination queue -database of queue names to network locations -leads to queues on reciever --> if receiver fails message is lost -want to make sure message is never lost

application level multicasting

-support for sending data to multiple receivers -nodes organize into an overlay network application -2 apporaches: tree and mesh

RPC steps

1. client procedure calls client stub normally 2. client stub builds a message and called local OS 3. clients OS sends message to remote OS 4. remote OS gives message to server stub 5. server stub unpacks the parameters and calls server 6. server does the works and returns the result to the stub 7. server stub packs it in a message and calls its local OS 8. clients OS gives the message to client stub 9. stub unpacks the results and returns to client

binding client to a server

1. locate servers machine 2. locate the server(i.e. the correct process) on that machine)

Remote procedure call (RPC)

A protocol that enables a process on one computer to call a process on another computer. -simple -natural

presentation layer

DATA REPRESENTATION AND ENCRYPTION The sixth layer of the OSI model. Protocols in the Presentation layer translate between the application and the network. Here, data are formatted in a schema that the network can understand, with the format varying according to the type of network used. The Presentation layer also manages data encryption and decryption, such as the scrambling of system passwords. -simplifies communication

Transport Protocols

END TO END CONNECTIONS AND RELIABILITY (SEGMENTS) Make sure data gets to its destination by establishing standards for dividing data into chunks, assigning addresses, and correcting errors -provides minimal network protocol stack

session layer

INTERHOST COMMUNICATION The fifth layer in the OSI model. This layer establishes and maintains communication between two nodes on the network. It can be considered the "traffic cop" for network communications., rarely supported

physical layer

MEDIA, SIGNAL, BINARY TRANSMISSION(BITS) The lowest, or first, layer of the OSI model. Protocols in this layer generate and detect signals so as to transmit and receive data over a network medium. These protocols also set the data transmission rate and monitor data error rates, but do not provide error correction.

application layer

NETWORK PROCESS AND APPLICATION The seventh layer of the OSI model. Application layer protocols enable software programs to negotiate formatting, procedural, security, synchronization, and other requirements with the network. -everything else

network layer

PATH DETERMINATION AND LOGICAL ADDRESSING (PACKETS) The third layer in the OSI model. Protocols in this layer translate network addresses into their physical counterparts and decide how to route data from the sender to the receiver. -multiple routes typically exist

data link layer

PHYSICAL ADDRESSING (MAC AND LLC)(FRAMES) The second layer in the OSI model. This layer bridges the networking media with the Network layer. Its primary function is to divide the data it receives from the Network layer into frames(ensures correct) that can then be transmitted by the Physical layer. -bit pattern to beg and end of frame to mark, computes and adds checksum to frame -receiver uses checksum to check correctness

connect

actively attempt to establish a connection

listen

announce willingness to accept connections

Bind

attach local address to socket

accept

block caller until connection request arrives

asynchronous communication

communication such as email in which the message and the response do not occur at the same time

synchronous communication

communications that occur at the same time such as IM or chat -sender is blocked until request is recieved (3 options) 1. sender blocked until middleware takes over communication 2. sender blocked until message delivered to recipient 3. sender blocked until message processed by recipient

socket

create a new communication end point

message queuing models

four combos for loosely coupled communications with queues. server and receiver running at same time 1. sender running + receiver running 2. sender running + receiver passive 3. sender passive + receiver running 4. sender running + receiver passive

Interface Definition Language (IDL)

language used to define the interface between a client and server process in a distributed system

Berkley sockets vs MPI

messgae-queing systems are targeted to support message transfers that could take minutes instead of milliseconds

3 lowest levels of OSI

network, data link, physical layer

receive

receive data over connection

close

release the connection

send

send data over connection

connection oriented protocols

sender and receiver explicitly establish a connection and possibly negotiate a protocol to use and explicitly terminate connection(phone)

Message oriented middleware (MOM)

software that resides on both the client and server and typically supports asynchronous calls btwn the client and server application

Higher level protocols

use lower levels without needing to understand precisely how they work -usually grouped together


Set pelajaran terkait

Week 1 Assessment - Product and Platforms

View Set

Chapter 15 - Management of Oncologic Disorders

View Set

Technology For Teaching Chapter 9

View Set

Human Physio Ch. 11 Auto and Somatic Motor Control

View Set

Chapter 10- Customer Relationship Management

View Set