Saturday, May 31, 2008

Introducing hibernate-memcached

Some of you may, or may not (care), know I am a huge fan of memcached. Its combination of simplicity, elegance and performance make it fantastic choice for any real caching solution.

I've recently begun work on implementing a bridge for using memcached as a second-level cache for hibernate. The project is hosted at googlecode right now, and the code is currently available in the googlecode hosted subversion repositories. In the future I'll probably move it over to github, but subversion is much more accessible to the public at large still.

Adding hibernate-memcached to your hibernate based application is as simple as adding hibernate-memcached.jar, memcached.jar, and spy.jar to your classpath. This can also be done using Maven.

Enabling the hibernate-memcached cache is simple as adding two properties to your hibernate config.

hibernate.cache.provider_class=com.googlecode.hibernate.memcached.MemcachedCacheProvider
hibernate.memcached.servers=server1:11211 server2:11211

Property #1 tells Hibrnate to use the MemcachedCacheProvider. Property #2 tells the MemcachedClient in use what servers to use for the cache. It really is as simple as that.

There are many other configuration properties available to configure things like the default and per-region cache times, operation timeout, hash algorithm to use, and what key strategy to use.

The hibernate-memcached cache is working great for both individual entity caching and query caching. I currently have a lot of work to do around getting documentation up on the googlecode site. It is ready to play with and easy to setup, if anyone out there has the time to check out; please do! If you run into any questions or problems you can post them on the hibernate-memached google group, or open an issue at googlecode.

Thursday, May 22, 2008

SAP Memory Analyzier

I know nothing about SAP, but they built a nice memory analyzer worth checking out.
Check it out

Wednesday, May 21, 2008

Scalability Principles

Author Simon Brown discusses 7 principles of scalability.

1. Decrease processing time
2. Partition
3. Scalability is about concurrency
4. Requirements must be known
5. Test continuously
6. Architect up front
7. Look at the bigger picture

Check it out

Friday, May 16, 2008

David Heinemeier Hansson at Startup School 08

David Heinemeier Hansson, creator of the Ruby on Rails framework and Partner at 37Signals gives insight into creating a profitable startup company.
Watch it

Wednesday, May 14, 2008

Better World Books

I found Better World Books a while back by reading a story I don't remember now. I had completely forgotten the name of the site and couldn't find it again, until now. I am selfishly blogging this so I don't have to look for it again :)

That being said, check out Better World Books next time you're looking to by some fat-ass technical book. Their mission statement sums it up pretty well...

Better World Books capitalizes on the value of the book to fund and support literacy initiatives locally, nationally, and around the world.

Thursday, May 08, 2008

Pro Web 2.0 Application Development with GWT

Jeff Dwyer has just released his book on GWT. Jeff is a really bright guy and has done some extensive work with GWT. Aside from that, he's a good guy so throw him a bone and check it out...

Pro Web 2.0 Application Development with GWT

Distributed Version Control

I've recently done some work with git as a source control system. I was pretty impressed by its functionality and the overall concept of distributed version control.

In my career I've been exposed to a rather limited set of version control systems. I've used CVS, Subversion, SourceSafe and Accurev. Each of those systems are based on a central repository with many clients. The concept is a simple client-server model that is very easy to understand.

Git is a "Distributed Version Control" system. This means that everyone effectively has their own repository of the code that they can fork and merge as much as they'd like locally. DVCS systems like git work on a peer-to-peer model. This is a very powerful feature in that if I have some code that you would like to integrate with I can exchange it with you, and you alone. In a VCS system like Subversion or CVS, I would have to commit my changes to the central repository for you and everyone else to get. Sure, I could branch and put my changes there, but merging that back in is a huge pain in Subversion and CVS.

InfoQ just posted a lengthy article discussing Distributed Version Control Systems such as git, mercurial, and bazaar.

Sunday, May 04, 2008

SpringSource Application Platform Details

Last week SpringSource announced their Application Platform project. It is an interesting attempt at slimming down the J2EE environment by tying things like Spring and OSGI together. On the SpringSource Team Blog, Rob Harrop begins an in-depth explanation of SpringSource Application Platform and it's features. Very interesting stuff...

Thursday, May 01, 2008

Trying to get Git

I'm trying to patch some stuff in the java-memcached-client right now. The code is hosted at GitHub. I've never used Git in my life so this is a brand new experience for me. Boy did I screw this up :P
I've got branches gone wild and accidental reverts. I think I'm starting to get the hang of it now though. Thanks to this cheat sheet, and this tutorial.