Design an concurrent History tracking system where we can store and track history of registered entities. We should be able to onboard service and their entities to our system and start tracking
MediumImagine you're building a collaborative document editing platform like Google Docs, or a sophisticated version control system similar to Git. A core requirement for such systems is the ability to track the history of changes made to a particular entity over time. This history needs to be readily accessible, allowing users to view past states, revert to earlier versions, or understand the evolution of the entity.
This problem focuses on designing a concurrent history tracking system, optimized for performance and thread safety. The system should efficiently store snapshots of an object's state at various points in time and provide mechanisms to retrieve these snapshots based on timestamps or version numbers. The system also needs to handle concurrent updates gracefully, ensuring data integrity and consistency even when multiple threads are modifying the tracked entity simultaneously.
Requirements
Interview Simulation
Experience a realistic interview conversation. The interviewer will ask clarifying questions,and you'll reveal your understanding of the requirements.
Let's start by understanding the scope. What are the core functionalities this system needs to provide?
💡 Interview Tip
Identify the Actors (Who uses the system?) and their Use Cases (What are they trying to achieve?). Start with the 'Happy Path' scenarios.