[TUHS] Unix APIs: elegant or not?
rminnich at gmail.com
Fri Nov 2 00:19:50 AEST 2018
On Thu, Nov 1, 2018 at 7:05 AM Clem Cole <clemc at ccc.com> wrote:
> P9 took a different path still (pun intended).
as in: http://doc.cat-v.org/plan_9/4th_edition/papers/net/
It shows that you can use the pathname model for networks, And it
shows one way to get it right. There are others.
Here's a simple example of what get it right means:
there are *no* commands on Plan 9 that end in 6. No ping6, for
example. Plan 9 did not fall over sideways, as Unix did, when
infiiniband introduced 20 octet addresses, which are
the ip6 address and "more".
Just look at how many sockaddr_* there are Linux nowadays, including
those odd ones that have a name starting with a null byte. In Plan 9
there are 1, since a sockaddr in plan 9 is ... a string.
That's not to say plan 9 got it perfect. it's just to say that one can
use the Unix model of pathnames, open/read/write/close, for networks
and IPC in general (even pipes).
It's just a shame nobody's caught on yet ;-)
And, to repeat, a bunch of us in the 80s tried to implement the idea
of /dev/net/host/port (mind was in AmigaDOS), and it fails badly for
all kinds of reasons.
what's the implications of
mv /dev/net/harv/20 /dev/net/prep/35
what happens? If only somebody could only find Rob's talk which delves
into this in such nice detail ...
In my view, what went wrong with Unix networking 40 years ago is that
it broke from the Unix model, i.e. that resources are accessed via
path names, and went with binary descriptors as paths. But what can
you do? Synthetics were yet to be created.
More information about the TUHS