WebService DataBase

Data Persistence as a Web Service

 

Imagine all you had to do to store and retrieve data in object form was to have:

 

Object obj = new Object();

obj.store();

 

and all the gory details about how it is stored could be ignored (sort of). In the java world and to some extent the .Net world you could use hibernate as it does a good job of solving the O/R Mapping problem. However it is still a not an ideal solution from a programmer perspective because its not transparent and can clutter up your business logic to some degree with all the DAO (data access objects) you need to write.

 

Would it not be great to take the approach that DB4O took with their object database (www.db4o.com) with their tiny footprint object database engine you can almost transparently persist and retrieve your objects. But its a little awkward to setup access to a shared version of the database. (see the db40 documentation for an explanation) After reading how it works think about how you might achieve this for a web application that has separate helper processes running on remote machines accessing the same database file?

 

It would be great to be able to have a database as a web service. A web service that allowed you to simply send a package of data and store it, retrieve it thought some criteria and filter, delete it and merge it seamlessly with other data available in its context.

 

What if the language of the transaction was simple and contained only two chunks of information:

 

  1. The object data itself (ie:

      1. String baz = “some string”;

        Integer yo = 103423;

    1. class foo extends object{

      }

  2. The meta data about this object:

      #GRAPH:{parent=object}

      #SUBGRAPH:{ child[0]=baz:type=String

child[1]=yo:type=Integer}

#OBJECTHASH:{234j23rjasxcmq023ejdmxaom3dkrj23r}

 

This would represent a self descriptive object that could be stored and indexed. Ah, but now comes the clincher. What if you have an object graph that needs to be stored and has interdependencies etc. Well thats a bit of an implementation detail but it would not be unreasonable to predict that some form of Meta-Meta-Data could form the foundation of the storage mechanism. If you take a look at the RDF standard it defines a way that definitions of “things” can be referenced by other “things” and this forms the basis of the Semantic web theory. I think that it would be possible to apply the same principals against the storage and retrieval with in a limited score with unbounded parameters. What I mean by this is that it would run off one system (limited scope) but its data constraints would be limitless (unbounded). I think also that this can be achieved using some combination of strongly typed languages and weakly typed languages.

More to come as I think about this some more…

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.

%d bloggers like this: