Monday, May 31, 2010

Escape from the ORM Hell

Huge software systems which use a certain technology can be a good indicator that the technology is "enterprise ready". I mean really huge systems. Many hundreds of thousands and even millions LOC. A weak technology simply doesn't allow a system to grow to the desired size.

Evangelists of functional programming sometimes refer to large Erlang projects as an evidence of the viability of the functional paradigm in the enterprise. I don't put into question capabilities of functional languages. But Erlang's examples prove only the viability of "Message Oriented Architecture" for big projects. In this case the merits of "actors" outweigh the merits of the functional paradigm in times.

I thought so until recently. But now I see one more factor, which plays a role in the huge Erlang's projects. I mean the persistency layer. Erlang has a database management system called Mnesia. The database allows to store "native" Erlang data structures. Thus Mnesia shrinks gap between Erlang data types and database data types. Knowing how much work ORM requires in traditional enterprise application, Mnesia can save a lot of effort. Mnesia's native approach seems to be convenient and cost-effective.

It can be concluded that this feature of Erlang (an ability to directly map data structures of a functional language on a database independently) might be useful for other functional languages.

Moreover it can be seen as an opportunity to escape from the ORM hell of traditional architectures.

No comments:

Post a Comment