Hey, think I’ve done this.
There’s a central WAMP server, which has the dispatcher (broker) overridden. Other servers, let’s call them services, because they are actually WAMP clients – so that they don’t get confused with the central server – register at this central server. They tell them what kind of services they offer, ie “service/ping” or “service/stocks”.
Then clients connect to the central server, and request interest in services by saying that they are interested in messages with certain tags, ie “service/ping” or “service/stocks”.
When the service has new data, it sends an RPC message to the server (ie “service/stock” with stock data attached), the server then checks which clients registered interest, and publishes it to them.
If clients want to interact with services, they also post an RPC message to the server, who then hands it over to a specific service, or to all, if the client wanted some general information, ie which services are avaliable, and in which configuration state they are in (ie one ping service pings every 5 seconds with a certain message, and another one another message every 10 seconds).
Clients can also modify the configuration of services, make them save or load their configuration, and request all data to dynamically create a client-side user interface for the service.
I’m a bit confused about the complexity of this system, so I haven’t touched it for a couple of weeks. I’m not sure if it’s worth it continuing to research in that direction, somehow it feels amazingly flexible, but on the other hand a slim, custom system without WAMP might be a better solution.
Tell me if it goes in that direction, I’ll free some time to post it to github.
On Tue, Aug 7, 2012 at 12:19 AM, PC paddy....@gmail.com wrote:
I am planning to design a system (over websockets) that allows browser/non-browser “worker-clients” to publish data to a “server application process” and also the “server application process” to push data to the worker-clients. Note that the requirement is that I should be able to add new server-application-processes dynamically that register unique topics that they listen on.
I like the way WAMP has been defined. I was also looking into other options such as STOMP over websockets.
It is clear that STOMP requires a messsage queue broker server to which many clients can connect to - specifically in my case, the worker-clients and server application process would be a client to the broker.
It appears to me that the Autobahn WAMP server does not have a broker server even though it implements a pubsub pattern. Am I correct?
If so, how can I dynamically add new WAMP applications that can register topics dynamically? Should each server process run its own WAMP server in a different port?