Distributed caches common issues and solution idea
In order to build distributed caches, we need to solve the following three problems.
- Cache coherence
- Atomicity
- Crash recovery
Cache coherence
- This can be solved by introducing a lock server.
Atomicity
- Distributed transaction will solve this problem by using a lock server.
Crash recovery
- Write Ahead Log mechanism will provide a solution for crash recovery.
- Every operation should have version information to prevent unexpected recovery result such as restoring already removed items.