The point is missed

Museum of public mistakes and unfinished projects

Storing objects

leave a comment »

Those who know me professionally probably know that I hate relational databases… Those who know me a bit better know that I don’t really hate databases but I think that they are overused and a whole lot of applications could very well do without them, in fact they would be easier to write if it was not for the sometimes awkward process of mapping objects to relational data.

While looking for useful alternatives I ran into ozone that I even contributed some code to (nothing core, just tidied up the proxy generator a bit). I toyed with ozone a bit and while fast and fun I felt it did not support evolutionary design very well, I may be wrong but to me it seemed that with ozone due to the nature of it’s persistence-technique (java serialization) changing the design of your persisted data would give you quite a few marshaling headaches. I’m sure there are ways around that but to me agility does not seem to be very high on the ozone priority-list.

Recently at the Swedish pharmacy we came up with a way around the EJB marshaling errors. We essentially built a data-structure that was loosely typed for serializing and upon reception was used to rebuild the strongly typed object structure on the receiving end, this was all handled transparently from the client and server by using dynamically generated proxies. This opened up a world of possibilities for us, the server and the client no longer needed to have the same set of classes. If a field was added in the server side class the client did not need to be updated unless the new field had to be used. We started tasting the sweetness of duck typing… I think if ozone would have a loosely typed persistent state similar to our transport the persistent design would be much easier to evolve.

Lately I have been thinking about what it would mean to have an object oriented database written in a dynamically typed language like Ruby. I can see some advantages especially when distributing classes from the client to the server. I think that there would also be some advantages in portability, for instance JRuby would make the persisted data available from Java. Further on the data could probably be managed more easily since there would be a natural query language, Ruby, that would not need compilation and distributing of binaries to the server before they could run. Performance would probably be acceptable but how can I know?

I think I will start toying with something simple, Ruby-mine will be the working name and we will see how far it goes.

Written by johlrogge

July 17, 2007 at 12:03 am

Posted in Objects, Ruby

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

%d bloggers like this: