Saturday, July 02, 2005

Versioning, Messages, and Models

There's a dangerous idea creeping into WITSML services. It smells a little like the problems I outlined in Messages not Models: Is WITSML morphing into a data model?

A virtue of WITSML has been its document-oriented focus. But now the discussion at the last SIG concerned delivering WITSML documents to clients understanding only legacy versions of the schema -- in particular we expect a 1.20 client connecting to a 1.30 server to receive version 1.20 documents.

The creeping dangerous idea here is that there is server that has abstracted the data and stored it in some version-independent model. And now there neccessarily are some canonical mappings that need to be promulgated. And we are a hair's breadth away from defining a logical data model for well data.

A purely document oriented approach would regard the WITSML documents we send around as, well, documents. If you go to a web site and retrieve a PDF file, you don't ordinarily expect to be able to ask the server to convert it to MS Word format before delivering it. The document is just the bits as someone put them up there, and the server has no idea what they are.

We should think of WITSML documents the same way. If I insert a WITSML version 1.20 well document, it's reasonable to say that anyone retrieving that document should get the version 1.20 document -- not the contents of that document mapped -- possibly with losses or errors -- to version 1.30. For the same reason, it was a mistake to require WITSML servers to perform units of measure transformations for a client.

That said, it is still possible, but not required, for web servers to perform media type transformations, using content negotiation. If the server has several different formats in which it can deliver the content, it can supply these choices to the client. That would be an appropriate way for mutually consenting clients and servers to agree on the format of a returned document. Yet another idea from web architecture we should incorporate into WITSML (cf. WITSML+REST).

Point: We should be thinking about documents, not models, as the resources we are manipulating on the server.

0 Comments:

Post a Comment

<< Home