hibernate vs ebean as scalable, performant ORM
Asked Answered
H

3

7

We are going to write a service for which we are trying to evaluate technology stack. So as part of ORM we are thinking of using hibernate but from one of my colleague I came to know abt ebean. But we don't have any idea of ebean.

So my question is: Is there any disadvantage associated to hibernate, any salability or performance bottleneck? And what is the advantage ebean brings to the table?

Hord answered 19/6, 2014 at 19:24 Comment(0)
C
7

What does Ebean bring to the table?

In short with Ebean it brings a full function ORM that is a lot easier to use and most importantly optimize (Well, it is easy but can also be done automatically via profiling).

  • A query language designed to optimise object graph construction via good support for Partial Objects and built in avoidance of N + 1

  • A "Sessionless" ORM ... architected to not have attach/detach semantics (So this makes it easier to use / fast to master).

Ebean now has SQL2011 History support and ElasticSearch integration. You could argue Hibernate has similar features.

Reference links:

Campobello answered 7/4, 2016 at 8:12 Comment(0)
H
2

There are lot of issues with hibernate and basically any implementation of JPA in large and very scalable application. You should consider use another solution at all. Issues are well described in article Large Application Model issues and how model should look like in article Model for large applications.

Helicon answered 5/3, 2015 at 0:9 Comment(0)
C
2

As it is mentioned before, Ebean is sessionless ORM so you don't need to think about sessions. Hibernate has first level cache which is impossible to disable. It means that if you query item through ORM and then delete it directly with SQL, it stays in the cache. You can explicitly clear the cache to get the most updated results from database but unfortunately such behavior may bring errors like "detached entity passed to persist".

Catrinacatriona answered 2/3, 2016 at 8:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.