settling time for clients after reconnect

27 views
Skip to first unread message

Greg Fausak

unread,
Nov 23, 2014, 10:36:56 AM11/23/14
to autob...@googlegroups.com
While I have been playing around with restarting my router to test reconnections I've noticed that the order cannot be predicted (of course) for all of the clients reconnecting to the router.  Which means that when a client reconnects it may need to wait for all services to reconnect to the router before continuing to do whatever it was doing.  A simple sleep at startup after connect may not be sufficient, because each of the services that connect may have different 'backoff' reconnect intervals.

How do I handle this?  Retry all operations X times before failing?

Maybe have a service that provides a 'quorum' status, and it watches all other services to see if we have a viable router yet?

-g

Tobias Oberstein

unread,
Nov 23, 2014, 2:48:02 PM11/23/14
to autob...@googlegroups.com
Am 23.11.2014 16:36, schrieb Greg Fausak:
> While I have been playing around with restarting my router to test
> reconnections I've noticed that the order cannot be predicted (of
> course) for all of the clients reconnecting to the router. Which means
> that when a client reconnects it may need to wait for all services to
> reconnect to the router before continuing to do whatever it was doing.
> A simple sleep at startup after connect may not be sufficient, because
> each of the services that connect may have different 'backoff' reconnect
> intervals.
>
> How do I handle this? Retry all operations X times before failing?

For now, you could have your components providing services just publish
a "ready" event, subscribe in service consumers to this, just issue the
call when a consumer starts, and when the call fails with "no such
procedure", retry in the event handler for the "ready" event.

Also see: https://github.com/tavendo/WAMP/issues/112

>
> Maybe have a service that provides a 'quorum' status, and it watches all
> other services to see if we have a viable router yet?
>
> -g
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/2d7b98d2-bba2-457e-8101-3cb33c5260f0%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/2d7b98d2-bba2-457e-8101-3cb33c5260f0%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Greg Fausak

unread,
Nov 24, 2014, 11:28:06 AM11/24/14
to autob...@googlegroups.com
That will work, thanks!

-g


On Sunday, November 23, 2014 1:48:02 PM UTC-6, Tobias Oberstein wrote:
Am 23.11.2014 16:36, schrieb Greg Fausak:
> While I have been playing around with restarting my router to test
> reconnections I've noticed that the order cannot be predicted (of
> course) for all of the clients reconnecting to the router.  Which means
> that when a client reconnects it may need to wait for all services to
> reconnect to the router before continuing to do whatever it was doing.
>   A simple sleep at startup after connect may not be sufficient, because
> each of the services that connect may have different 'backoff' reconnect
> intervals.
>
> How do I handle this?  Retry all operations X times before failing?

For now, you could have your components providing services just publish
a "ready" event, subscribe in service consumers to this, just issue the
call when a consumer starts, and when the call fails with "no such
procedure", retry in the event handler for the "ready" event.

Also see: https://github.com/tavendo/WAMP/issues/112

>
> Maybe have a service that provides a 'quorum' status, and it watches all
> other services to see if we have a viable router yet?
>
> -g
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages