tuxdevelop / spring-batch-lightmin

Spring Batch Administration @ Spring Boot Stack
Apache License 2.0
131 stars 44 forks source link

Distributed Lock with embedded Lightmin Job Schedulers #53

Open manuravi0323 opened 3 years ago

manuravi0323 commented 3 years ago

Scenario

  1. Embedded Lightmin
  2. Component deployed in a cluster with multiple nodes
  3. Job scheduled via Lightmin UI Scheduler

Version Lightmin 2.1.1 Spring Boot 2.2.6.RELEASE

Issue How to tackle distributed locks so that the job is only run in one component? Is distributed lock mechanism not viable for the embedded lightmin version?

tuxdevelop commented 3 years ago

Hi @manuravi0323 ,

the lightmin client itself does not provide clustering. Each scheduler will work on its own.

For this scenario, the server scheduler and server cluster feature (released with 2.1.2) supports clustering and locks. Currently, the project itself provides an implementation for infinispan for the locks and distributed caches. In order to provide an different implementation, e.g. Hazelcast, the LightminServerLockManager interfaces must be implemented.

I hope this helps.