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

Re: Accessing remote devices



>   I am trying to access remote devices (specifically a remote CDROM)
> using D-BUS / HAL over the network.
> 

Woow, exciting.

> - I gather that D-BUS interfaces make sense only on a local system. Is
> this right? If yes, is there a way to get around this?
> 

D-BUS is designed to work over the network - check the message-bus-list
archives. Whether it currently works, I'm not sure. I think there were
some issues with authentication, but I dunno.

> - Can I have something like a 'transparent proxy' exporting the
> required interface which is actually implemented by someone else on the
> system bus?
> 
> - Any other possibility?
> 

I think that the first thing to do is to look at some use-cases on how
this should work. One interesting use-case could be an X terminal with
USB ports; 

                        |
                        |
                        | [desktop policy engine and apps
                        |  (includes g-volume-manager]   (per-session)
                        |   ^      ^
                        |   |      |
------------------------+---------------------------------
                        |   |      |
           +------------|---+      |
           V            |          V
      [hal daemon]      |     [hal daemon]                (per-system)
           ^            |          ^
           |            |          |
           V            |          V
    [kernel/base OS]    |   [kernel/base OS]
                        |
                        |
       X terminal       |    Computing server

This architecture wouldn't require big changes in HAL - maybe libhal
should just respect the DISPLAY variable and talk to both HAL daemons?

One principle to keep in mind is that HAL doesn't automagically let you
use the device.

For remote CD-ROM's this could include somehow mounting the disc on the
X terminal system, add the mount point to /etc/export and on the mount
computing server mount this filesystem via NFS.

For USB devices it would be harder. One solution might be to write a
generic usb-server component that runs on the X terminal and patch e.g.
libusb to talk to the usb-server component over the network (D-BUS could
be the preferred conduit).

However, as the 'grand plan' includes having one library per capability
(the app programmer would just give the library the device UDI from HAL)
this could be fully abstracted for applications, so they wouldn't need
to be modified to work over the network.

It's also important to think of security and rights management in this
context - note that HAL doesn't yet do this properly, but I'm going to
look into that soon (one basic use-case is that only daddy may use
daddy's camera).

I think this is a quite exciting and important area, but I'm not yet
sure the ideas I've expressed above is the best way to "Make hardware
just work"(tm) over the network. Don't know..

Cheers,
David



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