Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Multipoint Request/Reply Implementation

Revision as of 21:46, 26 June 2006 by Mayworm.gmail.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SCP make a broadcasting search requests from peer A(requestor) to peers N. When peer N1 matches on the search term, it sends the match to Peer A, not all the peers in the group. The messaging model imply in a request/response model. We decided have two channels: one to broadcast requests to peers N, and another to receive responses - only to requestors. The request message should contain a Return Address that indicates where to send the reply message. A simple solution was get ID of the requestor, using method getFromContainerID() in IChannelMessageEvent, and send the response using sendMessage(ID receiver, byte [] message), which sends to a particular receiver container. Any peer that wants to respond can simply initiate a direct connection with the requestor. Figure 1 shows the scenario.


If different messages to the same replier require replies to different places, the replier can determine from each request message where to send the reply for that request. A Return Address(ID name) is put in the header of a message because it's not part of the application data(Java files) being transmitted. Each replier needs to deal with several requests, so there is a mechanism Produce/Consumer into each peer, storing each message received in a message queue implementation. Process consumers look at messages inside the queue consuming any of the messages. Figure 2 shows the scenario.

Back to the top