Distributed System IV: Indirect communication __ Distributed systems

Source: Internet
Author: User
Tags message queue
This blog is mainly about indirect communication technology, including group communication, publish-subscribe system, Message queue, distributed shared memory, etc.

Indirect communication

Indirect communication is defined as an entity communicating through intermediaries in a distributed system without direct coupling between sender and receiver.

Indirect communication Technology

1. Group communication: In group communications, communication is performed through an abstract group, and the sender does not know the identity of the recipient.

2. Publish-Subscribe system: Represents a class of methods that are commonly characterized by distributing events to multiple receivers through intermediaries.

3. Message Queuing system: Where messages are sent to queues, recipients extract messages from these queues

4. A shared memory based approach, which includes distributed shared memory and tuple space, provides programmers with an abstract global shared memory abstraction.

Advantages

Space decoupling: The sender does not know or need to know the identity of the recipient, and vice versa. Such a spatial decoupling is a system developer with a great deal of freedom to handle changes such as substitution, updating, copying, and migration.

Time decoupling: The sender and receiver can have an independent life cycle. In other words, the sender and receiver do not need to exist at the same time to communicate. It is easy to deal with the changeable environment.

Time coupling

Time decoupling

Space coupling

Nature: communicates directly with one or some given receivers; The receiver must exist at that moment.

Example: Message passing (socket), Remote call (RPC)

Nature: communicates directly with one or some given receivers; the sender and receiver can have their own lifecycle

Space decoupling

Nature: The sender does not need to know the identity of the recipient; The receiver must exist at that moment.

Example: IP multicast

Nature: The sender does not need to know the identity of the receiver, the sender and receiver can have their own life cycle

Example: Group communication, publish-subscribe system, Message Queuing, distributed shared memory, tuple space

Disadvantage

Due to the increased overhead of the overhead layer.

Group Communication

Defined:

Group communication is the abstraction of multicast communication, which can be implemented by IP multicast or equivalent coverage network, which adds some important features, such as members of management group, detection failure, providing reliability and sorting guarantee.

Application Scenario:

1. For reliable information distribution, including the financial sector, which may be a large number of customers, these institutions need access to a large number of information sources for accurate and up-to-date data.

2. Support for collaborative applications in which events are distributed to multiple users, preserving a common user view, such as multiplayer games.

3. Support a range of fault-tolerant policies, including consistent updating of replicated data or high availability (replication) server implementations

4. Support system monitoring and management, including load balancing strategy.

Programming Model:

A process event that only initiates a multicast operation can send information to each of a group of processes instead of sending the operation to each process multiple times, thereby effectively exploiting bandwidth.

Reliability and sequencing in multicast: that is, integrity (the message received and sent is the same, no message is passed two times), validity (any outgoing message will eventually be passed), the contract (if the message is passed to a process, the message is passed to all processes in this group). Order (FIFO, causal sequence, full order).

Group member Management:


Publish-Subscribe system

Defined:

In the publish-subscribe system, the Publisher publishes structured event to event services, where subscribers are interested in specific events through subscription expressions, where subscriptions can be arbitrary patterns over structured events. The task of the publish-subscribe system is to match the time between the subscription and the publication to ensure the correct delivery of the event notification. A given time will be passed on to many potential subscribers, so the publish-subscribe system is essentially a one-to-many communication paradigm.

Application Scenario:

1. Financial Information Systems

2. Other areas of direct input to real time data (including RSS feeds)

3. Support for collaborative work where there is a need to inform many participants of events of common interest

4. Support is ubiquitous in computing, including managing time from ubiquitous infrastructure (e.g., location events)

5. A range of monitoring applications, including network monitoring on the Internet

Programming Model:

1. Heterogeneity: When event notifications are used as a means of communication, components that are not designed to interoperate in distributed systems can work together.

2. Asynchrony: Notifications are sent asynchronously by the publisher that generates the event to all subscribers interested in it, preventing the Publisher from having to sync with the Subscriber.

3. Ensure that all events are effectively delivered to all Subscribers that have filters and events matching them. On top of that, you can have additional requirements for security, scalability, fault handling, concurrency, and quality of service.


Message Queuing

Defined:

As an indirect mechanism to provide point-to-point services. Message Queuing is also a message-oriented middleware because the sender puts the message into the queue and then removes the message from a process.

Application Scenario:

Implementation of enterprise application integration, that is, in the enterprise implementation of the integration between applications, the goal is through the internal loose coupling message queue implementation. Because of their intrinsic support for transactions, they are also widely used as the basis for business transaction processing systems.

Programming Model:

Four kinds of characteristics

1. The queuing strategy is generally advanced first out,

2. Support Priority queues

3. Messages can be configured in size, type

4. Message is persistent and reliable delivery is achieved

Three ways of receiving:

1. Blocking receive: Keep blocking until the appropriate message is available

2. Non-blocking Receive: (Rotation operation) Check the status of the queue, return the available messages, or an unavailable indication

3. Notification action: When a message in the relevant queue is available, an event notification is issued


Distributed shared Memory

Defined:

Distributed shared Memory (DSM) is an abstraction used to share data with computers that do not share physical memory. The process accesses the DSM by reading and updating what appears to be normal memory in other address spaces. However, the underlying runtime system transparently guarantees that processes running on different computers can observe updates to other processes. It is as if the process is accessing a single shared memory, but in fact the physical memory is distributed.

Programming Model:

1. Saves programmers ' consideration of messaging when writing applications

2. Shared memory can also be persistent



Because Bo Master knowledge is limited, if wrong, please correct comments, welcome to Exchange

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.