Thu Mar 23 11:41:01 EDT 2017
Unify namespace for USB devices
Provide network transparency for:
- serial ports
- usb drives
I'd use DNS, but it might make more sense to use ssh host
configuration as it is more powerful. Find a way to make that
network-transparent, e.g. allow inclusion of files exposed over NFS.
For ssh, it's possible to use include:
For serial ports, there are two problems:
1) ensure exclusive access
For 1) it should be able to grab. For 2) it is enough to use screen
or emacs on top of 1), so that's essentially solved.
Using lsof, exclusive access can be guaranteed. Still, not sure if
the current socat-based serial-console makes much sense. The reason I
used that raw approach is because I have a machine which has screen on
the other end of the terminal. That is an exceptional configuration,
so maybe just default to screen or emacs.
serial port is identified by host,dev pair.
readlink -f can be used on dev to get a canonical name.
A screen or emacs terminal session can be started.
Which should be the default? Let's use screen for now.
serial-screen.sh zoo:/dev/ttyUSB0 115200
So this solves the network transparency problem. However, the name
itself still contains the physical address of the resource. How to
map "my know USB plug" to a network transparent name?
This requires distribution in some form from netlink/udev to a central
point. DNS doesn't seem to be the right mechanism, but NFS might be.
Or an Erlang distro.