lockingsemaphoreorchestrationgeode

Geode DUnit Inter-VM communication


I am implementing geode dunit based tests.Each VM executes Callable asynchronously.The logic is having several steps , between which the VMs need to be synced up. Its not possible to separate them into several different callable s because some variables need to be persisted between stages.

Currently the VMs are doing sleep after each stage and this way the VMs are synced. However i am looking for another option which would allow execution without sleep ( semaphore based ).

Is there an option to have a shared resource between VMs that would allow to sync up the VMs , or may be some geode based mechanism that would allow such orchestration of VMs?


Solution

  • Geode's internal testing framework does this in several places, actually, I'd suggest having a look at the geode-dunit project for examples, specially at the Blackboard java class. Cheers.