| > How would you go about implementing the CPU cache coherency that allows you to do the cross machine compare and swap? build it in the protocol! And so on... > The tools to make a shared ringbuffer that depends on cache coherent operations simply aren't there -- it's not something you can write with those tools. And that's the point: The tools needed simply don't work across the network. Ok. In theory, we just need to build access to the tool in the network protocol and have the network server execute the magic on the remote machine. Of course, one needs a way to map e.g. a CAS operation to a network request. I don't think today's CPUs let us do that. > Delete the call, and the checks around if the call fails. FILE *f = fopen(filepath, "rb");
if (f == NULL)
fatal("Failed to open file %s!\n", filepath);
There. I wouldn't remove a line, and I've magically handled whatever error condition it was, regardless if I've thought about network transparency issues or not.> Primitives that work everywhere, implement them uniformly, and stop special casing broken or inappropriate tools. I've never seriously looked at 9p, but the page you linked strongly suggests to me that it's more abstraction if anything (your initial statement was that that's bad), and more vague (if anything) as a consequence. More like HTTP, and I don't think of HTTP as a sort of universal solution - it's rather a sort of bandaid to glue things together with minimal introspection (HTTP verbs, status codes...). And the fact that it tries to be universal also means that it doesn't match some problems very well, and people will basically just sidestep HTTP there (I'm not a web person, but I've heard of major services that just return HTTP 200 always and just HTTP as a transport for their custom RPC mechanism or whatever). > Plan 9 doesn't have VNC ... NAT ... SSH Great. I get it. 9p is a basic transport method that gives some introspection for free if you can model your problem domain as an object hierarchy. But it's far from a free solution for any problem. It might save you some parsing in some cases, but it doesn't compress your VNC stream for example. Nor define the primitives of any problem domain that it just can't know about. |
You don't have access to the interprocess cache snooping in software. This is CPU interconnect internal shit, and you actually need access to the local memory bus for correctness. mmap in its fully glory is only really worth having if you can share pages from the buffer cache.
And even if you did, and you turn a ten nanosecond operation into a ten millisecond operation, counting the network packets you send (a factor of a million overhead), without the assumption that all the peers are reliable and never fail, the abstraction still breaks. And if you assume all your peers are reliable in a distributed system, you're wrong. Damned either way.
> I've never seriously looked at 9p, but the page you linked strongly suggests to me that it's more abstraction if anything
No, it's a single abstraction, instead of dozens that step on each other's toes.
> Great. I get it. 9p is a basic transport method that gives some introspection for free
What introspection? It's just namespaces and transparent passthrough. Unless you're talking about file names.