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