[muscle] Re: SV: Re: MOM and DAD problem.

  • From: Jeremy Friesner <jaf@xxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Fri, 15 Aug 2003 00:48:18 -0700

On Thursday 14 August 2003 11:55 pm, you wrote:
> That might work.

It's worked well for me in my programs....

> What I did yesterday was to send a PR_COMMAND_GETPARAMETERS after the
> "SUBSCRIBE" command. In the "case muscle::PR_RESULT_PARAMETERS" I proce=
> the subscriptions I should have done and compares does with the msg( ):
> But than I figured out that  - What should I do when I don't find the
> whatIShouldHaveSubscribedTo string? (Or maybe I'll never reach that
> situation?) Calling another PR_COMMAND_GETPARAMETERS would maybe result=
> an infinite loop...(would it?).

Since you set the SUBSCRIBE parameter before sending the=20
PR_COMMAND_GETPARAMETERS Message, that parameter will always be in the=20
PR_REPLY_PARAMETERS Message you get back.  This is because the subscripti=
command is handled synchronously on the server, and Muscle guarantees tha=
your commands will be processed in the same order that they are received,=
there is no way for a subscription to fail (well, barring=20
server-out-of-memory or some other such catastrophic condition, anyway).

> But I figured out that if my "SUBSCRIBE"
> command was done before the first PR_COMMAND_GETPARAMETERS than in all
> cases I've tried the subscription is valid when the PR_RESULT_PARAMETER=
> comes back. First thing first... Is this behaviour guarateed by MUSCLE?

FIFO behaviour is guaranteed, yes.

> And when the subscription is valid I directly call the DAD client that =
> ready.

The subscription can be assumed to be valid/active as soon as you have se=
the SUBSCRIBE Message... because any Messages you send after that will be=
processed by the server after the SUBSCRIBE Message has been processed. =20
So I don't think there is any need to wait for the results Message to get=
before notifying Dad... (if I understand the scenario correctly, anyway)


Other related posts: