当前位置:网站首页>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 .
边栏推荐
- Chrome用户脚本管理器-Tampermonkey 油猴
- Select sort and insert sort
- C nail development: obtain all employee address books and send work notices
- Ora-12514 problem solving method
- 查看was发布的应用程序的端口
- Matplotlib剑客行——容纳百川的艺术家教程
- Servlet全解:继承关系、生命周期、容器和请求转发与重定向等
- A detailed explanation takes you to reproduce the statistical learning method again -- Chapter 2, perceptron model
- 破茧|一文说透什么是真正的云原生
- 别找了,Chrome浏览器必装插件都在这了
猜你喜欢

微服务实战|熔断器Hystrix初体验

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

View the port of the application published by was

Jd.com interviewer asked: what is the difference between using on or where in the left join association table and conditions

Microservice practice | declarative service invocation openfeign practice

Matplotlib swordsman - a stylist who can draw without tools and code

2022/2/13 summary

Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度

概率还不会的快看过来《统计学习方法》——第四章、朴素贝叶斯法

There is a problem with MySQL installation (the service already exists)
随机推荐
「Redis源码系列」关于源码阅读的学习与思考
C language - Blue Bridge Cup - 7 segment code
Leetcode sword finger offer brush questions - day 22
Pyspark de duplication dropduplicates, distinct; withColumn、lit、col; unionByName、groupBy
[staff] time sign and note duration (full note | half note | quarter note | eighth note | sixteenth note | thirty second note)
"Redis source code series" learning and thinking about source code reading
Win10 uses docker to pull the redis image and reports an error read only file system: unknown
Micro service practice | introduction and practice of zuul, a micro service gateway
破茧|一文说透什么是真正的云原生
双非本科生进大厂,而我还在底层默默地爬树(上)
2022/2/13 summary
Redis installation and deployment (windows/linux)
Connect function and disconnect function of QT
Solutions to Chinese garbled code in CMD window
oracle修改数据库字符集
Leetcode sword finger offer brush questions - day 23
Webflux responsive programming
数构(C语言--代码有注释)——第二章、线性表(更新版)
Essay: RGB image color separation (with code)
Matplotlib swordsman Tour - an artist tutorial to accommodate all rivers