Every now and then, I am asked if a JPA for NoSQL JSR should be started. Let me share my opinion on the subject.

In short, probably at some point but certainly not today.

I do think there is something to offering an Object X Mapper for NoSQL engines and Hibernate OGM is proof of my belief but jumping on the standardization wagon is a whole different thing.

Trying to standardize something not mature enough or without practical experience on the subject very often go wrong and for good reasons. Cemeteries are filled with dead cold standards that hurt developers. I am a strong believer in standards and Mark our CTO too. But look at what we did for JPA and Bean Validation: take solid and useful techs and standardize them to improve integration with the rest of the ecosystem. That's the same model we use for the data grid JSR.

In Hibernate OGM, we are barely exploring how to properly map data and discovering interesting possibilities such a layer offers. Now would be a bad time to try and set in store rules. Heck, we might even arrive to the conclusion that such tool turns out not being useful after all.

I am of course open to discuss and exchange on the subject and more than happy to change my mind :) You know where I stand, what's your position on the subject?

28. Jun 2012, 18:23 CET | Link

My experience would tend to suggest that you're right, but that if a 1.0 was kept small, it might not be far off.

Spring Data, for example offers a CrudRepository abstraction, which could work really well if repository implementations made good use of common annotations that are already in use (@Id, @Transient, etc).

There's still plenty of experience to gain though... as you say.

29. Jun 2012, 00:20 CET | Link
Nicolas Geraud

sql is a standard, nosql not. Cassandra, mogndb or neo4j are nosql but for totally different usage and i see standardization of their api as a limitation

29. Jun 2012, 09:41 CET | Link

I'm totally with you Emmanuel. That's a bit too early to go on standardization. Maybe we need to wait still one or two years.

I think NoSQL is currently the Vietnam of computer science ;-).

To be a bit more serious, I was recently attending a presentation by Peter Neubauer : he pointed an interesting fact: basically, what we want with NoSQL is generally performance. So, having a leaky abstraction above it could effectively, as you say Emmanuel, lead to a useless and rapidly dying specification.

01. Jul 2012, 15:28 CET | Link


I see some problem with pick and choosing some annotations as supported and most as not. It gives the illusion of JPA but it's clearly way way far off both that the object lifecycle level and persistence level. So I'm not sure a small but vastly incomplete standard would necessary be helpful.


The idea is not to plan and standardize the product APIs but to standardize how JPA APIs would be used with a NoSQL backend. If you look at JPA today, we don't talk about the Oracle specific SQL etc, That would be roughly the same idea here.


That is true but I am not sure people using NoSQL for raw performance would necessarily use a rich domain for their data. However where I disagree is that NoSQL is used for more than just raw performance, transparent scalability is also a big big part of what people are looking for. It's not that they can't make their relational DB work fast enough, it's more that they have a hard time maintaining a cluster of them and do data sharding.