This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

How to schedule multiple Java jobs to concurrently manipulate the same set of Cassandra data?

Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to implement a scheduler for running a periodic job. There is a table in a Cassandra database in which one column contains the creation time-stamps of rows and another column contains the status which is "open" by default. I need to create a job which should run periodically in every 10 minutes and query Cassandra to find out whether any rows with the "open" status are 5 or more days older. If so, the job should then change the status of all such rows from "open" to "closed". That's it.

The above seemingly simple problem is part of a large industry-strength OSGi application and I have been asked to pick the best 3pp option among:

1. Apache Quartz
2. Apache Sling
3. Apache Zookeeper

My challenges are:

1. There will be multiple instances of the application (and, therefore, multiple instances of that periodic job) running on multiple JVM's in the live environment interacting with the same Cassandra database with thousands of rows. [Do I need to handle concurrency from my Java code?]
2. I know Quartz does not guarantee persistence but do I really need it in my case?
3. Which of the 3pp solutions (Quartz, Sling, Zookeeper) can I use?
Oh the stink of it! Smell my tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!