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.
Am 07.08.2012 20:29, schrieb PC:
> Hi Tobias,
> Thanks.
> If I understand you right, I would have a single "main" WAMP server
> different server-application-processes communicating with it through
> IPC. I would need to override the publish/subscribe routines of the
Assuming you actually need to run "other stuff" in separate OS processes
on the same machine (as running the WAMP server), the simplest IPC
mechanism to use is probably pipes (standard
input/output).
> base pubsub engine (of the main WAMP server) and do my own thing.
> Specifically in my case, for example, my publish routine would use IPC
> and send the data across to the appropriate server-process. Am I correct?
Yes. Technically, you don't override the WampServerProtocol base class
methods, but use registerHandlerForPub to install your custom logic
into the message broker.
>
> How do you suggest handling RPCs in this case? Note that the routine
> would actually be defined in one of the server-application-processes,
> not in the main WAMP server.
Now you lost me: do you want a) to have logic in your background server
processes that you can call from WAMP clients via RPC, or b) have
logic in your background processes that get called when events are
published by WAMP clients?