当前位置:网站首页>Insight into cloud native | microservices and microservice architecture
Insight into cloud native | microservices and microservice architecture
2022-07-02 09:17:00 【_ Time boiled the rain】
Preface
2014 year Martin Fowler Officially put forward “ Microservices ” The concept of : Microservice architecture is an architecture pattern , It promotes the division of a single application into a small set of services , Services coordinate with each other 、 Cooperate with each other , Provide the ultimate value for users . Each service runs in its own process , Services and services use lightweight communication mechanism to communicate with each other ( Usually based on HTTP Of RESTful API). Each service is built around a specific business , And can be independently deployed to the production environment 、 Class production environment, etc . in addition , Try to avoid unified 、 Centralized service management mechanism , For a specific service , Should be based on business up and down writing , Choose the right language 、 Tools to build it .

Martin Fowler, Godfather in software development ,ThoughtWorks Chief scientist , The author of 《 restructure : Improve the design of existing code 》《 Analysis mode : Reusable object model 》《 Domain specific language 》《 Enterprise Application Architecture 》 And so on , Agile development methodology The founders , Microservices Concept proposer .
One 、 Monomer architecture and micro service architecture
1、 Monomer architecture
A single system is a large and complete set of functions , Each server runs the complete service of the application . All functions of an application are in a project , In the project classes、jsp、css、js Wait until the back-end resources are finally archived as one war Package deployment to server .

Advantages of monomer Architecture :
- Development 、 test 、 Deployment is relatively simple ;
- Simple technical architecture .
Disadvantages of monomer Architecture :
- Low development efficiency , Developers often need to understand the overall business functions
- Maintenance costs are high , Poor scalability
- Each upgrade deployment has a great impact 、 All services will be unavailable , Pull one hair and move the whole body
- The cost of technology selection is high
2、 Microservice architecture
Microservice architecture is relative to single application , be based on “ Low coupling 、 High cohesion ” principle , Split a single application into multiple services according to the actual business functions , Each service provides specific business functions ( Principle of single responsibility ), Each service can be deployed separately , Are independent of each other .
The advantages of microservice Architecture :
- Each service is split according to the principle of high cohesion and low coupling , The code is simpler and easier to understand
- Development of simple 、 Just focus on one business module
- extensible
- Fore and aft end separation , Easy to deploy
The shortcomings of microservice architecture
- The complexity of operation and maintenance deployment has increased
- Between services REST And so on , Increased communication costs
- Other problems caused by splitting : Such as data consistency , Distributed transaction problems
There is no problem between monomer architecture and microservice architecture , Only the question of suitability . If the business is relatively stable , Long publishing cycle , It is more suitable for single architecture . and Microservice architecture is responding to changes in demand 、 Fault tolerant processing 、 Service reuse and extension 、 Improve development efficiency 、 Simplifying interaction and other aspects have obvious advantages . meanwhile , agile development 、DevOps、 Continuous integration / Continuous delivery 、 Container technology 、Spring Cloud frame 、 Lightweight Directory Service 、 The emergence of technology such as domain driven design also makes microservice architecture a panacea for solving complex problems .
Two 、 What are the microservice architecture solutions ?
- Spring Cloud: It's an ordered set of frames , It USES Spring Boot The development convenience of cleverly simplifies the distributed system base Infrastructure development , Such as service discovery registration 、 Configuration center 、 The message bus 、 Load balancing 、 Circuit breaker 、 Data monitoring, etc. , Both can be used. Spring Boot The development style of one-click startup and deployment .

- Apache ServiceComb: Is the first Apache Microservices , It's an open source microservice solution , Realize efficient operation and maintenance management of microservice applications . It provides one-stop open source microservice solutions , The fusion SDK Frame level 、0 invasion ServiceMesh Scene and support multi language .

- ZeroC IceGrid:ZeroC The company's masterpiece , Inherited CORBA Of blood , It is an object-oriented distributed system middleware . be based on RPC Framework developed , Good performance and distributed capability .

- Motan: It's open source. RPC frame , Only support Java Language implementation , Need to be in Client End ( Serving consumers ) and Server End ( Service providers ) introduce SDK.
- Thrift: It's a lightweight cross language RPC Communication scheme , Support up to 25 Programming languages .Thrift Has its own interface definition language IDL
- ......
summary
Microservice architecture selection , We have to rely on Community maturity 、 Popularity 、 Development difficulty 、 The learning curve 、 Business reality And other multidimensional factors , Microservice architecture has played an important role in cloud native architecture , and SpingCloud Undoubtedly, it is one of our preferred technical solutions for developing micro Services .
边栏推荐
- View the port of the application published by was
- 破茧|一文说透什么是真正的云原生
- AMQ6126问题解决思路
- Servlet全解:继承关系、生命周期、容器和请求转发与重定向等
- Image transformation, transpose
- CSDN Q & A_ Evaluation
- I've taken it. MySQL table 500W rows, but someone doesn't partition it?
- win10使用docker拉取redis镜像报错read-only file system: unknown
- 数构(C语言)——第四章、矩阵的压缩存储(下)
- Sentinel reports failed to fetch metric connection timeout and connection rejection
猜你喜欢

C language implementation of mine sweeping game

Microservice practice | declarative service invocation openfeign practice

MYSQL安装出现问题(The service already exists)

DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!

Micro service practice | introduction and practice of zuul, a micro service gateway

"Redis source code series" learning and thinking about source code reading

Chrome视频下载插件–Video Downloader for Chrome

查看was发布的应用程序的端口

Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer

Actual combat of microservices | discovery and invocation of original ecosystem implementation services
随机推荐
京东面试官问:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别
微服务实战|原生态实现服务的发现与调用
Solution and analysis of Hanoi Tower problem
Sentinel reports failed to fetch metric connection timeout and connection rejection
数构(C语言)——第四章、矩阵的压缩存储(下)
A detailed explanation takes you to reproduce the statistical learning method again -- Chapter 2, perceptron model
双非本科生进大厂,而我还在底层默默地爬树(上)
DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
概念到方法,绝了《统计学习方法》——第三章、k近邻法
Matplotlib swordsman - a stylist who can draw without tools and code
[go practical basis] how to bind and use URL parameters in gin
Using recursive functions to solve the inverse problem of strings
Probability is not yet. Look at statistical learning methods -- Chapter 4, naive Bayesian method
Matplotlib剑客行——初相识Matplotlib
[go practical basis] how to customize and use a middleware in gin
Don't spend money, spend an hour to build your own blog website
2022/2/13 summary
win10使用docker拉取redis镜像报错read-only file system: unknown
Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer
《统计学习方法》——第五章、决策树模型与学习(上)