Concurrency handling in configuration store
I need help to handle concurrency with configuration store especially share one. Here are my findings, please help devise a solutions. Thanks
1- I always need to keep a cached copy of configurable items inside my plugin instances apart from config store. Although config store read from in memory but they are not read write synchronized.
2- Mbeans should update config store only. The change events will be propagated to configuration store listeners on each managed server. Inside those config listeners, should the locally cached copies be updated in a controlled and synchronized way.
3- To update a local cached copy, traffic should be stopped first. There should be some kind of mechanism to know currently in flight traffic. Updating of caches should wait for this in flight traffic to complete, but no more in-flight traffic should be allowed. After update, traffic should be resumed.
0