Re: Compatibility between D-Bus and kdbus

Lennart Poettering <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <20141125162554.GA13548@gardel-login>
On Tue, 25.11.14 11:08, Simon McVittie ([email protected]) wrote:

> > This might be a problem. Right now, QtDBus assumes that any match rule it adds 
> > will be handled successfully. If the resource limit is low enough that an 
> > application could hit it, we'll need to start handling the failure case. 
> 
> Yes, and that's hard; GDBus doesn't handle this either. On the other
> hand, at least kdbus adds match rules via a synchronous ioctl rather
> than an async message.

Are you sure? I thought it was async in gdbus... sd-bus currently adds
them all in sync mode, and I actually have a todo list item to make
this async, taking inspiration from gdbus. Syncing on AddMatch is
actually really slow, given that there are so many involved.

> Somewhere else (in this thread? on the Google Code project?) I suggested
> adding an ioctl for "atomically replace this bloom filter with this
> bloom filter", which would let a binding consolidate two similar match
> rules A and B into a broader rule, say A|B|C, without needing to worry
> about exceeding the limit again. Pseudocode:
> 
>     try:
>         add match rule D
>     catch resource limit exceeded:
>         find two sufficiently similar match rules A and B
>         atomically replace A with A|B|C
>         remove B
>         retry adding D

If figure you mean:

https://code.google.com/p/d-bus/issues/detail?id=10

It appears to be implemented.

> > org.freedesktop.DBus.GetId
> 
> Possible gap?

It's communicated in the HELLO ioctl struct when you connect. A client
should cache it.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
dbus mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.