poetix

this time for sure

Triple Space

I’ve decided to attempt a REST-ful tuple space implementation for RDF triples, thereby increasing my buzzword concatenation quotient to previously undreamt-of levels.

Last night I sorted out some of the basics: getting MySQL and phpMyAdmin set up, building a couple of tables, getting a working connection in some PHP code. OK, OK, it’s accessible

Because tuple space read operations are blocking, and HTTP is a synchronous protocol, the client may submit a URL to which a notification can be PUT when a tuple becomes available. The rough semantics is as follows:

Client POSTs a request to create a new tuple space to the server. This creates a resource representing the tuple space. A GET on this resource will return a list of resources representing the tuples in the tuples space at that time. A DELETE will delete the tuple space.

Client POSTs a tuple into a tuple space. This creates a resource representing that tuple. The resource can be accessed using GET and deleted with DELETE.

Client POSTs a request for a tuple (and optionally a notification URL) to a resource representing a tuple space’s in or rd request queue. This creates a resource representing the pending request. The status of the request can be polled using GET, and the request can be cancelled with DELETE (although this is not guaranteed to prevent the request from being carried out). Once a request has been fulfilled, the resource representing its status will persist until it either expires or is DELETEed.

Andrew Rowstrom’s collect and copy-collect primitives are implemented by POSTing the URL of a tuple space to the /copy or /copy-collect resource within a tuple space. The collected tuples are POSTed to this URL. This enables collect and copy-collect to work across servers. The number of tuples collected is returned to the client.

I think that should cover it. By restricting the tuples to be RDF triples, we simplify the pattern matching and storage requirements quite considerably. Our tuple space has just become a triple store! Boundless good things will undoubtedly ensue.