start multiple instance of the same service ?

John (J5) Palmieri johnp at redhat.com
Thu Sep 14 09:13:06 PDT 2006


On Thu, 2006-09-14 at 09:21 -0400, Havoc Pennington wrote:
> frederic heem wrote:
> > Hi,
> > Is there a way to start multiple instance of the same service ?
> > It seems that at the moment, only one instance of the service is started by 
> > the daemon.
> > The requirement is that a client get a new proxy given the name of the 
> > service, not the object name. The daemon shall be able to start one service 
> > per client, not one service for all clients.
> > For example, let's say that a packet capture service is called dumpcap, many 
> > clients shall be able to request this service, for examples, one captures on 
> > eth0 and the other one on eth1. Each clients needs its own dumpcap process, 
> > sharing the process is not possible without rewriting dumpcap.
> > Is it already possible or is it something that require modifying dbus itself ?
> > 
> 
> It's not possible. But you could have a service factory service perhaps, 
> that starts a dumpcap for each network interface.
> 
> Havoc

This sounds like the right way to do it.  Basically have one factory,
org.dummy.dumpcap for example, and have a method such as StartInstance()
which execs the actual provider and sends back a unique bus name.  You
could even get fancy and have the provider also become its own bus
server and send a socket to connect to avoiding the overhead of the bus.

-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list