These are chat archives for atomix/atomix
We are no longer monitoring this channel, please join Slack! https://join.slack.com/t/atomixio/shared_invite/enQtNDgzNjA5MjMyMDUxLTVmMThjZDcxZDE3ZmU4ZGYwZTc2MGJiYjVjMjFkOWMyNmVjYTc5YjExYTZiOWFjODlkYmE2MjNjYzZhNjU2MjY
I'd like to set up a service that can dole out monotonically increasing numbers. This seems trivial to build on top of atomix using a DistributedLong, but I'm worried about overall throughput of the DistributedLong since I'm planning to request new numbers from this service with very high frequency. My existing implementation uses a leader-aware filter to accept requests only on one replica (that is the leader) and to hand out numbers only from the leader -- I check leadership before responding to a request. Since I want my numbers to be persistent, I also request a pool of numbers to hand out (by setting a new ceiling in my persistence layer), so I can hand out those numbers quickly.
It's not too hard to set up a similar leader-aware-filter that wraps my DistributedLong, and then use the DistributedLong to capture the ceiling of values I care about by listening for an election and determining if a particular replica is in fact the leader of the group, and turning on/off the filter.
This gives rise to a couple of questions I'm hoping you might be able to answer/point me to docs on: