Design pricing / product comparision system.
MediumImagine we're building a system that allows users to compare products from different vendors based on various pricing strategies. This isn't just about displaying the cheapest option; we need to account for promotions, discounts, shipping costs, and potentially even user-specific pricing tiers. We aim to provide a flexible and extensible system where new pricing strategies and product attributes can be easily added without disrupting the existing codebase. Furthermore, the system should efficiently handle concurrent requests from multiple users comparing products simultaneously. We need to ensure data integrity and prevent race conditions during pricing calculations. The core challenge is to design a robust and maintainable system that adheres to SOLID principles and allows for future expansion of pricing models and product features.
Requirements
Think like an Architect
Before revealing the requirements, imagine you're in the interview right now."How would you clarify the scope with your interviewer?"