0
0
LLDsystem_design~12 mins

Facade pattern in LLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Facade pattern

The Facade pattern provides a simple interface to a complex system of classes or subsystems. It helps users interact with the system easily without knowing the details inside. This pattern is useful when you want to hide complexity and provide a clear entry point.

Architecture Diagram
User
  |
  v
Facade
  |
  +---------------------+
  |                     |
Subsystem A          Subsystem B
  |                     |
Subsystem C          Subsystem D
Components
User
actor
The client or user who interacts with the system through the Facade.
Facade
facade
Provides a simple unified interface to the complex subsystems.
Subsystem A
subsystem
Handles part of the system's functionality.
Subsystem B
subsystem
Handles another part of the system's functionality.
Subsystem C
subsystem
Supports Subsystem A with specific tasks.
Subsystem D
subsystem
Supports Subsystem B with specific tasks.
Request Flow - 10 Hops
UserFacade
FacadeSubsystem A
FacadeSubsystem B
Subsystem ASubsystem C
Subsystem BSubsystem D
Subsystem CSubsystem A
Subsystem AFacade
Subsystem DSubsystem B
Subsystem BFacade
FacadeUser
Failure Scenario
Component Fails:Subsystem C
Impact:Subsystem A cannot get support from Subsystem C, causing partial failure in the operation.
Mitigation:Facade can catch errors from Subsystem A and provide fallback responses or notify the user gracefully.
Architecture Quiz - 3 Questions
Test your understanding
What is the main role of the Facade component in this architecture?
ATo store data permanently
BTo provide a simple interface hiding complex subsystems
CTo handle user authentication
DTo replace all subsystems
Design Principle
The Facade pattern simplifies complex systems by providing a single entry point. It hides internal subsystem details and reduces dependencies for the user, improving maintainability and usability.