Java Concurrency Part 3 – Thread Pools

One of the most generally useful concurrency enhancements delivered in Java 1.5 was the introduction of customizable thread pools. These thread pools give you quite a bit of control over things such as number of threads, reuse of threads, scheduling and thread construction. Let’s review these. First, thread pools. Let’s dive right into java.util.concurrent.ExecutorService, which … Read more

Java Concurrency Part 2 – Reentrant Locks

Java’s synchronized keyword is a wonderful tool – it allows us a simple and reliable way to synchronize access to critical sections and it’s not too hard to understand. But sometimes we need more control over synchronization. Either we need to control types of access (read and write) separately, or it is cumbersome to use … Read more

Java Concurrency Part 1 – Semaphores

This is the first part in a series that we’re going to be doing on Java concurrency. Specifically, we are going to dive into the concurrency tools built into Java 1.5 and beyond. We’re going to assume you have a basic understanding of synchronization and volatile keywords. The first post will cover semaphores - specifically counting semaphores. … Read more

When to use Pessimistic Locking

There are cases where we need to use a pessimistic locking strategy. While optimistic updates are an absolute minimum, we deploy a pessimistic locking strategy into a carefully thought out design. We use pessimistic locking strategies in two primary cases: As a semaphore to ensure only a single process executes a certain block of code … Read more

Optimistic Updates and Transaction Isolation

While we at Carfey Software prefer to run our transactions using READ COMMITTED isolation level, we have taken steps to ensure that our optimistic updates using a version column will work even with READ UNCOMMITTED. How does READ UNCOMMITTED impact optimistic updates? You might start to see that it is the dirty reads, or reads … Read more

Database Concurrency

As previously discussed, the database is a crucial component of our new scheduler and for most business systems. With an appropriately designed data model, well written SQL and well-thought out transaction lifecycles and their makeup, most database implementations will provide little cause for complaint, even with many concurrent requests. But you need to think carefully … Read more

Integrating Java with Scripting Languages

Here at Carfey, we’ve used Java’s native scripting API in our upcoming job scheduler to allow our clients to deploy new scripts at any time they wish, without redeploying their applications. Combined with our advanced configuration support, we think we’ve found a killer combination of flexibility and power. The scripting API was outlined in JSR … Read more

Twitter

Follow us on Twitter! You can track availability of new software and our releases and find out about features we add. We’ll also post anything that interests us in software, particularly in the Java space. We’d love to field your questions and feature requests.