{ by david linsin }

Showing posts with label hibernate. Show all posts
Showing posts with label hibernate. Show all posts

September 28, 2009

Tuning Hibernate and JPA @ JUG-Ka

After two sessions on client development, we are now turning our attention to the server side again. I'm very happy to welcome Michael Ploed from Senacor Technologies AG to talk about "Tuning Hibernate and JPA Applications" at the Java User Group Karlsruhe.

Michael will show us how to approach tuning of your Hibernate powered applications and which options exist, to increase your application's performance. Furthermore he will talk about Hibernate's second-level cache, which I'm looking forward to in particular. Finally, he'll demonstrate his tuning advices with a demo application.

This month we have a special prize in our monthly lottery: a free pass to the W-Jax conference, held this coming November in Munich. All you've got to do is send me an email and be present at the end of the session, when Michael will draw the winner.

The session takes place this Wednesday at University Karlsruhe, building 50.34 in the multimedia room 101, located in the basement. The talk starts at 7pm, a little earlier as usual.

We have more great talks coming up, the next couple of months. In order to get the latest updates, sign up for our Google Group or join us on Xing.

July 03, 2009

Java Forum Stuttgart

Yesterday, I was attending the 12. Java Forum Stuttgart and compared to the last time I went, which was in 2005, the event has really fledged.

The quality of the sessions was good and the hallway was filled with familiar faces. The theme of the conference for me, was JPA and O/R mappers. There were a couple of really great talks about it and it seems like there's a lot of going on in that area at the moment.

I'm definitely gone be there again next year and I would love for the conference to be extended to a 2-3 days event.

December 03, 2006

Compass - A Hibernate Lucene Integration

I've been following the Hibernate Lucene integration plans of JBoss for a while now and I came across the Compass framework, which seems to be very interesting:
The aim of Compass is to simplify the integration of search functionality into any application. Compass is built on top of Lucene using a well defined search engine abstraction. Compass extends core Lucene and adds transaction support and fast updates, as well as the ability to store the index in the database. Also, most importantly, it does not try to hide Lucene's features - all of Lucene's functionality is available through Compass.

The framework consists of a core API, which is similar to the Hibernate API, handling configuration, search engine operations and transactional support. Furthermore it provides a module called Compass GPS aiming at integration with various data sources. Among others it provides intgeration with ORM tools like Hibernate.
...Compass introduces two main operations: Indexing and Mirroring. Indexing allows to automatically index the database content using both Hibernate mappings and Compass mappings. Objects that have both mappings will be automatically fetched from the database using Hibernate and saved into the search engine. Mirroring allows to automatically mirror operations done using Hibernate API into the search engine by registering event listeners with Hibernate. This allows to keep the index up to date with any changes done to the database through Hibernate API.

One thing, that I've already been worried about previously, is performance. How does this synchronization perform under heavy load? Another point are transaction boundaries, since there are two data source that need to be updated when performing changes. Does a transaction fail cause your application's Lucene index couldn't be updated?

Though I haven't checked out Compass myself, I believe it extends Lucene in a really cool way. Minimizing the boilerplate code to map your domain objects to Lucene documents is one of these great extensions. Another nice feature is the integration with Hibernate in very transparent fashion, so no additional code is necessary to keep your Lucene index snychronized.

November 07, 2006

Hibernate Lucene Integration


I checked out Hibernate's Lucene integration and I must say it looks quite interesting. The concept it pretty straightforward: An entity is mapped to a Lucene Index, it's properties can be indexed using annotations. Hibernate is taking care of the mapping it self, all you need to do is register an EventListener which is called after a Hibernate event (e.g. an update) occurred.

So far the document only covers creating/updating Lucene indexes. I found an interesting posting on the Hibernate developer mailing list, which points out that there is more to come with Hibernate 3.3. It seems like there will be some kind of LuceneSession object that can be used, among other things, to query a Lucene index. The cool thing is that you can use the native Lucene Query Language and get a Hibernate Query object in return.

This sounds really cool, the only concerns I have are about performance. What if you have a huge index, in terms of a lot of Lucene Documents, how big is the performance impact when storing/updating/querying the index? Let's say you are performing a search with a big result set, how is Hibernate gonna handle that (caching or proxies)? Another issue, when storing/updating a Lucene Index, is how and when is the optimize() method called?

Updates will follow...

October 30, 2006

Hibernate 3.2

A couple of days ago I read an interesting interview over at artima.com with a lead engineer of the Hibernate project. He talks about the new features and the JPA compliance of Hibernate 3.2 GA. Two points he mentioned sounded quite interesting, since I haven't heard of them, though apparently they are not new features of 3.2:

  • Hibernate's Lucene integration
This work is being led by Emmanuel Bernard. It builds on Hibernate Annotations and the event framework of Hibernate Core. The idea is to delegate maintenance of Lucene indexes that are populated based on domain entity state to Hibernate based on persistence events.

Whenever you update or delete or insert a new entity instance, Hibernate fires events in response to these actions which the Lucene integration listeners pick up on and perform any needed actions on the Lucene indexes. The beauty of the whole integration is the simplicity of the solution: you get all this from just a few annotations on your domain classes and a few extra lines of Hibernate configuration for the listener stack.

  • An Antlr-based query translator
...currently working on a slew of new HQL features, such as ad-hoc join syntax and UNION/MINUS queries; this is all being done on top of the Antlr-based query translator we introduced in 3.0.

I'm facing both of these issues in one of my current projects, where we have to keep a Lucene-Index synchronized with the data in a database. This is a fairly challenging problem, where Hibernate 's implementation might be worth a look at. The Antlr-based query translator is quite interesting cause I have to implement a custom search syntax for both queries against a database and queries against Lucene.

I'll might blog about my investigations on these to issues. Write me if you've got experience with either one of these topics.

com_channels

  • mail(dlinsin@gmail.com)
  • jabber(dlinsin@gmail.com)
  • skype(dlinsin)

recent_postings

loading...