Search code examples
network-programmingautobahncrossbarwamp-protocol

Purpose of Controller in WAMP (Web Apps Messaging Protocol) routing


Im new to WAMP (Web Apps Messaging Protocol) routing. So please forgive me if my question sounds too dumb. It is a beginners question. I don't quite understand what exactly controller is.

I know what controller is from a normal Model-View software architecture prospective but Im a little bit confused because it seems the word Controller has a completely different meaning in terms of WAMP routing.

I went through this documentation (http://crossbar.io/docs/Architecture/). It says Controller is a process that manages, controls and monitors Crossbar.io nodes and dynamically starts, monitors and stops worker processes, but not quite sure what exactly that means and what the real life benefits are.

I had a look at the crossbar examples at https://github.com/crossbario/crossbarexamples but can't manage to get my head around because all the examples have the Controller part completely empty in the config.json file.

I found a small sample at http://crossbar.io/docs/Management-API/ but still can't understand the purpose.


Solution

  • "Controller", as in MVC (Model View Controller) is something completely different than "controller" as in Crossbar.io.

    MVC is a programming pattern used in user interface code. A controller is one piece in that pattern.

    Crossbar.io is a messaging server that employs a multi-process design. That is, the server runs as multiple OS processes. One of those processes is the controller. The controller is the only process that always runs for a given Crossbar.io node. This controller process then starts and monitors other Crossbar.io OS processes (not Crossbar.io nodes).