Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Hibernate OGM: Why, What, How

Hibernate OGM: Why, What, How:

Very good post by Emmanuel Bernard on the Hibernate blog explaining why Hibernate OGM was created, how it works, and what the plan is.

Why Hibernate OGM

At JBoss, we strongly believe that provided tools become available, developers, applications and whole corporations will exploit new data usage patterns and create value out of it. We want to speed up this adoption / experimentation and bring it to the masses. NoSQL is like***** for teenagers: everybody is talking about it but few have actually gone for it. It's not really surprising, NoSQL solutions are inherently complex, extremely diverse and come with quite different strengths and weaknesses: going for it implies a huge investment (in time if not money). (One of) JBoss's goal is to help lower the barrier of entry and Hibernate OGM is right inline with this idea.

This sounds like the expanded version of what I was writing about Spring Data. Both Spring framework and Hibernate have been accepted inside enterprises for a long time now. If they start providing integrations with NoSQL databases, then the enterprise teams will not have to go through the long acceptance cycles anymore.

How Hibernate OGM Works?

Entities are stored as tuples which essentially is a Map where the key is the column name and the value is the column value. In most cases, the property is mapped to a column but this can be de-correlated (@Column). An entity tuple is accessible via a single key lookup. Associations as a bit trickier because unlike RDBMs, many NoSQL stores and Grid specifically do not have build-in query engines and thus cannot query for associated data easily. Hibernate OGM stores navigational information to go from a given entity to its association information. This is achieved by a single key lookup. The drawback here is that writing requires several key lookup / update operations.

The post provides more details about how Hibernate OGM plans to address the mismatches between the object world and NoSQL storages, but also those between NoSQL storages and the JPA specification. Worth keeping in mind is that even if Hibernate OGM will bring the JPA standard to NoSQL databases, there will be many limitations to what can be done due to the different natures of the models involved. More advanced projects will probably need custom serializers/deserializers, special query implementors, etc.

The future of Hibernate OGM

  • support for other key/value pair systems
  • support for other NoSQL engine
  • declarative denormalization: we have focused on feature so far, performance check and association denormalization is planned)
  • support for complex JP-QL queries including to-many joins and aggregation
  • fronting existing JPA applications

Hibernate OGM has a long way to go. The list of NoSQL databases Spring Data integrates with is longer for now: Redis, Riak, Neo4j and a couple more.

Original title and link: Hibernate OGM: Why, What, How (NoSQL database©myNoSQL)

Source Article
Comments
0
Be the first to comment

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect
avatar
Tags: emmanuel bernard, query engines, enterprise teams, spring data, spring framework, column name, storages, tuples, integrations, usage patterns, tuple, strengths a
Hibernate in Tomcat
Apr 2, 2011
Hey guys, I tried to explore a bit the possibility of hibernate in tomcat, but some things aren't that clear for me. Before hitting the specific questions, please explain what is hibernate in Tomcat, when do we want to use it, how do I use it…

Commented: (CLK-532) Hibernate example webapp
Jul 17, 2010
[ https://issues.apache.org/jira/browse/CLK-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889547#action_12889547 ] Gilberto C Andrade commented on CLK-532:

Cayenne vs Hibernate Comparison
Sep 5, 2010
Hi, I am again responsible for making a cogent Cayenne vs Hibernate Comparison. Before I "reinvent the wheel" so-to speak with a new evaluation, I would like to find out if anyone has done a recent and fair comparison/evaluation (and has…

JPA and Hibernate Annotations Integration
Jan 6, 2011
Hi all, I tested the Java PLAY Framework which has an interested approach, especially in the data model. It integrates JPA and Hibernate annotations. So it is easy to concept the application, you create beans and automatically, it creates…

can this be used as second level cache with hibernate
Nov 12, 2010
Our appliation uses hibernate and ehcache as second level cache. Ehcache do provide for replication but I we are evaluating some alternatives and I want to know if memcached be used as distributed second level cache with hibernate? If this can be…

Re: Cayenne vs Hibernate Comparison
Sep 29, 2010
Ok, so, t5c doesn't depend on resin-hessian directly; cayenne-rop does. Since I've done cayenne dev work, I already had the dependency. Are you using tapestry-cayenne-server, or tapestry-cayenne-client? server shouldn't need the dependency at…

What is best way to osgi-ficate hibernate?
Dec 18, 2010
Hi, I know there are a lot of discussions on this topic. It seems extension bundles are the answer to this kind of problems, right? How about the hibernate provided by springsource? What strategy they use? Is there any conclusion on this problem?…

Spring/Hibernate and transactions
Dec 1, 2010
I have a simple route that receives messages, converts them to an @Entity class and attempts to write the data to a database. I would like to use Spring/Hibernate to perform this task along with a TransactionManager. I have been reading through…

Derby + hibernate & import.sql
Nov 27, 2010
Hi. I have a strange problem with Hibernate and Apache Derby. I am trying to load the import.sql file and run it against a Derby db. My hibernate.cfg.xml file looks like this: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE…

Re: Cayenne vs Hibernate Comparison
Sep 29, 2010
This is what I got, but mind I am behind company nexus - I'll try at home with clean local repo. Missing: