The Artima Developer Community
Sponsored Link

Java Community News
Sharding Hibernate

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Sharding Hibernate Posted: Mar 22, 2007 4:23 PM
Reply to this message Reply
Summary
The Hibernate project released this week several new sub-projects, including Hibernate Shards that allows Hibernate data to be partitioned across several databases.
Advertisement

Hibernate has emerged as one of the primary Java object-relational data access layers. While a single Hibernate application could access data from multiple databases since the framework's initial release, developers had to create their own frameworks to distribute single logical data sets across several databases. The recently released Hibernate Shards project, contributed by Google, promises to solve that, and offer:

A horizontal partitioning solution built on top of Hibernate Core. When you need to distribute (shard) your data across multiple databases, Hibernate Shards is for you (too much data for a single database instance, regional deployment requirements, etc.) Like all Hibernate projects, Hibernate Shards is released under the LGPL license.

A cursory look at the project's architecture overview document reveals that:

The primary goal of Hibernate Shards is to enable application developers to query and transact against sharded datasets using the standard Hibernate Core API. This allows existing applications that use Hibernate but do not yet need sharding to adopt our solution without major refactoring if and when they do reach this stage.

This also allows application developers who are familiar with Hibernate, need sharding, and are starting from scratch to become productive in a short amount of time because there will be no need to ramp-up on a new toolset. With this goal in mind, it should come as no surprise that Hibernate Shards primarily consists of shard-aware implementations of many of the Hibernate Core interfaces you already know and love.

The Hibernate Session, SessionFactory, Criteria, and Query interfaces are implemented as ShardedSession, ShardedSessionFactory, ShardedCriteria, and ShardedQuery. These implementations,

Serve as a sharding engine that knows how to apply your application-specific sharding logic across your various data stores. We don't expect application developers to need to write much code that knowingly interacts with these interfaces, so if you do find yourself declaring or passing around Sharded instances take a step back and see if you can make do with the parent interface instead.

What techniques do you use to scale up the database layer of your enterprise application?

Topic: More Ajax Anti-Patterns Previous Topic   Next Topic Topic: JUnit 4.3 Released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use