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

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.


Different Strategies for consume(Consumer)

This subsection will describe the possible strategies to consumer.

Back to the top