many-to-one router-to-router communications? best practices?


I have a Python asyncio WAMP app whose instances run at on-premises servers behind firewalls, each then making an outbound connection to a “central” Crossbar router.

The app needs to work with systems running at the same local server, and also integrate with third-party systems both within the local private network and through public networks. As it grows, I’ve come to realize I’m starting to implement functionality already in Crossbar. Such as the ability to run configurable components.

So rather than a custom app, perhaps I should just run another crossbar instance on-premises and turn the app into a component (or several) that crossbar runs. Would be a lot nicer in many ways.

I guess it’s completely possible in some way(s) - but before jumping in, I wonder what are the constraints and thresholds - when does it make sense and when not? Where will I run into a brick wall trying to do something that I should not?

My initial thoughts for mapping the custom app to components running on the local crossbar instance are simply:

  1. Have a single native container component responsible for communications with the central router, within the customer-specific realm. So it would have to somehow proxy events and RPC calls back and forth, within the single customer realm. I assume this would mean having to keep two connections - one to the central router and one to the local one. Each event or call would thus involve an extra (local) rountrip.

  2. Have a component or more per task the app needs to perform, within the customer-specific- or a task-specific realm

On the other hand, I guess each task component could just open its own connection to the central router if needed, which I assume would make 1) unnecessary. That would be a lot simpler, assuming the same TLS client certificates can be re-used for authentication.

Any suggestions much appreciated.