What is Quartz?
Quartz is
The Lightweight, Open Source, Enterprise-class Job Scheduler for Java. For years Quartz has put the "When" in Java applications via it's full featured scheduling capabilities. As a result, from Spring to JBoss, Quartz is embedded in just about every major Java product. Quartz is extremely robust and full featured providing things like HA, Transaction Support and all the precise guarantees one needs to assure reliable Job execution.
Terracotta has done a number of incremental improvements since taking over stewardship of Quartz. We've been evolving Quartz one step at a time while collecting what features the Quartz community were really interested in.
Quartz 2.0 is the realization of those user requested features!
"What" "When" and "Where"
Let's step back a bit and review where Quartz fits in the Terracotta world view. As most people know
Terracotta is focused on adding Snap-in performance to JVM based applications through Scale-out (
Terracotta Server Array), Scale-up (
BigMemory) and Speed-up (
Ehcache). We do this while maintaining our goals of
simplicity,
predictability, and
density (can your datastore hold 2 billion entries per node in-memory?) throughout our product line. We view this data layer scaling layer as solving the "What" or the data problem of an application. But when going from 1 to many nodes that's just the first of two major scale points.
Up until now, Quartz Scheduler has been solely focused on the "When" part of code execution. Making sure "code execution" happens exactly "When" it's supposed. It has been pretty much ubiquitous in that space with literally 100s of thousands of users. While it Scaled-out with JDBC and Terracotta, it gave precious little control over where jobs execute.
With
Quartz Scheduler 2.0 we've now added that "Where." This is about where code executes. Instead of randomly choosing a node for job execution in a scaled-out architecture you can now create constraints that help make the decision based on "Where" it should be executed. You can do this based on:
- Resource Availability - CPU available, Memory Available, custom constraints
- Ehcache's data locality - Bring the work to where the data is
- Static allocation - Just decide where it goes
This gives Terracotta the ability to Snap-in and handle both the major scale-out points.
What's new in Quartz 2.0
The simple answer is A LOT!
- Easy to use Fluent API - Quartz 2.0 has a new, easy to use fluent interface that hides the complexity of building out the description of your jobs behind a simple description of what you want to happen and when. I wrote a short blog about this when it was in beta.
- Quartz "Where" - Constraint based system for controlling where jobs execute based on things like CPU and Memory usage, OS, and Ehcache data locality
- Quartz Manager - A flash based GUI console for managing and monitoring your scheduler in production.
- Batching - Helps improve a schedulers throughput by allowing one to make trade-offs between perfect time execution and benefiting from batching.
- Ton's of bug fixes and features - Lots of long requested features. Check out the link for the list.
Quartz 2.0 Is Now GA
Quartz 2.0 makes a big leap in usability, power, visibility and management and it's NOW GA. We did this while maintaining Quartz's reliability and predictability. We focused on making sure existing users would have an easy time moving forward so
check out the migration guide if you need help. It really is the next generation of Quartz. Give it a try and give us feedback as we are constantly working to make things better!
More Reading