introduction)
This content in fact and the content of the previous study is exactly the opposite, before the various communication methods are actually said to be direct communication, and this time I learn the content is indirect communication, the essential difference between the two is the indirect communication between the time and space separation, direct communication in these 2 points are coupled, a little thing operation directly simple, But the shortcomings are also very obvious, poor scalability, can not be very good to face change. According to the space and time 2 points, there can be 4 different types of communication, time separation is such a form: The nature of the message in the process of transmission has a certain time to live, do not require that must be real-time to accept. The separation of space is a form in which the message is sent without needing to know who the recipient is, i.e. without knowing the recipient's identity. The message queue, which is going to be mentioned below, is exactly the 2-point requirement. Here are a few of the main ways to communicate indirectly.
Group communication)
1. The meaning of group communication, as its literal meaning, is communicated to each member within the group. Group communication can be used on some scenarios 1,. For replica updates, in terms of fault tolerance. 2. For system monitoring and management.
2. Group communication is very similar to the multicast transfer previously mentioned.
3. Group communication is divided into closed group (closed group), open Group (Development group), the former is only used for intra-group information transfer, and open Group can communicate with the outside process of information dissemination.
4. There are 2 main groups of communication, one is reliability, and the other is Order. In group communication, there are 3 ways to order Problems: (1). FIFO first, if which process sends the message before the other process, it will remain in this order throughout the subsequent process. 2.causal ordering, causal order, in the entire distributed system, according to the sequence of messages. 3.Total ordering, compared in a single process.
5. The management of the inter-group relationship has several elements: 1. Interface operations that change the relationship between groups. 2. Monitoring of failures in group communication. 3. Notification of changes in inter-group relationships. 4. Communication is identified by the group to the specific address of the extended service.
6. Group communication is still more suitable for small-scale systems, and operating performance in large-scale systems is still not very good.
7.JGroup is a good example of an off-the-shelf Learning group communication, based on the channel performance of the communication mode.
Publish---subscription system)
Publishing a subscription system is a very extensive way of using indirect communication. He is a kind of event-based implementation of decoupling separation of time and space.
1. The application types of the implementation of the publishing subscription system are: 1. Financial information System. 2. Applications that require real-time data, such as RSS. 2. Participants are informed of events of interest and hobbies. 3. Monitor application types, such as monitoring of network conditions.
2. The financial system is a good example of the publish-subscribe model, information providers do not regularly provide information to the Publisher, the Publisher immediately display the information in real time, the different followers will only see their interest in the price changes and so on.
3. In the release subscription model, his subscription model has a lot of classification, usually we say that the point of interest is too general, mainly: 1. Channel-based channels. 2. Based on the topic topic, is actually the point of interest. 3. Content-based, this is more advanced, the system needs to be intelligent judgment, according to the keyword to determine whether the need to subscribe to such events. 4. Type-based subscription model. Similar to 2.
4. What is the implementation of the release subscription system? In the middle there will be a broker in the node, so the node in fact in charge of the filtering function of the event, the system is relatively small when there may be no problem, but the system will have a single point bottleneck problem, so evolved into a network of nodes in the way, in fact, is a form of a cluster.
5. In the event to accept the way, there are many routing algorithms, the simplest direct is the flood flooding way, to each recipient sent past, who really need to accept, but often not good, causing a lot of unnecessary network overhead. There are some, such as filter filtering method will be the first kind of good.
Message Queuing)
Message Queuing implements a peer-to-peer service through this vector of queues. There are still a lot of such messages, such as the Apache ACTIVEMQ,IBM WebSphere MQ, the JMS Java Messaging Service, and so on.
1. The program model for Message Queuing can have 3 types, 1 blocking receive mode. 2. Non-blocking receive mode. 3. The mode of active notification. Each message will have a unique indication of the target.
2,. One or more queue managers are responsible for managing multiple message queues in the implementation of the message. In WebSphere, the cluster of manager is also implemented in the message queue.
3.java Message Service As an example of your learning includes indirect communication in 2 ways of publishing subscription mode and Message Queuing, but he has 2 more concepts here, one for connection and one for session sessions. So the steps to be implemented are to create the connection first, to create the session from the connection, and finally to publish or accept the message based on the session.
methods of sharing memory)
To rectify this, the shared memory mentioned here is by no means the physical memory on the shared computer, but rather a content space. This is to be based on DSM, distributed shared memory, and tuple space coummunication, which communicates with tuples.
1.DSM, full name distributed System memory, distributed shared memory, in fact, should be translated into distributed shared data. In the remote distributed shared memory one by one of the data mapped to the physical memory on each PC.
2. On the DSM you can read the data on the other machine.
3. There are many different places in the normal messaging service compared to DSM, which uses additional lock services in concurrent data operations, while DSM uses a more pristine lock and information mechanism, more directly because he is directly supported by the underlying.
4. While the tuple space is better for me to understand what is the data sharing space. All the data are stored in a shared space, you can have read, write, and take to remove the operation, he is no modify modification operation, the value can be removed by first, add a new implementation of the alternative "modified" effect, it should be said that this is a replacement replace the role.
5. Tuple space is a good illustration of what is called a complete separation of time and space: 1. Any tuple can be passed to a potential recipient or recipients, which is a representation of spatial separation. 2. Any tuple data will remain in space until it is removed, which is a representation of spatial separation.
6. In the tuple space for the implementation of fault tolerance, in the new model there are many copies, because this creates concurrency problems, so here are several strategies for reading, writing, take 3 different strategies; 1. The read operation is blocked until the response of the first copy is returned to the requestor as a result. 2. The write operation can be executed immediately by all copies, as there is no result. 3. Take the most troublesome, blocking until you receive a successful removal of all copies of the reply.
7. A good example of tuple space communication is javaspaces, which also has read,write,take 3 corresponding methods, which also define the blocking mode and non-blocking read mode APIs.
summary)
After learning the group communication of indirect communication, publish subscription mode, Message queue, DSM distributed shared memory, tuple spaces tuple space, in the way of direct communication before combining, the contour of the whole distributed system is really clear a lot.
References: <<distributed sysytems Concepts and design>> original version fifth, Author:george Coulouris,jean Dollimore, Tim Kindberg,gordon Blair
Distributed System reading notes (vi)-----Indirect communication