Orleans client-requested message flow and the re-routing mechanism of messages in silo

Source: Internet
Author: User

1. The client is a outsideruntimeclient, and in this client class there is a Message Broker Center transport (type Proxiedmessagecenter)

2.ProxiedMessageCenter load the message request into the silo cluster (i.e., different gatewayconnection) by modulo

3. The message first enters the load-getting gatewayconnection request queue (Requestqueue)

The 4.GatewayConnection instance has a specific silo address and socket instance, and eventually the message is sent through the socket here, and the message is first serialized before it is sent

5.Silo when a message is received, the local grainactivation is first found based on the requested Grainid, and if the corresponding activation is activated locally, the request is routed to this activation for processing

Here are some detailed descriptions of the processing that silo received after receiving the message:

First, Silo does not hold all the actor's address information, Silo holds a data dictionary of the local actor activation and a non-local silo holds an address map cache Dictionary of actor activation.

silo The process of routing messages into the following 3 steps

1. Find the local actor activation data dictionary, if found, directly routed to the local actor activation for message processing

2. If the local actor activation data dictionary does not have this grain, look for the cache dictionary, locate the silo address according to the dictionary, and then route the message to the corresponding silo

3. If not found in the cache, according to Grainid, through the consistent hash to obtain the target silo, the remote silo find Grainid corresponding activation, and then saved to the local cache dictionary

The actor activation address update in a single silo, localgraindirectory through the implementation silostatuschangenotification, listens to silo Stop message, gets the message, Delete all the actor address caches here silo in the local cache

To sum up, summarize:

1. A single silo does not hold all actors ' addresses

The actor address between 2.Silo does not need to be synchronized, the cache is added only when it is found, or when the lookup learns that activation is not available, and when the other silo is stopped, all the corresponding silo actor activation caches are deleted

Orleans client-requested message flow and the re-routing mechanism of messages in silo

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.