Greater Nebraska Software Symposium - April 4 - 6, 2008 - No Fluff Just Stuff

Alex Miller

Greater Nebraska Software Symposium

Omaha · April 4 - 6, 2008

You are viewing details from a past event
Alex Miller

Sr. Engineer with Terracotta Inc.

Alex Miller is a Sr. Engineer with Terracotta Inc, the makers of the open-source Java clustering product Terracotta. Prior to Terracotta, Alex worked at BEA Systems on the AquaLogic product line and was Chief Architect at MetaMatrix. His interests include Java, concurrency, distributed systems, query languages, and software design. Alex enjoys writing his blog at http://tech.puredanger.com and has spoken at a number of Java user group meetings and conferences.

In St. Louis, Alex is responsible for founding the Lambda Lounge, a user group for the study of functional and dynamic languages.

Presentations

Java Concurrency Idioms

This presentation will look at the many new additions in Java 5 and 6 for concurrent programming such as Atomics, Locks, synchronizers, and concurrent collections. In particular, we will be looking at common concurrency idioms around locking and access to shared state, thread coordination, thread pooling, and work execution. Each of these topics will be presented with code examples demonstrating common idioms and the usage of these new concurrency primitives.

Java Collections API

Did you know that Java 5 and 6 added 8 new interfaces and 16 new collection implementations to the JDK, more than doubling the size of the collection API? Collections 201 gives you an update on all of the interfaces, implementations, and utilities and gives you guidance on picking the perfect collection. In particular, Java 5 introduced a new major collection type Queue and a whole new java.util.concurrent package with data structures optimized for concurrent use.

Design Patterns Reconsidered

The Design Patterns book launched a revolution in object-oriented design and provided a vocabulary for OO developers to communicate their ideas. However, in some cases, patterns used blindly can lead to awkward, confusing, or hard to maintain code. It is time for some common patterns used in Java to be reconsidered so that we can derive the benefits from patterns while minimizing their concerns.

This talk will re-evaluate key patterns like Singleton, Template Method, Visitor, and Proxy. These patterns have downsides and in some cases, do more harm than good. Examples of each pattern will be give in Java and examined for clarity, testability, and flexibility. Important problems will be discussed and examples of alternate solutions will be given.

Exploring Terracotta

Terracotta is an open-source Java clustering technology. It creates a virtual, durable Java heap that is shared across a cluster of Java Virtual Machines. This is done by dynamically instrumenting bytecode at load time to intercept calls to read and write fields, and also to enter and exit monitor locks. Information about these calls is then transmitted to the Terracotta Server (which can also be clustered) and out to other nodes in the cluster as needed. The advantage of this approach is that many Java programs can be clustered without code changes by providing just external Terracotta configuration. Many performance optimizations are performed to minimize communication and locking costs. Terracotta is commonly used for session sharing in web applications, distributed caching, and distributed workflow processing.

This presentation will give an overview of the Terracotta technology, how it's implemented, and common use cases that can benefit from the technology. We will look at some code and cluster some Java applications during the presentation.

Cluster your Cache with Hibernate and Terracotta

Terracotta (an open source technology) provides a clustered, durable, virtual heap. You can reduce the load on your database by allowing Terracotta to handle sharing and persistence of temporary conversational state in your web application. One option is to simply cluster your existing Hibernate L2 cache (for instance with ehcache).

A higher performance option is to disconnect your POJOs from the Hibernate session and manage them entirely in Terracotta shared heap until they are ready to be written back to the system of record. This option can yield extremely high performance while simultaneously reducing the load on your database, allowing you to scale your system with significantly less hardware.