Enable javascript in your browser for better experience. Need to know to enable it? Go here.
Published : Mar 29, 2022
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar. Understand more
Mar 2022
Assess ?

有一种很常见的需求,是在分布式处理器集群上执行一次定时任务,且只执行一次。例如处理一批数据,发送一条通知,或者执行某个常规的清理操作,都属于这类情况。但是谁都知道这个问题很难,一组处理器如何通过有延迟而且不稳定的网络来实现稳定的协作?这就需要在集群中存在某种锁定机制,来协调这些操作。幸好有很多分布式存储可以实现这种锁定,ZooKeeperConsul 等系统,以及 DynamoDB 或 Couchbase 等数据库都有必要的底层机制来管理集群内部的一致性。ShedLock 是一个小型类库,如果你正在尝试用 Java 来实现自己的定时任务,它可以使你的代码更方便地和上述工具集成。ShedLock 有获得和释放锁的 API,还有各种连接器,可以适配不同工具的锁。如果您正在编写自己的分布式任务,但是不想使用 Kubernetes 这种复杂的重量级平台,ShedLock 值得一试。

Download the PDF

 

 

 

English | Português 

Sign up for the Technology Radar newsletter

 

 

Subscribe now

Visit our archive to read previous volumes