A coordination service for ConstructR that uses Zookeeper as the distributed data store.
Helper for extracting Zookeeper nodes configuration from ActorSystem
settings.
Helper for extracting Zookeeper nodes configuration from ActorSystem
settings.
First, tries to get comma-saparated list of nodes from String
settings,
if not found then falls back to parsing List
of strings.
A coordination service for ConstructR that uses Zookeeper as the distributed data store.
The locking mechanism is using the InterProcessSemaphoreMutex lock from the Apache Curator library in combination with an additional lock file to store the TTL.
Zookeeper does not support the concept that keys can expiry based on a TTL. Therefore, this implementation is using Instant to represent a TTL. The instant value is stored inside the key as a data object. It is stored in Zookeeper as milliseconds, converted to a byte array and then encoded as a Base64 string. The TTL in milliseconds represents the time elapsed since 1970-01-01T00:00:00 UTC. Because TTL value is always converted into the UTC time zone, it can be safely used across different time zones.