Gridgain leader election pattern
What is the advised approach to ensuring a particular process is running exactly once within the grid? Usecase would be subscription of a single multiplexed stream from a remote source in order to update data across the grid. We need to elect the node to subscribe and elect a new node to subscribe when that node fails. Is there any pre-built pattern for this in gridgain or is it solved by a combination of listening to grid lifecycle events and a distributed CAS operation? Another usecase would be a singleton job that must run forever, migrating to a new node on failure. Thanks. Starting with