A and B have two servers, the main business logic in A, B to provide A basic service
Is limited by the underlying framework, put all the client A message delivered to A thread, and then assigned to more than one worker thread, and the communication of A and B by an independent thread (temporarily called it - thread B) is responsible for
When the client login to A service to request B, is currently the work thread to B - thread sends the message, B - thread transfer messages to server B, B - thread after receiving A reply to the work thread
Do feel very complex, the validity problem and to consider a lot of data, such as the work thread when received B reply to check if the client is still there, and the thread and the coupling of the business logic is
But is limited by the framework, A must to all client message delivered to A thread, and B message delivery to another thread
consult