Chapter 2 Communication
|Rules for communication:
Using the OSI model plus these protocols:
Middleware: Webservices + SOAP(protocol for using XML to package messages, supported by most languages) + HTTP/SMTP/TCP/UDP
Models of communication (message passing communication):
Remote invocation: A complete interaction between a client anda server. From the point when the client sends its requestto when it receives the server`s response.
Stub: Piece of code that transforms requests coming in over the network, into local procedure calls (stredfortreder program).
Migration: Used when code is not in use
Relocation: Used when code is in use (strongest).
Shared memory communication uses Monitor for locking when coordinating between the threads. MULTICOMPUTERS SEE CHAPTER 1.
Continuous and discrete data (multimedia distributed systems):
Concurrent interaction and communication
In some concurrent computing systems communication between the concurrent components is hidden from the programmer (e.g., by using futures), while in others it must be handled explicitly. Explicit communication can be divided into two classes:
Shared memory communication
Concurrent components communicate by altering the contents of shared memory locations (exemplified by Java and C#). This style of concurrent programming usually requires the application of some form of locking (e.g., mutexes, semaphores, or monitors) to coordinate between threads.
Message passing communication
Concurrent components communicate by exchanging messages (exemplified by Erlang and occam). The exchange of messages may be carried out asynchronously (sometimes referred to as "send and pray", although it is standard practice to resend messages that are not acknowledged as received), or may use a rendezvous style in which the sender blocks until the message is received. Message-passing concurrency tends to be far easier to reason about than shared-memory concurrency, and is typically considered a more robust form of concurrent programming. A wide variety of mathematical theories for understanding and analyzing message-passing systems are available, including the Actor model, and various process calculi.
Proxy: Provide a surrogate or placeholder for another object to control access to it.
Persistent communication: message is stored by the communication system as long as it takes to deliver it to the receiver. Message is never lost.
Transient communication: message is tored by the communication system only as long as both sender and receiver are executing. Message may be discarded.