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

Difference between revisions of "Multipoint Request/Reply Implementation"

 
Line 1: Line 1:
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. [[Media:CommunicationChannel.png|Figure 1]] shows the scenario.
+
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. [[Media:CommunicationChannel.png|Figure 1]] shows this scenario.
  
 
+
A peer(replier) receives several messages from different others peers(requestors). Each replier needs to deal with these several messages(requests), then a '''Produce/Consumer''' mechanism was developed into each peer. This mechanism stores in a ''message queue'', each message(request) received. A '''Consumer''' look at messages inside the ''message queue'', where each message is consumed, and the respective requestor(for each message) will receive the response. [[Media:producerconsumer.png|Figure 2]] shows this 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. [[Media:producerconsumer.png|Figure 2]] shows the scenario.
+

Revision as of 10:23, 27 June 2006

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 this scenario.

A peer(replier) receives several messages from different others peers(requestors). Each replier needs to deal with these several messages(requests), then a Produce/Consumer mechanism was developed into each peer. This mechanism stores in a message queue, each message(request) received. A Consumer look at messages inside the message queue, where each message is consumed, and the respective requestor(for each message) will receive the response. Figure 2 shows this scenario.

Back to the top