Nowadays heterogenous systems have been developed and served for us, they were designed by different architectures, which were practical guidelines to get better software like maintainable, testable, easy to use, scalable and many more.
Different architectures are born to solve different, problems, the architecture is just a framework, we put different business logic and algorithms into it. This handbook is mainly about the software architecture, and hope it can get you systematic domain knowledge.
Software Architecture Development
- Service-Oriented Architecture (SOA)
- Event-driven Architectures (EDA)
- Event Producer -> Event Router -> Event Consumer
- Cloud Native (Utilize cloud services such as EC2, S3, AWS Lambda, etc.)
Communication between Different Architecture
- SOAP = HTTP + XML
- RESTful = HTTP + JSON
- RPC = SOCKET + CUSTOM
- CXF is a SOAP/RESTful framework
- Dubbo is a RPC framework
- SpringCloud is a RESTful eco-system
Fallacies of Distributed Systems
- Network is Reliable
- Latency is zero
- Bandwidth is infinite
- Topology doesn’t change
- Network is secure
- Only one administrator
- Transport cost is zero
Distributed System Characteristics
- No shared clock
- No shared memory
- Shared resources
- Concurrency and consistency
- Client-side load balancing
- No more single point of failure as in the case of the traditional load balancer approach.
- Reduced cost as the need for server-side load balancer goes away.
- Less network latency as the client can directly invoke the backend servers removing an extra hop for the load balancer.
- Round Robin (i = (i + 1) mod n)
- Netflix Ribbon (Default algorithm is Round Robin)
- Server-side load balancing
- Simple client configuration: only need to know the load-balancer address.
- Clients can be untrusted: all traffic goes through the load-balancer where it can be looked at.
- Clients are not aware of the backend servers.
- AWS ELB