[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] DBus in GNUnet?

From: Christian Grothoff
Subject: Re: [GNUnet-developers] DBus in GNUnet?
Date: Thu, 07 Nov 2013 08:39:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130922 Icedove/17.0.9

Hi Andrew,

Yes, using DBus has been suggested in the past, so one could say that it
was considered.  My main issue with it at the time was its awkward
(and not very stable) C APIs, and the fact that I did not want to drag in
GLib as a requirement for GNUnet (which is required for the high-level C
binding).  The GLib API seems to have now stabilized, but I'm still a bit
averse to GLib, in part because of Gtk+'s track record with respect to
portability (we're still on Gtk2 because Gtk3 is not working nicely for
LRN on W32).

DBus also raises questions of security (see #2887), as it is not clear
to me how file access controls can be mapped nicely to DBus (but I've
simply not looked into this).

Also, using DBus would not simplify as much as you suggest;
parsing the configuration is important, as it is the only way
we can run multiple peers on one machine for testing.  Also,
as there is more in the configuration than just the connection
information, you'd hardly get around parsing it in the long term

Still, I'm in principle not against using some standard, stable,
portable RPC mechanism that would simplify our IPC code.  However,
I'd like to have more experience on how this would look (and perform)
with C and Java --- and on more complex IPC protocols than ARM ---
before planning such a move.

For example, do you know if there is a performance impact (latency,
throughput or number of concurrent connections that can be open
system-wide) when using DBus vs. UNIX domain sockets?

In any case, even suppose my various concerns were addressed (which
might be possible) I doubt that we would do such a transition anytime
soon, as even if DBus made all of our code as simple as your ARM example
below, this would still be an incredible amount of work, and I don't
see an easy path for a gradual transition either...

My 2 cents

Happy hacking!


On 11/07/2013 04:45 AM, Andrew Cann wrote:
> By "hell of a lot easier" this is an example of what I mean: I've been
> working on a GNUnet library for nodejs. Just to do something simple like
> query the arm service for a list of services involves writing pages of
> code to read the config file, find the socket arm is listening on, pack
> up and send a GNUNET_ARM_Message then listen for a response and parse it.
> By contrast, if it was using dbus, an entire script to list the running
> services would look like this:
>     #!/usr/bin/node
>     var dbus = require("dbus-native");
>     var systemBus = dbus.systemBus();
>     systemBus.getService("org.gnunet.arm").getInterface("/",
> "org.gnunet.arm", function(err, arm) {
>         arm.request_service_list(function(err, list) {
>             console.log(list); // list is an array of service names
>         });
>     });
> _______________________________________________
> GNUnet-developers mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]