Sunday, August 10, 2008

HTTP/NVM Systems & Interfaces

The Unix [1 2 3 4] device model circa 1967 is an eternal landmark. A path space name like "/dev/audio" is accessible in the universe of the system calls "read" and "write". The model has been evolved in major increments in Plan9 [1 2] and Inferno [1 2]. In these latter interations, Plan9 and Inferno, devices are distributed on a protocol named "9P" or "Styx" [1].

It's plainly obvious to look at HTTP from the same perspective, on another level of abstraction. Not "open", "read" and "write", but "get", "put" and "delete". An HTTP host is a server, a Styx host is a peer. Styx can export "/dev/mouse", while HTTP clearly won't.

But that's the limit of the "system" (Unix) perspective. Its streaming devices are unlike HTTP transactions. A Styx host is not intended for handling large numbers of users, but HTTP is (let's say). HTTP is stateless, Styx is not.

That said, let's return to the idea. The HTTP methods "get", "put" and "post" may work on systemic devices in some sense. Consider a small XML or JSON file, "/sys/state". The operations "get", "put" and "delete" use and manage some system state. The term system takes on a more abstract meaning from the Unix case.

The system is a cloud of producers and consumers interoperating via HTTP. Host names scope application spaces, and authentication controls access. Relatively more Styx- like devices can be constructed with a "post" operator, as in the case of the open social / atompub media "device" [2]. In this case, a post to an abstract device creates a new resource in a device controlled location.

Following the thought, an HTTP device accepts "post", while a resource accepts "get", "put" and "delete".

No comments: