Featured post
multithreading - Looking for some Java good practice advice regarding distributed applications and message passing -
some background information. distributed application multiples nodes. 'communication' thread sends , receives messages sent between these nodes. cannot changed.
a 'dostuff' thread asks 'communication' thread send message node. needs wait response other node. 'communication' thread receive response message. needs deliver message correct 'dostuff' thread.
i unsure sort of information needs stored @ node or within message ensure correct thread receives response message.
looking advice upon how achieve this. reading :)
you want attach sort of message id outgoing message included in response. sequential number or uuid job. communicator thread can keep track (a map?) of "dostuff" thread waiting given response , pass back.
you keep track of when request sent if response isn't received communicator thread can notify dostuff thread response wasn't received.
- Get link
- X
- Other Apps
Comments
Post a Comment