Dbus can it support server to multi end users.

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Feb 16 01:21:29 PST 2012


On 16/02/12 02:39, Peter Dolding wrote:
> Subject: Dbus can it support server to multi end users

Yes.

> I will explain what I am upto.  I am looking at hooking auditd/audisp
> to a end users widget.

The simplest version would be to put a centralized daemon on the system
bus, have it emit broadcast signals (signals with no destination), and
have user processes receive those signals and turn them into
notifications. (This would allow any user on the system to see any other
user's notifications, though, because broadcasts on the system bus are
considered to be "public".)

> The application in audisp filters message to what each user should
> sees then sends to registered parties.

If you just need to filter the messages for convenience (i.e. they're
public information which all users could get by polling anyway), you can
do as I said above.

If the filtering is for security/privacy, you'd need a more complicated
scheme: the user processes register with the central daemon by calling a
method on it, the central daemon performs appropriate filtering, and for
each notification that should go to each user process, it either calls a
method on the user process, or sends a unicast signal (signal with a
non-empty destination) to it.

> To be very clear registered parties end user side must not poll this.
> This is up to audisp program to send.

Neither of the arrangements I described involve polling; as long as
there were no notifications to display, each user process would block
indefinitely in a syscall.

    S


More information about the dbus mailing list