Emitting signals

Havoc Pennington hp at redhat.com
Wed Jul 27 23:53:07 EST 2005


On Wed, 2005-07-27 at 15:23 +0200, Lennart Poettering wrote:
> On Wed, 27.07.05 14:14, Ross Burton (ross at burtonini.com) wrote:
> 
> > 
> > On Wed, 2005-07-27 at 14:21 +0200, Lennart Poettering wrote:
> > > > Yes, signals are broadcast to all clients.  I'd suggest either sending
> > > > the signals and make the client filter the signals itself.  My app
> > > > solves this by sending normal messages to the client, but I can do this
> > > > as I've got a client library which handles the incoming messages and
> > > > transforms them into GObject signals for the applications.
> > > 
> > > Isn't this a waste of resources? You're spamming all DBUS clients
> > > with signals only one client might be interested in, arent' you? If
> > > hundreds of clients are connected to the bus (which is easily
> > > possible, since avahi uses the system bus), you'll wake up all clients
> > > for nothing.
> > 
> > Clients have to register a filter to receive signals, so you'll only
> > send it to all Avahi clients.
> 
> This is bad enough, isn't it?
> 
> Are these filters processed on the client side or by the bus daemon?

By the bus daemon, the purpose of the filter is to avoid context
switching into and paging in every client.

I think it may be possible to dbus_message_set_destination() on a
signal, also; I don't remember. Try it and see...

Havoc




More information about the dbus mailing list