Proposed alfs communication model

jamie bennett jamie at linuxuk.org
Wed Feb 16 08:05:25 PST 2005


Quoting James Robertson <jwrober at linuxfromscratch.org>:

> Jamie Bennett wrote:
> > I've put up a little proposed communication model for alfs the way _I'd_
> > like to see it done at 
> > 
> > 	http://www.linuxuk.org/blog/index.php?itemid=57
> 
> Very intriguing.  What is a D-BUS?  I have never heard of it before.

See http://freedesktop.org/wiki/Software_2fdbus.

Basically its a message passing method. Think of it rather like public service
announcements at a train station. There are lots of messages such as when a
train is arriving, when a train is cancelled, when a train is late, but you are
only interested in announcements to do with _your_ train. The alfs-client
listens for announcements from the alfs-server and vice-versa. From this you can
see that anyone who can hear the announcement (read, is listening to the D-BUS)
can act on them, which promotes the use of modules for alfs.

Many of todays apps use the D-BUS such as Beagle [1], Dashboard [2] and Hal [3].
For only a small subset of the projects using D-BUS see
http://freedesktop.org/wiki/Software_2fDbusProjects . For example when you plug
in your shiny new ogg/mp3 player the Hal/udev system makes a D-BUS announcement.
An app then pops up asking if you would like to download some more ogg/mp3's to it.

> Looks like Gerard mentioned that we need a D-BUS daemon.  Who makes one? 

See link above.

> Does that mean we need yet another dependancy?

Yes, but its such a common dependancy and chances are that if your comming from
a host that isn't LFS then you will already have it installed. I also hear that
D-BUS and Hal are being pushed for inclusion in BLFS.

> How does the client "know" that it is talking to a server across the 
> network as opposed to on the same machine?  How does it know to bypass 
> the comms module?

The point is that once the initial connection is made they don't need to know
where each other are. Obviously if the client and server are on seperate i.p's
then you will tell the client to connect to a specific i.p. This in turn will
fire up the clients comms module which will talk to the comms module that the
alfs-server started. Once the two comms modules are running the client and
server need not be bothered how the messages get to their destination they just
talk to the D-BUS. The clever work goes on in the comms modules which will
listen for alfs specific announcements and transport them in any way which we
see fit. If the client and server are on the same machine then they are within
'ear-shot' of each other so the comm's modules aren't used.

HTH,
 
> Thanks
> James

    --    Jamie

[1] http://www.gnome.org/projects/beagle/
[2] http://www.nat.org/dashboard
[3] http://hal.freedesktop.org/wiki/



More information about the alfs-discuss mailing list