Re: SAMPY

From: Luigi Paioro <luigi-at-lambrate.inaf.it>
Date: Thu, 03 Jul 2008 10:59:37 +0200


> Looks great Luigi. I certainly haven't given it a thorough workout,
> but initial tests show it cooperating happily with my java code.
> I'll let you know about further results when I've got some.
>
> Mark

Great! :)

I take the opportunity of this mail to ask you all a thing concerning the protocol.

When a client performs a callAll(...) with a specific MType, then the Hub is responsible to deliver the related message to all the clients that subscribed to that MType (or related wildcards). And that's ok.

When a client wants to perform a call(...) or callAndWait(...) to a specific client with a certain MType, then, first of all, it _SHOULD_ verify whether that client is subscribed to that MType (or related wildcards) or not. But this practice is not explicitly stated (or at least I don't see it) in the document, and anyway _SHOULD_ (or even _MUST_) doesn't mean that a client will certainly do it.

So, what happens if a client performs a call(...) or callAndWait(...) to another client, sending an MType to which the recipient is not subscribed?

I see three possibilities:

  1. The hub returns an empty msg-id;
  2. The hub throws an error;
  3. The recipient client returns a response with an error.

Presently my Hub doesn't support cases 1. and 2. but hopes in 3. Anyway this doesn't means this is the best solution.

What's your opinion?

Thanks in advance.

Luigi Received on 2008-07-03Z11:00:09