app): 3-tier, n-tier, … KI UNIVERSITY LAYERED ARCHITECTURE PRESENTATION BUSINESS LOGIC PERSISTENCE Separation of Concerns? Kind of…(technical separation) – but how do you slice it for business-related functionality?
is reliable. ▸ Latency is zero. ▸ Bandwidth is infinite. ▸ The network is secure. ▸ Topology doesn't change. ▸ There is one administrator. ▸ Transport cost is zero. ▸ The network is homogeneous. Source: https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing
BACKEND C ▸ Parallel fan out: A single slow backend can slow everything down. The more backends are involved, the higher the proportion of upstream service requests that will be slow. ▸ Possible solutions: Caching, sending more requests and using the fastest, timeouts, etc. “The Tail at Scale”: https://dl.acm.org/citation.cfm?doid=2408776.2408794
monolithic web application where users can publish blog posts. The posts are stored in a database (table). Now you want to add a new feature that recommends blog posts to users. ▸ From an architectural perspective, you want to handle the recommendation feature through a new service. How would you design the service and add it to the existing architecture? (Backend Engineering Interview Question – inspired by Medium Engineering)
TABLE RECO SERVICE CACHE ▸ If web app changes storage of posts, reco service needs to adapt. ▸ Logic based on posts data would need to be re-implemented in reco service.
(Async. communication, events) ▸ Isolation of State (Data Ownership, no table sharing, communicate through APIs) ▸ Isolation of Space (Don’t depend on location of other service, support deployment across many machines) ▸ Isolation of Failures (Failure in a service does not bring down whole system) Source: https://corecursive.com/22-big-ball-of-mud-architecture-and-services-with-wade-waldron/
by Leslie Lamport ▸ Increasingly used in industry to design for reliability and correctness (e.g. by AWS, used for the replication protocol of Azure’s Cosmos DB) https://www.youtube.com/watch?v=tfnldxWlOhM