Nelz's Blog

Mah blogginess

JavaOne - Wrap Up (Entry #1)

TS-7496 Maven for the Enterprise

This was mostly a case study of what Jason Van Zyl was able to achieve in a Maven deployment at a large enterprise site.

For me, since I’ve already played around with Maven a bit, this session didn’t present much new information. However, Jason did say that it is easy for a new Maven-ite to stumble when doing a conversion. He recommended that people new to implementing Maven first start on a new project before tackling a conversion.

Personally, I think I am deep enough into the Maven philosophy that I could do a conversion now, but I just gotta get a "go ahead" from my current work.

TS-4746 Hibernate Search

I really liked this session. (Well, I guess the session itself was okay, but I love the technology that it presented.)

Basically, there is a new project at that incorporates Lucene’s strengths with Hibernate’s strengths.

The problem that this project is solving is the impedence mismatch between Java, which deals in objects, and Lucene, which deals in records or documents. In this case, Hibernate Search is acting as the translation between these two paradigms, much like Hibernate itself acts as the translation between relational db’s and the object world. (There are even pretty cool mechanisms for weighting different types of info, and optionally even look for misspellings (WOW!))

The presenter even did a demo, which worked really well. I’m not going to recreate it here, I’ll let the Hibernate Search documentation take care of that for me. Instead, I will speak about some of the scaling issues.

As a base use case, you can have Hibernate trigger updates to the Lucene indexes. This starts to fall apart when you talk about clustering or when Hibernate apps are not the only things writing to the db (as is the case at my work right now). So, the recommendation becomes asynchronously generating the index on the fly, and copying the document to the "client" machines so they can refer to the newly-refreshed copy of the index. This introduces a bit of latency between updates and the updates being available in search. (For the most part this should be acceptable, but there may be a couple of situations where it wouldn’t be…)