On 04/26/2017 09:29 AM, Ulrich Windl wrote: >>>> Christian Seiler <[email protected]> schrieb am 26.04.2017 um >>>> 09:14 in > Nachricht <[email protected]>: >> On 04/26/2017 01:11 AM, Gris Ge wrote: >>> B) Expand iscsid to listen on a socket for IPC with JSON output. >>> Pro: >>> * Easy to create language bindings via JSON + IPC. >>> Con: >>> * More code work on iscsid like lock, ipc listener, json >>> formatter and etc. >> >> I don't think creating yet another own IPC interface is a good >> idea, there are already way too many IPC protocols in the Linux >> plubming space. I believe that DBus would be the obvious choice >> here. This has several advantages: > > I'm no JSON fan either, but I think IPC is much lower level than dbus > is (which is good during boot to keep initrd small). So dbus has to > have benefits over a simpler mechanism tu justify it.
Well, dbus isn't that complicated, and the normal IPC socket that is currently used by iscsiadm will probably not disappear. And if you really want to do Python in the initramfs, dbus really would not be the problem. ;-) As for the benefits: you didn't comment on the advantages I mentioned below in my email below: >> - introspection support >> - the object-based view it provides lends itself well to the >> problem at hand >> - a _lot_ of tooling >> - lots of language bindings >> - support for notifications (signals): this allows iscsid to >> broadcast changes to anyone who's interested >> - authorization can be managed entirely via PolicyKit, so >> there's no need t invent an own authentication and >> authentication system, one can leverage something that many >> people are already used to The most important benefit in my eyes though is: it's a standard. A ton of plumbing-related software already speaks DBus: NetworkManager, systemd-networkd, Avahi, WPA supplicant, systemd, Upstart (for those on older Ubuntu versions), LVM [1], logind, etc. There's even management software that uses DBus internally (see e.g. Cockpit [2], which uses DBus to manage a lot of things). Look, I don't think DBus is perfect. There's a reason why some people have been working on kdbus as a successor, even though that didn't pan out. I wouldn't be surprised if at some point in the future yet another alternative to that will make its way into the GNU/Linux ecosystem. But until a better alternative emerges I believe it's detrimental for every project to invent its own IPC interface if it is supposed to be stable to the outside world (and not just used internally). And I believe that DBus has a worse reputation than it deserves, if you look into it (and ignore all of the desktop stuff), the underlying concepts are actually pretty decent, especially for mapping typical IPC stuff. Regards, Christian [1] http://man7.org/linux/man-pages/man8/lvmdbusd.8.html [2] http://cockpit-project.org/ Haven't tried that though, have only read about it. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
