Interview Question for Software Architects
- 0of 0 votes
Please share your thoughts over this designing question (If you need any more info, pls. do let me know):- SKJ January 20, 2015 in United States
GIVEN: Let's say we have a popular eCommerce site with lots of sellers and millions of products.
The system has a CatalogManager Service which is being called by various seller platforms to update info (attributes) about seller and it's products. For e.g. Seller can say 'Hey, my brand name has changed to New_Brand', 'Hey, My Product P1 weight has changed to 6kg'. The catalog manager service has it's own datastore and cache in place where it goes and update accordingly. Imagine the sclae of these update requests to be very high as we have thousands of sellers and millions of products and each may have 50-60 attributes which could be chaned. The CatalogManager service is able to handle all these updates smartly.
There are various other back-end services (ShippingService, SearchService) in the system who must me notified about these changes in REAL TIME. For e.g. ShippingService must be notified by CatalogManager that 'Hey, Product P1 of seller S1 weight has changed to 6 kg'. Other example, SearchService must be notified that 'Hey, Seller S1 brand name has changed to New_Brand' so that it can change it's index to be searched.
* Design such a system which can scale & is fault tolerant ensuring all edge cases including one mentioned below:-
* Every back-end service may not be interested in all the events. It may only wish to listen subset of attributes. E.g. ShippingService may only want if product dimension related attributes change. So how will you ensure that only related messages reach to consumer services?
* How will you ensure that event message published by producer service (CatalogManager) reacheed to the related consumer service for sure and in REAL TIME?
* How can you ensure the messages passed to backend services are in sync (in order it's important)
* How to ensure that same event is not messaged twice to the consumers? Although, eventually it will result in same data state but still looking at scale of the events this would be a burden to backend system
How would you design such a system?
| Report Duplicate | Flag | PURGE
Software Architect System Design
Interview Type: Phone Interview
Open Chat in New Window