Archive for the ‘Hibernate’ Category

Introduction to Hibernate Framework

Monday, January 2nd, 2012

Introduction to Hibernate Framework

A series of posts on Hibernate, including:

Hibernate Tutorial Series

You may be thinking to yourself that you saw this posting at a blog aggregation site that rewrites URLs to keep you on their site. Including rewriting URLs so you can’t cleanly point to the first article in a series. You would be correct. The links you see above point to the source of the tutorial material.

If you like this sort of material, presented without trying to capture your browser, please continue to visit my site. Consider supporting it or hiring me in a consulting role (which indirectly supports it).

Hibernate Search with Lucene

Friday, September 9th, 2011

Hibernate Search with Lucene

From the post:

This post is in continuation of my last post – http://blogs.globallogic.com/introduction-to-lucene – in which I gave a brief introduction to Lucene.

There are many Web applications out there to provide access to data stored in a relational database, but what’s the easiest way to enable users to search through that data and find what they need? There are a number of query types that RDBMSs in general do not support without vendor extensions:

  • Fuzzy queries, in which “fuzzy” and “wuzzy” are considered matches
  • Word stemming queries, which consider “take,” “took,” and “taken” to be identical
  • Sound-like queries, which consider “cat” and “kat” to be identical
  • Synonym queries, which consider “jump,” “hop,” and “leap” to be identical
  • Queries on binary BLOB data types, such as PDF documents, Microsoft Word or Excel documents, or HTML and XML documents

Hibernate Search brings the power of full text search engines to the persistence domain model by combining Hibernate Core with the capabilities of the Apache Lucene™ search engine. Even though Hibernate Search is using Apache Lucene™ under the hood you can always fallback to the native Lucene APIs if the need arises.

These posts were written against Hibernate 3.4.1. Just so you know, Hibernate 4.0.0 Alpha2 is out (8 September 2011).

Introduces the basics of Hibernate search.

Biodiversity Indexing: Migration from MySQL to Hadoop

Wednesday, June 22nd, 2011

Biodiversity Indexing: Migration from MySQL to Hadoop

From the post:

The Global Biodiversity Information Facility is an international organization, whose mission is to promote and enable free and open access to biodiversity data worldwide. Part of this includes operating a search, discovery and access system, known as the Data Portal; a sophisticated index to the content shared through GBIF. This content includes both complex taxonomies and occurrence data such as the recording of specimen collection events or species observations. While the taxonomic content requires careful data modeling and has its own challenges, it is the growing volume of occurrence data that attracts us to the Hadoop stack.

The Data Portal was launched in 2007. It consists of crawling components and a web application, implemented in a typical Java solution consisting of Spring, Hibernate and SpringMVC, operating against a MySQL database. In the early days the MySQL database had a very normalized structure, but as content and throughput grew, we adopted the typical pattern of denormalisation and scaling up with more powerful hardware. By the time we reached 100 million records, the occurrence content was modeled as a single fixed-width table. Allowing for complex searches containing combinations of species identifications, higher-level groupings, locality, bounding box and temporal filters required carefully selected indexes on the table. As content grew it became clear that real time indexing was no longer an option, and the Portal became a snapshot index, refreshed on a monthly basis, using complex batch procedures against the MySQL database. During this growth pattern we found we were moving more and more operations off the database to avoid locking, and instead partitioned data into delimited files, iterating over those and even performing joins using text files by synthesizing keys, sorting and managing multiple file cursors. Clearly we needed a better solution, so we began researching Hadoop. Today we are preparing to put our first Hadoop process into production.

Awesome project!

Where would you suggest the use of topic maps and subject identity to improve the project?

Hibernate OGM: birth announcement

Monday, June 20th, 2011

Hibernate OGM: birth announcement

From the post:

This is a pretty exciting moment, the first public alpha release of a brand new project: Hibernate OGM. Hibernate OGM stands for Object Grid Mapping and its goal is to offer a full-fledged JPA engine storing data into NoSQL stores. This is a rather long blog entry so I’ve split it into distinct sections from goals to technical detail to future.

Note that I say it’s the first public alpha because the JBoss World Keynote 2011 was powered by Hibernate OGM Alpha 1. Yes it was 100% live and nothing was faked, No it did not crash 🙂 Sanne explained in more detail how we used Hibernate OGM in the demo. This blog entry is about Hibernate OGM itself and how it works.

Congratulations!

What you did not see at the JBoss World 2011
keynote demo

Wednesday, June 15th, 2011

JBoss World 2011 keynote demo

From the webpage:

Visualizing data structures is not easy, and I’m confident that a great deal of success of the exceptionally well received demo we presented at the JBoss World 2011 keynote originated from the nice web UIs projected on the multiple big screens. These web applications were effectively visualizing the tweets flowing, the voted hashtags highlighted in the tagcloud, and the animated Infinispan grid while the nodes were dancing on an ideal hashweel visualizing the data distribution among the nodes.

So I bet that everybody in the room got a clear picture of the fact that the data was stored in Infinispan, and by live unplugging a random server everybody could see the data reorganize itself, making it seem a simple and natural way to process huge amounts of data. Not all technical details were explained, so in this and the following post we’re going to detail what you did not see: how was the data stored, how could Drools filter the data, how could all visualizations load the grid stored data, and still be developed in record time?

If you follow the link to the video, go to minute 41 for the start. Truly a demo worth watching.

This blog post gives the details behind the demo you see in the video.

Hibernate

Monday, March 7th, 2011

Hibernate

From the website:

Relational Persistence for Java and .NET

Historically, Hibernate facilitated the storage and retrieval of Java domain objects via Object/Relational Mapping. Today, Hibernate is a collection of related projects enabling developers to utilize POJO-style domain models in their applications in ways extending well beyond Object/Relational Mapping.

Interesting factoid from the documentation:

A RDBMS defines exactly one notion of ‘sameness’: the primary key. Java, however, defines both object identity (a==b) and object equality (a.equals(b)).

Unfortunately, neither an RDBMS nor Java define tests for the identity of the subjects they represent. Nor appear to realize that the structures in both are subjects in their own right.

Nhibernate Search Tutorial with Lucene.Net and NHibernate 3.0

Monday, March 7th, 2011

Nhibernate Search Tutorial with Lucene.Net and NHibernate 3.0

From the website:

Here’s another quickstart tutorial on NHibernate Search for NHibernate 3.0 using Lucene.Net. We’re going to be using Fluent NHibernate for NHibernate but attributes for NHibernate Search.

Uses Nhibernate:

NHibernate is a mature, open source object-relational mapper for the .NET framework. It’s actively developed , fully featured and used in thousands of successful projects.

For those of you who are more comfortable in a .Net environment.