0

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.

Emile Cormier
  • 28,391
  • 15
  • 94
  • 122
Eddie
  • 1,043
  • 8
  • 14

1 Answers1

1

"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).

oberstet
  • 21,353
  • 10
  • 64
  • 97
  • Thanks oberstet. As far as I understand, an OS process is an instance of a running program and has its own stack, heap and process ID but Im not quite sure what is special about Crossbar.io OS process. So, for example, if I have 3 App components written in 3 different languages configured as Guest workers and 1 Controller, Im going to have 4 Crossbar.io OS processes. Am I right? – Eddie Jan 05 '15 at 11:41
  • Exactly. The controller process starts when you type `crossbar start`. This process then starts (and monitors) the 3 worker processes. You are right about your definition of "OS process". What is special about Crossbar.io processes? Example: when you start Firefox, you will have (simplified) a Firefox OS process. All are processes. It's the specific program which makes it into an X process. That's just to make clear what kind of process (what is the program underlying the process) we are talking about. – oberstet Jan 05 '15 at 11:53
  • Thanks oberstet. Now I comprehend. :) – Eddie Jan 05 '15 at 12:13