تمرین ۱ — معماری یک فروشگاه آنلاینExercise 1 — an online shop’s architecture
مرجع داده، مشتقها و انتشار تغییر، مسئلهٔ واقعی طراحی است؛ صرف نامگذاری اجزا عمق کافی ندارد.Record and derived data are useful, but classification alone is too shallow.
نسخهٔ بازبینیشده برای مصاحبهReviewed interview brief
فروشگاهی را طراحی کن که سفارش را ثبت میکند و کش، جستوجو، گزارش و پیشنهاد محصول دارد. مرجع هر واقعیت را مشخص کن. اگر سفارش commit شود ولی انتشار رویداد شکست بخورد چه میکنی؟ قرارداد تازگی هر نما، مسیر بازسازی و هزینهٔ حداقل معماری را توضیح بده.Design order storage and its cache, search, reporting and recommendation views. Explain commit-without-publication, freshness contracts, rebuilding and minimum cost.
معیار پاسخ خوبWhat a good answer demonstrates
- مرجع و مشتق را برای هر واقعیت جدا میکندAuthority per fact
- dual write، outbox/CDC و idempotency را تحلیل میکندAtomic publication and idempotence
- برای تازگی و بازسازی معیار قابل سنجش داردFreshness and rebuild criteria
پیگیری مصاحبه:Interview follow-up: اگر مشتری بلافاصله بعد از ثبت سفارش آن را در جستوجو نبیند، تجربهٔ کاربر را چطور حفظ میکنی؟How do you preserve the user experience if a new order is not yet visible in search?
آزمایشگاه تکمیلی · زمان تقریبی ۳۰–۶۰ دقیقهExtended hands-on laboratory · estimated 30–60 minutes
برای این اجزا مشخص کن هرکدام system of record است یا derived و چرا: پایگاه داده سفارشها، کش وضعیت سفارش، ایندکس جستوجوی سفارشها، گزارش ماهانه فروش، مدل پیشنهاد محصول. بعد بگو: با ثبت سفارش جدید، کدام سیستمها باید بهروز شوند و مکانیزم انتشار چه باشد؟
For each of these, decide system of record or derived and why: the orders database, the order-status cache, the order search index, the monthly sales report, the recommendation model. Then: when a new order lands, which systems must update, and by what propagation mechanism?
برای یادگیریِ عمیق است؛ انجام کاملش در زمان بحثِ مصاحبه انتظار نمیرود.The full laboratory is optional depth work and is not expected within the discussion time.
ارزیابی، سطح و شواهد این تمرینAssessment, level and evidence · حل آموزشی این تمرینWorked solution · Amazon · SDE III interview preparation · Debezium · outbox event router