Software Architecture Flashcards
What is Single Responsibilty Principle?
A Module should be responsible to one and only one, actor. or one reason to change.
It says to separate the code that different actors depend upon
Dependency Inversion is based on What?
Polymorphism(Runtime)
What is OO?
OO is the ability, through the
use of polymorphism, to gain absolute control over every source code
dependency in the system. It allows the architect to create a plugin architecture,
in which modules that contain high-level policies are independent of modules
that contain low-level details.
How to protect Component A from changes in Component B ?
Make Component B depend on Component A
What is OCP at Architecture level?
Higher Level Components must be protected from the changes in Lower Level components
What are Components ?
Components are units of deployment
What are Components in Java , .NET ?
JAR files are Components in JAVA . DLLs are components in .NET
When to use singleton DI?
Singletons are suitable for objects that need to be shared across the entire application
When to use Transient DI?
Objects that are short-lived and created on demand
When to use Scoped DI?
Objects that should maintain state for a session
What is Web Server?
Web servers deliver responses to simple requests . They primarily use http also support ftp and smtp. They deliver content like HTML pages , images , videos and files. Do not typically use multithreading
What is application server?
Delivere more complex content from databases , services and enterprise systems . They support many protocols and deliver dynamic content , like real-time updates, personalized information and customer support. Uses multithreading to process requests concurrently
What is web service server?
This server handles web service requests like API services etc . This service is accessed via HTTP typically an API to be used by programs
What is circuit breaker?
Circuit breaker is a state machine that starts in closed state and allows the flow if requests across it. When a problem is detected the circuit breaker moves to open state blocking all the requests for specific period. After this period , it moves to half open state where the first request is treated as test request . If request suceeds circuit closes and normal operation resumes , but if it fails the circuit moces back to open and remains there for a specific period before moving to half open again
What is circuit breaker in .net core?
It is a design pattern to improve the resilience and fault tolerance of applications that interact with external services or resources