PubSub and load balancing

64 views
Skip to first unread message

Jan

unread,
Aug 14, 2018, 9:00:29 PM8/14/18
to Crossbar
Hi guys,


To eliminate direct dependencies between crossbar components, I want to use PubSub as an event bus rather than RPC.

E.g., I want to specify how many subscribers will receive the message.
if Topic abc.topic.some_topic is subscribed by two same services, I would want only one to receive the publication.

Many thanks,

Tobias Oberstein

unread,
Aug 15, 2018, 4:52:58 AM8/15/18
to cross...@googlegroups.com, Jan
Am 15.08.2018 um 03:00 schrieb Jan:
> Hi guys,
>
> I think this question is duplicate
> to https://groups.google.com/forum/#!searchin/crossbario/multiple$20subscriber|sort:date/crossbario/gPfHSTUxkOA/PLAtAxX3AwAJ
>
> To eliminate direct dependencies between crossbar components, I want to use
> PubSub as an event bus rather than RPC.

WAMP routed RPC already decouples components

>
> E.g., I want to specify how many subscribers will receive the message.
> if Topic abc.topic.some_topic is subscribed by two same services, I would
> want only one to receive the publication.

see above, and also:

https://github.com/crossbario/crossbar-examples/tree/master/scaling-microservices


>
> Many thanks,
>

Jan

unread,
Aug 16, 2018, 7:35:47 PM8/16/18
to Crossbar
Thank you for your answer Tobias,

Using routed RPC between components leads me to think that pub/sub will not be used within backend components for load balancing purposes.

I understand there is no message persistence feature in WAMP but you can achieve similar via `event history` (which does not exist for RPC call I believe).

That means, if one of the backend services is down and client published an event via RPC, the call will be lost and client will need to handle accordingly. where as with pub/sub you can catch up with the old events when the service comes back up and client does not need to care about whether the event was received or not.

And now I wonder where else pub/sub will be used besides UI updates. 

Thanks

Tobias Oberstein

unread,
Aug 23, 2018, 2:54:12 AM8/23/18
to cross...@googlegroups.com, Jan
Am 17.08.2018 um 01:35 schrieb Jan:
> Thank you for your answer Tobias,
>
> Using routed RPC between components leads me to think that pub/sub will not
> be used within backend components for load balancing purposes.
>
> I understand there is no message persistence feature in WAMP but you can

WAMP has many different message types .. it doesn't make sense to access
or persist eg SUBSCRIBE

> achieve similar via `event history` (which does not exist for RPC call I
> believe).

WAMP event history is part of the WAMP AP profile, and Crossbar.io
implements that.

WAMP event persistence is a feature we'll add in CrossbarFX -
persistence is outside the scope of even the WAMP AP profile

>
> That means, if one of the backend services is down and client published an
> event via RPC, the call will be lost and client will need to handle

I think you are mixing thing up. events are not tied to calls in WAMP

> accordingly. where as with pub/sub you can catch up with the old events
> when the service comes back up and client does not need to care about
> whether the event was received or not.
>
> And now I wonder where else pub/sub will be used besides UI updates.

for many things .. this is an open ended question that cannot be answered
Reply all
Reply to author
Forward
0 new messages