[hibernate-dev] Hibernate OGM
sanne at hibernate.org
Wed May 11 09:38:49 EDT 2011
thank you I'm having a look and will comment more on github directly.
A first comment: I see that a big part of your patch is about
replaceing "Cache" with "ConcurrentMap" and renaming variables to be
consistent with this change; at the same time in the JSR-107 forum it
seems that everybody is agreeing on *not* extending Map, while there's
going to be something similar to a Map, this is going to be called
"Cache", so I'd stick with our current name.
I understand this is a bit in flux now and nothing is cast in stone,
but at the moment it would be better to keep your patch smaller and
avoiding these conversions, or at least keeping these refactorings as
a separate commit.
The plan is to build the first version of queries on top of Hibernate
Search, so basically that's already an abstraction on top of any "Grid
implementation" and it should work fine with EHCache as well; Lucene
won't be able to solve all use cases though so for some cases we'll
need to tap into special functionalities offered by the grid provider,
but that's going to be a second step. Suggestions welcome of course!
As far as the "skip locking" pattern, that's currently the way to
build a sequence generator on top of Infinispan, in case of EHCache
you might want to suggest a totally different approach, I'd expect
that this should be an implementation detail at the dialect level, not
necessarily common code.
2011/5/11 Alex Snaps <alex.snaps at gmail.com>:
> I've taken some time and, in an attempt to port Hibernate OGM to use Ehcache instead of Infinispan, abstracted it from Infinispan.
> As the doc on that task states, I've made all calls use ConcurrentMap (rather than Map actually). I had a little trouble understanding the "Skip locking proposed by Sanne" in OgmTableGenerator.doWorkInCurrentTransactionIfAny, so that this does a simple Map.get now (that might have been a specialization for a Dialect, but couldn't understand what it was all about).
> And finally introduced a new hibernate.grid.manager prop to instantiate the proper provider...
> The changes are available here:
> Hope that can be made useful… I also wanted to start looking into queries next. But I'll send another mail on that later.
> Alex Snaps <alex.snaps at gmail.com>
> Senior Software Engineer - Terracotta
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
More information about the hibernate-dev