Architecture Flashcards
What Is CAP Theorem?
CAP stands for Consistency, Availability and Partition Tolerance. CAP Theorem reflects the fact that you can’t provide all three of this properties simultaneously in context of distributed systems.
What Is ACID Property Of A System?
ACID is an acronym for four properties of database management systems that need to be satisfied in order to consider database safe in concurrent use.
Atomicity guarantees that transaction will be applied as a whole or not applied at all.
Consistency means there will be no moment in time when data is not consistent, e.g. violating some constraints.
Isolation prevents transactions from seeing other transactions changes until it is committed.
Durability means that once transaction is succeeded, occurred changes must remain in database even after server crash.
Define Microservice Architecture
Microservice Architecture is an approach to separate system into small self-contained sub-systems communicating to each other via network or message queues.
List down the advantages of Microservices Architecture
- Microservices are less subject to code coupling
- Microservices are smaller and easier to deploy frequently
- Microservices reduce blast radius of a failure - well organized interaction between microservices sustains through denial of one of them
- Microservices can be developed independently allowing to use different tools in different scopes
- Microservices can be scaled independently according to its load
What is the difference between SOA and Microservices Architecture?
Each microservice revolves around a single bounded context and is autonomous to some point - it has it’s own API layer and designed to sustain denial of another microservices. In contrast services are separated according to the layers of whole application and can not provide business value independently. Microservices communicate through HTTP and message queues while services normally are connected through enterprise service bus. It is common for different services to have single data storage while in microservice architecture it is considered anti-pattern. Microservices are meant to be developed and deployed independently while services often require some amount of coordination in delivering new functionality.