An article with you completely understand microService

First, the introduction of micro Services Architecture

Micro Services Architecture (Microservice Architecture) is an architectural concept designed to function by breaking down each discrete service to achieve the decoupling of the solution. You can see it as the architectural level, rather than access to services
many applications SOLID principles on class. Micro Services Architecture is a very interesting concept, its main role is to break down the various functions among discrete service, thus reducing the coupling of the system, and provide a more flexible service support.
The concept: to a large single applications and services split into several or even dozens of micro-support service that extends the individual components rather than the entire application stack to meet service level agreements.
Definition: to create applications around business components, these applications can be developed independently, manage, and iteration. Using cloud architectures peace desktop deployment, management and service functions in a decentralized components, the product delivery easier.
Nature: some features with relatively clear, relatively concise business services to solve larger, more practical problems.

Second, the emergence and development

Micro Services (Microservice) this concept appeared in 2012 as a way to speed up the Web and mobile application development process, the parties began to receive attention in 2014, and in 2015, can be said that the first year of micro services;
more an increasing number of forums, communities, blog and Internet industry giants began to discuss the micro-service practice, we can say one step closer to promote the development of micro and innovative services. The popular micro-services, Martin Fowler contributed.
This old man is a bit of a curiosity, especially good at abstract induction and manufacturing concepts. Especially micro-services such nascent noun, has a feature: a explanation to understand, a question I do not know, a discussion on the fight.
Martin Fowler is one of the founders of OO internationally renowned expert, agile development methods, ThoughtWorks is now the first company
seats scientist. In the object analysis and design, UML, patterns, software development methodology, XP, and other reconstruction-oriented, are the world's top
experts, is now the company's chief scientist Thought Works. Thought Works is engaged in enterprise application development and - set
into the company. As early as the 1980s, Fowler is the use of object technology advocates to build multi-tier enterprise applications, He is the author of several
classic books: "Enterprise Application Architecture", "UML essence" and "reconstruction" and so on.
---- Baidu Encyclopedia

Third, the difference between traditional development model and micro services

Let's look at the traditional web development, easier to understand by comparing what is Microservice Architecture. And corresponding Microservice, this approach is generally called Monolithic (unibody development).
All functions packaged in a bag WAR, substantially no external dependencies (except the container), deployed in a vessel JEE (Tomcat, JBoss, WebLogic), the logic contains all DO / DAO, Service, UI like.

Advantages:
① develop simple, centralized management
② basic development will not repeat
③ functions are locally managed and distributed no call consumption
Disadvantages:
1, low efficiency: all in one development project to change the code, wait for each other, conflicts
2, difficult to maintain: Code function coupled together, the couple did not know how to start from
3 inflexible: build a long time, any small modifications have to reconstruct the entire project, time-consuming
4, poor stability: a tiny issue, all may cause the entire application to hang
5, scalability is not enough: unable to meet business needs in a highly concurrent
three business drivers common standards and system architecture to follow:
1, more agile: timely response to business needs, and promote the development of enterprises
2, enhance the user experience: to enhance the user experience, reduce churn
3, lower costs: reduced costs of products, customers or business plan

Micro-service architecture based design:
Objective: To effectively split application, agile development and deployment

Image on a micro-expression services:

X-axis: a plurality of operation after operation of the load balancer Example
Y-axis: The application further broken down into micro-services (sub-library)
the Z axis: large amount of data, the service partition (partition table)

Fourth, the specific characteristics of the micro-services

The official definition:
1, a number of independent service columns together constitute the system
2, separately deployed, running in its own process
3, each serving as an independent business development
4, distributed management
5, a strong emphasis on isolation
rough guide :
1, a distributed service system consisting of
2, according to the business, rather than the technique to divide the organization
3, to do life of the product instead of the item
4, strong individuals and weak communication services (Smart Endpoints and dumb Pipes)
5, operation and maintenance of automation (DevOps)
6, highly fault-tolerant
7, rapid evolution and iteration

Fifth, the difference between SOA services and micro

1, SOA reuse like, micro-services like rewriting
the main purpose is to various SOA business systems more easily together. Have to say that when it comes to SOA ESB (EnterpriseService Bus). What ESB is? ESB can be thought of as a scaffolding connects all enterprise services.
By the service broker, different data formats it can turn into a canonical format or models, the input is converted into XML CSV pass legacy service, the service SOAP 1.1 SOAP 1.2 to turn the like. It can be a service
route to another service can be centrally managed business logic, rules and validation, and so on. It also has an important function is the message queue and event-driven messaging, such as the JMS service transformed into SOAP protocol. There may be inter-service
complex dependencies.
Micro services are usually started by a rewrite module. It should rewrite the whole rock type of application is a great risk, not necessarily necessary. When we migrated to the micro-services typically highest from the lowest start module module coupling or scalability requirements,
they spun off one by one with a quick rewrite, you can try the latest technology and languages and frameworks, and deploy alone . It usually does not depend on other services. Commonly used in micro-services API Gateway mode is not the main purpose is to reuse code,
but to reduce contacts between clients and services. API gateway mode does not equate with the Facade pattern, we can call such future use and the like, and even returned incomplete data.

2, the level of service like SOA, services like vertical micro service
SOA layered design like the service (e.g., Service Layers mode). We often see Entity design a service layer, euphemistically called Data Access Layer. This design requires that all services through the Service Layer Entity
to obtain the data. This design is very inflexible, such as each modification data layers are likely to affect all business service layer. And each micro service usually has its own separate data store. When we split the database can be appropriate to do
to normalization (denormalization), it does not need to rely on other service data.
Micro services are usually directly facing the user, each micro-services often provide users with a feature directly. Similar features may have a service for mobile phones, set-top boxes for the service is another. In this case the SOA design patterns typically used
Multi-ChannelEndpoint mode returns the result of a large and take into account the needs of all clients.

3, SOA like a top-down, bottom-up micro-services like
SOA architecture will first start in the design of well-defined service contracts (service contract). It prefers centralized management of all services, including centralized management business logic, data, processes, schema, and so on. It uses the Enterprise
for Inventory, Service Composition and other methods to centralize management services. SOA architecture usually pre-service interface to each module are defined. Communications must comply with these interfaces between modules system, each service is for their callers.
SOA architecture TOGAF methodology applied to architecture and the like.
Micro service is much more agile. As long as users get used, this service will first dig. Then targeted and quickly identify business needs, rapid development iteration.
Here attached micro Mind Map ServiceAn article with you completely understand microService

Above is my personal micro-services understand the need to micro-services related to mind mapping students can private letter I "micro-services" get, like this article can give the author points a agree, look, will share Java-related articles every day ! There are benefits presented from time to time, including the consolidation of learning materials, interview questions, such as source code ~ ~

Guess you like

Origin blog.51cto.com/14440597/2420858