Enable javascript in your browser for better experience. Need to know to enable it? Go here.
Published : Mar 29, 2022
Mar 2022
Assess ? Worth exploring with the goal of understanding how it will affect your enterprise.

Executing a scheduled task once and only once in a cluster of distributed processors is a relatively common requirement. For example, the situation might arise when ingesting a batch of data, sending a notification or performing some regular cleanup activity. But this is a notoriously difficult problem. How does a group of processes cooperate reliably over laggy and less reliable networks? Some kind of locking mechanism is required to coordinate actions across the cluster. Fortunately, a variety of distributed stores can implement a lock. Systems like ZooKeeper and Consul as well as databases such as DynamoDB or Couchbase have the necessary underlying mechanisms to manage consensus across the cluster. ShedLock is a small library for taking advantage of these providers in your own Java code, if you're looking to implement your own scheduled tasks. It provides an API for acquiring and releasing locks as well as connectors to a wide variety of lock providers. If you're writing your own distributed tasks but don't want to take on the complexity of an entire orchestration platform like Kubernetes, ShedLock is worth a look.

Radar

Download Technology Radar Volume 26

English | Español | Português | 中文

Radar

Stay informed about technology

 

Subscribe now

Visit our archive to read previous volumes