Re: [GIT PULL] kdbus for 4.1-rc1

From: One Thousand Gnomes
Date: Wed Apr 15 2015 - 06:38:29 EST


On Wed, 15 Apr 2015 00:39:22 +0200 (CEST)
Jiri Kosina <jkosina@xxxxxxx> wrote:

> On Tue, 14 Apr 2015, Greg Kroah-Hartman wrote:
>
> > I don't understand. You can not like the D-Bus model (and accordingly
> > the X11 model),
>
> I thought that the general hatred level of the X11 "model" and the
> protocol lead to al the efforts to reimplement this properly ... in
> userspace (for example Wayland, right?).
>
> I don't think anyone was ever seriously suggesting "X11 model is broken,
> so let's push it to kernel" ... ?

The X11 model is *nothing* to do with the dbus/kdbus model. X11 does
properties by attaching them to windows. Those properties can be
monitored for changes and they can be queried. Setting them is
asynchronous, querying them is sync or with the newer event based
libraries can be async. X11 properties are network safe, handled through
the same X11 authority as everything else. Two apps can happily run on
different systems sharing a display over the network and sharing and
responding to changes in X11 properties - and it just works.

The Gnome people tried to re-invent X11 properties and embedding badly
with CORBA, then with dbus, despite the fact the Andrew system could
already do it really fast and cleanly even before Gnome was thought of.

There is no comparison between the elegance of X11 property setting and a
chunk of proposed kernel code that is half the size of a tiny X server!

The dbus model is also flawed in a load of other ways in user space
because message handling in the hands of people with no concept of
systemic performance analysis just leads to disaster. One of the big
reasons dbus is so "slow" isn't that dbus is "slow", it's that the
crapware on top of it makes *thousands* of dbus queries.

If you must do it in kernel why not use the Android binder - it's awful,
broken, and dubiously secure, but at least we'd still only have one awful,
broken dubiously secure rpc/property layer in kernel.

"It's the issue that a stateful bus is required for
applications that is the main point I'm trying to get across."

That would be the "if dbus crashes I have to reboot" design flaw of
Gnome and friends. The only state you need is beyond the endpoints. It's a
message passing system. If you think message passing needs state then I'd
take a look at the internet. State belongs in the end points.

It's telling that I can lose and recover my internet connection without
rebooting but not my desktops internal messaging.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/