This content has been marked as final. Show 1 reply
I've implemented something similar in my application. It's actually pretty easy and very performant if you use the distributed executor framework. Here are some rough guidelines:
- You assuredly will either need a lock/increment/release pattern to get counter values. However, if you execute a task on the data owner, you're acquiring local locks.
- You will need to look at the cache configuration options for eager locks.
- You may want to consider allocating "chunks" of possible counter values for your clients to use locally. This will reduce contention on the cache, while guaranteeing uniqueness.
- (Don't forget about overflow conditions)