Source: Some information about the structure to me, as well as their own Baidu and the forum, the community to find some information, right as a summary of the introduction ...
The directory is as follows:
Introduction of micro-service architecture
Ii. Emergence and development
Iii. the difference between traditional development model and micro-service
Iv. specific features of micro-services
V. The difference between SOA and microservices
Vi. How to practice micro-services concretely
Vii. Common micro-service design patterns and applications
Viii. advantages and disadvantages of micro-services
Nine, thinking: the Change of consciousness
X. References and recommended readings
Introduction of micro-service architecture
The MicroServices architecture (Microservice Architecture) is an architectural concept designed to decouple the solution by decomposing functionality into discrete services. You can look at it as an architecture-level rather than a service-
Many solid principles are applied to the class. MicroServices architecture is an interesting concept, and its main function is to decompose functions into discrete services, thus reducing system coupling and providing more flexible service support.
Concept: Split a large single application and service into several or even dozens of support microservices that can extend a single component rather than the entire application stack to meet service level agreements.
Definition: Create apps around business domain components that can be developed, managed, and iterated independently. Make product delivery easier by using cloud architecture and platform-based deployment, management, and service capabilities in distributed components.
Essence: To solve bigger and more practical problems by using some more definite functions and more concise services.
Ii. Emergence and development
The concept of microservices (Microservice), which emerged in 2012 as a way to accelerate the development of web and mobile applications, began to be of concern to the parties in 2014, and 2015 was the first of its kind;
A growing number of forums, communities, blogs, and internet giants are beginning to discuss and practice microservices, which can be said to be a step closer to promoting the development and innovation of microservices. And the popularity of micro-services, Martin Fowler.
The old man is a strange man, especially good at abstract induction and manufacturing concepts. In particular, the micro-service of the new term, there is a characteristic: an explanation to understand, a question is not known, a discussion on the fight.
Martin Fowler is the internationally renowned OO expert, one of the founders of the Agile development approach, and is now the first of the ThoughtWorks company
Scientists. In the aspect of object-oriented analysis design, UML, model, software Development Party jurisprudence, XP, refactoring, etc., are the world's top
Expert, is now thought Works Company's chief scientist. Thought works is a company engaged in enterprise application development and---set
Into the company. As early as the 1980s, Fowler was the advocate for building multi-tier enterprise applications using object technology, and he
This classic book: "Enterprise Application Architecture Model", "UML Essence" and "refactoring" and so on.
———— Baidu Encyclopedia
Iii. the difference between traditional development model and micro-service
Take a look at the traditional way of web development, through comparison is easy to understand what is Microservice Architecture. In correspondence with the Microservice, this approach is generally referred to as monolithic (monomer type development).
All functions are packaged in a war package, with no external dependencies (except for containers), deployed in a JEE container (tomcat,jboss,weblogic), containing all the logic such as Do/dao,service,ui.
Advantages:
① development simple, centralized management
② basically does not repeat development
③ functions are local, without distributed management and call consumption
Disadvantages:
1, low efficiency: development in the same project to change the code, waiting for each other, conflict constantly
2, maintenance Difficult: Code function coupled together, the new people do not know how to start
3, inflexible: Long construction time, any minor changes to reconstruct the entire project, time-consuming
4, poor Stability: a small problem, can cause the entire application to hang out
5. Insufficient extensibility: Unable to meet the business requirements under high concurrency
Common system architectures follow three standards and business drivers:
1, improve agility: timely response to business needs, promote the development of enterprises
2. Enhance the user experience: Improve user experience, reduce user churn
3. Reduce costs: Reduce the cost of adding products, customers or business solutions
Micro-service Architecture based design:
Purpose: Effective splitting of applications for agile development and deployment
An image of micro-service expression:
X-axis: Running instances after running multiple load balancers
Y-axis: Further decomposition of the application into MicroServices (sub-Libraries)
Z-axis: The service partition (sub-table) when the large data volume
Iv. specific features of micro-services
The official definition:
1, some columns of independent services together to form a system
2, separate deployment, running in their own process
3, each service for the independent business development
4. Distributed Management
5, very stressed the isolation of
The approximate standard:
1. Distributed Service System
2, according to business, rather than technology to divide the organization
3, do the life of the product rather than the project
4. Strong service individuals and weak communication (Smart endpoints and dumb pipes)
5. Automated Operations (DEVOPS)
6. High degree of fault tolerance
7. Rapid Evolution and Iteration
V. The difference between SOA and microservices
1, SOA like reuse, microservices like to rewrite
The primary purpose of SOA is to make it easier for enterprise systems to fuse together. When it comes to SOA, we have to say ESB (Enterpriseservice Bus). What is an ESB? The ESB can be imagined as a scaffold to connect all enterprise-level services.
Through Service Broker, it can convert different data formats or models into canonical format, convert XML input into CSV to legacy service, transfer SOAP 1.1 service to SOAP 1.2 and so on. It can also put a service
Routing to another service, you can also centralize management of business logic, rules and validation, and so on. It also has an important function of Message Queuing and event-driven messaging, such as converting a JMS service into a SOAP protocol. Each service room may have
A complex dependency relationship.
MicroServices are usually started by rewriting a module. There is a great risk of rewriting the entire Boulder application, and it is not necessarily necessary. When we migrate to microservices, we usually start with the least-coupled modules or the modules with the highest scalability requirements,
Peel them off one by one. With an agile rewrite, you can try out the latest technologies and languages and frameworks and then separate the deployment. It usually does not depend on other services. The main purpose of the API Gateway model used in MicroServices is not to reuse code,
Rather, it reduces the interaction between the client and the service. API Gateway mode is not equivalent to the facade mode, we can use calls such as the future, or even return incomplete data.
2, SOA like the level of service, micro-services like vertical services
SOA design likes to layer services (such as service layers mode). We often see the design of an entity service layer, the name of the data Access layers. This design requires all services to pass through this entity service layer
To get the data. This design is very inflexible, such as every change in the data layer can affect services at all levels of the business. Each micro-service usually has its own independent data store. We can do some of the right things when we split the database.
Go to normalization (denormalization) so that it does not need to rely on data from other services.
MicroServices are typically directly facing users, and each microservices typically provides a function directly to the user. Similar features may have a service for the phone, and another service for the set-top box. In SOA design patterns, this typically
The Multi-channelendpoint mode returns a chatty result that takes into account the needs of all clients.
3, SOA likes top-down, micro-services like bottom-up
The SOA architecture defines the service contract at the beginning of the design. It likes to centrally manage all services, including centralized management of business logic, data, processes, schemas, and so on. It uses enterprise
Inventory and service composition to centrally manage services. SOA architectures typically pre-define each module's service interface. Communication between module systems must adhere to these interfaces, and the services are targeted at their callers.
The SOA architecture applies to architectural methodologies such as TOGAF.
Micro-services are much more agile. As long as the user gets it, the service is dug out first. Then targeted, quickly identify business needs and quickly develop iterations.
Vi. How to practice micro-services concretely
To actually apply microservices, you need to solve the four-point problem:
1. How clients access these services
2. How to communicate between each service
3, so many services, how to achieve.
4, the service hangs, how to solve. (Backup scheme, emergency handling mechanism)
1. How clients access these services