This is the 21st day of my participation in the August More Text Challenge
Unitary architecture
What is unitization
- The unitary architect evolved from the area of parallel computing
- In the area of distributed architecture:
- A Cell: a self-contained wrapper that satisfies all the service operations of a partition
- A partition Shard: A subset of the overall data set. For example, if users are divided by the tail number, the users with the same tail number can be considered as a partition
- Unitization is the process of transforming a service design into a unit
The necessity of unitization
- With the continuous upgrade of hardware, computer hardware has become more and more powerful,CPU faster and faster, memory is more and more large, network is more and more wide. This gives you the ability to scale vertically on a single machine
- When faced with a business with expected performance requirements and capacity growth, unitization can effectively reduce resource usage and provide higher performance services
- After the transformation of the unit, can only use half of the machine, get nearly a hundred times more performance than the original
- Much of the performance improvement is due to service localization, and the integrated deployment of services further reduces resource usage
- In addition to performance gains, unitization provides better isolation, including request isolation and resource isolation. More friendly upgrades, products can be grayscale published
- After the unit transformation, we can deal with the peak and solve the expansion mode
How to realize the unit
- Traditional service architecture:
- Services are layered
- Each layer uses a different partitioning algorithm
- Each layer has a different number of nodes
- The upper node randomly selects the lower node
- Unitary architecture:
- Services are layered, but each unit is self-contained
- All layers use the same partitioning algorithm, each layer has the same number of nodes, and the upper nodes also access the specified lower nodes
SOA architecture
Basic concepts of SOA architecture
- SOA: Service-Oritented Architecture
- Service-oriented architecture
- Is a component model
- Combine the different functional units of the application, called services. These services are linked by well-defined interfaces and contracts between them
- Interfaces are defined in a neutral manner, independent of the hardware platform, operating system, and programming language that implements the service
- This allows services built in various sample systems to interact in a unified and common way
- The service-oriented architecture enables distributed deployment, composition, and use of loosely coupled coarse-grained application components over a network as required
- The service layer is the foundation of SOA and can be invoked directly by applications to effectively control the artificial dependencies in the system that interact with software agents
Basic characteristics of SOA implementation
- The implementation ofSOAThe key goal is to maximize the impact of enterprise IT assets. To achieve this goal, we need to implement itSOAKeep the following characteristics in mind:
- Can be accessed from outside the enterprise
- Available at any time
- Coarse-grained service interface classification
- Loose coupling
- Reusable services
- Service interface design management
- Standardized service interfaces
- Support for various message patterns
- Define precisely the various service contracts
- A Service Consumer can invoke a Service by sending a message
- These messages are transformed by a Service Bus and sent to the appropriate Service implementation
- An SOA architecture can provide a Business Rules Engine that allows Business Rules to be merged into one or more services
- The SOA architecture also provides a Service Management Infrastructure to manage services such as auditing, listing, and logging
- SOA architecture provides enterprises with flexible business processes that better handle Regulatory requirements. Such as Sarbanes Oxley(SOX), and you can change one service without affecting the rest
Microservices Architecture
Traditional Web development
- All functionality is packaged in a WAR package
- Outside of the container, there are few external dependencies
- Deploy in a JEE container, such as Tomcat, JBoss, and WebLogic
- Contains all the logic for DO or DAO,Service,UI, etc
advantages
- Simple development and centralized management
- Basically no duplication of development
- Functions are all local and there is no distributed management and coordination of consumption
disadvantages
- Low efficiency: Developers change code on the same project, wait for each other, and conflict constantly
- Difficult to maintain: Code functions are coupled and difficult to maintain
- Inflexibility: The build time is long, and any small change builds the entire project, which is time consuming
- Poor stability: Even a small problem can cause an entire application to go down
- Poor scalability: Cannot meet service requirements under high concurrency
System architecture standards
- Improve agility: Respond to business needs in a timely manner to grow the enterprise
- Improve user experience: Improve user experience and reduce user churn
- Cost reduction: reduce the cost of adding products and customer active business solutions
Architecture design based on microservices
- Objective: To effectively split applications and achieve agile development and deployment
- The service:
- X-axis: Running instances after running multiple load balancers
- Y-axis: Further decompose the application into microservices – sub-libraries
- Z-axis: When big data is used, services are partitioned into sub-tables
The difference between SOA and microservices
- SOA is heavy on reuse and microservices are heavy on rewrite
- SOA focuses on horizontal services and microservices on vertical services
- SOA is top-down and microservices are bottom-up