Does Crossbar router to support server side methods Like pubnub blocks

49 views
Skip to first unread message

Steve Morin

unread,
Sep 23, 2016, 11:05:03 PM9/23/16
to Crossbar
Does Crossbar router to support server side methods Like pubnub blocks?

I need data to not only be routed but executed upon by a central server. Can this be done with Crossbar.io. Was trying to figure that out and it's not clear that is possible.

Alexander Gödde

unread,
Sep 24, 2016, 7:05:16 AM9/24/16
to Crossbar
Hi Steve!

Crossbar is a message router. As such it never runs any application code. You can, of course, run any application components which respond to the routed Remote Procedure Calls, or which subscribe to topics and do processing based on events, on the same server that Crossbar runs on. You can also start these components up from Crossbar on Crossbar's startup (see http://crossbar.io/docs/Guest-Configuration/ for components using any runtime).

Hope this answers your question!

Regards,

Alex

Steve Morin

unread,
Sep 25, 2016, 3:03:26 PM9/25/16
to Crossbar
Alex,
  That keeps things simple but also complicates things because then you need some sort of inbetween logic and ability to scale out requests.  Example would be: publish(topic:com.mytopic1.application) => subscriber[Application Processor] = publish(topic:com.mytopic1.real) => subscriber(real consumer).

Wouldn't it be hard to manage how you would get work distributed to many "subscriber[Application Processor]" , how would you distribute that load?  How would you manage "com.mytopic[1-100]" goes to whom and "com.mytopic[101-200]" goes to whom else?

-Steve

Gareth Bult

unread,
Sep 26, 2016, 8:10:04 PM9/26/16
to Crossbar
Hi Steve,

Does this help?

Regards,
Gareth.

Tobias Oberstein

unread,
Sep 29, 2016, 3:17:09 AM9/29/16
to cross...@googlegroups.com
Hi Steve,

Am 25.09.2016 um 21:03 schrieb Steve Morin:
> Alex,
> That keeps things simple but also complicates things because then you
> need some sort of inbetween logic and ability to scale out requests.

No additional logic neede - this is built into Crossbar.io

Eg you can have multiple instances of a callee endpoint running (say on
a bunch of machines) and let Crossbar.io round-robin balance incoming
calls to these callees automatically:

https://github.com/crossbario/crossbarexamples/tree/master/sharedregs/python

You can also have advanced control with maximum concurrency and call
queueing

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

The latter are important features when doing microservice load balancing
in real world setups. I don't know of any other messaging like server
thing that provides this out of the box.

Cheers,
/Tobias

Steve Morin

unread,
Sep 29, 2016, 1:15:01 PM9/29/16
to cross...@googlegroups.com
Thanks Tobias,
  I am looking to not round robin RPC but PubSub.  This would allow me to Example would be: publish(topic:com.mytopic1.application) => subscriber[Application Processor 1] = publish(topic:com.mytopic1.real) => subscriber(real consumer) and publish(topic:com.mytopic2.application) => subscriber[Application Processor 2] = publish(topic:com.mytopic2.real) => subscriber(real consumer 2).

Or am I misunderstanding what you are saying.  This is because I would like to be able to continuously be able to evaluate functions on data that is being published.  The scenario is in proxying data that need to be transformed server side before going to a number of receivers.  This is a service so this needs to happen once for each session group of published data to N receivers.

Does that make sense?





-Steve

--
You received this message because you are subscribed to a topic in the Google Groups "Crossbar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/SLdk6jPOT4E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to crossbario+unsubscribe@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/45d29138-9da5-cc68-b582-7fec5616d91b%40gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Steve Morin | Managing Partner - CTO


Enabling the Data Driven Enterprise
(Ask us how we can setup scalable open source realtime billion+ event/data collection/analytics infrastructure in weeks)

Service Areas: Management & Strategy Consulting | Data Engineering | Data Science & Visualization 

Tobias Oberstein

unread,
Sep 29, 2016, 1:37:14 PM9/29/16
to cross...@googlegroups.com
Hi Steve,

Am 29.09.2016 um 19:14 schrieb Steve Morin:
> Thanks Tobias,
> I am looking to not round robin RPC but PubSub. This would allow me
> to Example
> would be: publish(topic:com.mytopic1.application) => subscriber[Application
> Processor 1] = publish(topic:com.mytopic1.real) => subscriber(real
> consumer) and publish(topic:com.mytopic2.application) =>
> subscriber[Application Processor 2] = publish(topic:com.mytopic2.real) =>
> subscriber(real consumer 2).

I'm not sure if I get what you actually want to achieve.

I assume you want to preprocess events before being published to actual
subscribers.

In that case, you might as well just have a procedure
"com.mytopic1.application" to submit events, where the procedure will do
whatever preprocessing is necessary, and only then publish to the actual
"com.mytopic1.real" topic. This is possible, because you can (of course)
publish events from procedure bodies being called. You can combine all
WAMP actions (publish/subscriber/call/register) in any conceivable way.

Using above pattern also immediately allows you to scale your event
submit procedures (in case these are doing computationally intensive work).

Hope this helps,
Cheers,
/Tobias
>> crossbario+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages