13.07.2015 Views

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SAMP — Simple Application Messag- ing Protocol Version 1.11 - IVOA

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 3: Asynchronous Call/Response patternient, optionally specify<strong>ing</strong> as well a maximum time it is preparedto wait. The sender’s call blocks until a response is available.2. The hub forwards the message to the recipient, supply<strong>ing</strong> alongwith the message an ID str<strong>ing</strong>, msg-id.3. The recipient processes the message, and sends its response backto the hub along with the ID str<strong>ing</strong> msg-id.4. The hub passes back the response as the return value from theoriginal block<strong>ing</strong> call made by the sender. If no response is receivedwithin the sender’s specified timeout the block<strong>ing</strong> call willterminate with an error. The hub is not guaranteed to wait indefinitely;it MAY in effect impose its own timeout.There is no broadcast counterpart for the synchronous call. This patternis illustrated in Figure 4.Figure 4: Synchronous Call/Response patternNote that the two different cases from the receiver’s point of view, Notificationand Call/Response, differ only in whether a response is returnedto the hub. In other respects the receiver SHOULD process the message inexactly the same way for both patterns.Although it is REQUIRED by this standard that client applicationsprovide a Response for every Call that they receive, there is no way thatthe hub can enforce this. Senders us<strong>ing</strong> the Synchronous or AsynchronousCall/Response patterns therefore should be aware that badly-behaved recipientsmight fail to respond, lead<strong>ing</strong> to calls go<strong>ing</strong> unanswered indefinitely. Thetimeout parameter in the Synchronous Call/Response pattern provides some20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!