当前位置:网站首页>Introduction to architecture - who moved my cake
Introduction to architecture - who moved my cake
2022-06-12 02:25:00 【Hello, I'm Boger】
The author participated in the back-end youth training camp held this year , After listening to one of the introductory lessons on Architecture , Make the next note .
This note is mainly about the architecture information in the back-end development , The content is extensive and introductory , At the same time, in the course, the teacher vividly explained the structure by using the metaphor of the cake shop master selling cakes .
List of articles
What is architecture
Definition of Architecture
- Abstract description of the overall structure and components of software
- It is used to guide the design of all aspects of software system
- informally , There are many ways to implement a software , Method selection It plays a vital guiding role
stand-alone
The software system needs to provide external services , stand-alone Is to implement all functions in one process , And deployed on a machine .
advantage : Simple
problem :
- C10K problem: There is a bottleneck in the service provided
- The service needs to be stopped for operation and maintenance

Monomers 、 Vertical application | vertical partitioning
Monomer architecture : Distributed deployment
Vertical application architecture : According to the application of vertical segmentation of monomer
advantage :
- Levels increase
- O & M does not need to stop service
problem : - Too many responsibilities , Low development efficiency
- The explosion radius is large

SOA、 Microservices | horizontal partitioning
SOA(Service-Oriented Architecture)
- The different functional units of the application are abstracted as service
- Define between services Communication standards
stay stand-alone → Monomers → SOA In the process of , The evolution of function is : process → application → service
SOA With service Centered , namely Service oriented , The communication between services needs to be through Define communication standards To carry out , It can be said to have been carried out horizontal partitioning .
Microservice architecture : SOA Of De centralization Evolution direction , Break down responsibilities and services in more detail , Promote free communication between services , So as to avoid the existence of centralization , Make the coupling lower .
problem :
- Data consistency : How many cakes have been delivered at the loading dock ?
- High availability : So many masters , How to cooperate ?
- government : The oven is broken , How to cope with disasters ?
- decoupling vs Too slight : The operation and maintenance cost is high , Is it worth it ?

Summary :
The original intention of architecture evolution : It's like making a cake .
- The demand is growing , After all, we must increase our manpower
- More complicated , In the end, we should divide our work and cooperate
The evolution of architecture : It's like cutting a cake , The cake is getting bigger and bigger , If you can't eat a bite, you have to cut it up
- Cut vertically ( vertical partitioning )
- Cut across ( horizontal partitioning )
Analysis of enterprise level back-end architecture
Master LAN passed by the cake shop 3 Years of vigorous development , It has accumulated a good reputation and user base , Next , Need to scale up :
- How about the store : buy / rent
- Master, how to recruit : Master LAN's family came out / From the training class
- Whether to continue to insist on pure handmade ?
- When it's big , The focus of work should be : Refined cake making income / Key directions and future planning of the cake shop
Cloud computing
Cloud computing : Automated management through software , A service network that provides computing resources , It is the cornerstone of large-scale familiar analysis and storage of modern Internet .
Basics :
- Virtualization technology – Full rent vs Joint tenancy
- Layout plan – The owner vs Rental platform
framework : More and more detailed functions are provided from top to bottom
- Iaas (lnfrastructure as a Service): Buy a house vs Housing rental platform
- PaaS (Platform as a Service): Clear the bag vs Full package
- SaaS (Software as a Service): Zero training vs Hire a trained master
- FaaS (Function as a Service): handmade vs Batch production of cake machine
The following diagram is in the reverse order of the above architecture , More and more detailed functions are provided from bottom to top , It can be compared with the above architecture partition .
Cloud native
Cloud native technology for organizations ( company ) In public 、 Freedom cloud 、 In the new dynamic environment such as hybrid cloud , It is possible to build and run flexible applications .
among : Public cloud 、 Freedom cloud 、 Hybrid cloud can be understood as the cloud in cloud computing , The difference lies in the different forms of the cloud .

The following is a further description of each part in the above figure :
Elastic resources
Elastic computing resource types
- Service resource scheduling
- Microservices : and 、 Carving
- Big service : Oven
- Computing resource scheduling
- On-line : Top selling list
- offline : Top selling list update
- Message queue
- On-line : Peak shaving 、 decoupling
- offline : Big data analysis
Elastic storage resources
- classic
- object : Promotional video
- big data : User consumption record
- Relational database
- Cashier records
- Metadata ( The data is not very large but is used in many scenarios )
- Service discovery : The address book of the baker in the cake shop
- NoSQL
- KV: To a xx The cake
summary : Treat storage resources as services
DevOps
DevOps It is a powerful tool for software delivery in the cloud native era , Throughout the entire software development cycle . Combined with automated processes , Improve software development 、 Delivery efficiency .
Dev Throughout the entire software development cycle :
Microservice architecture
Communication standards :
- HTTP (RESTful API)
- RPC (Thrift, gRPC)
Microservice Middleware RPC vs HTTP:
- performance
- Service governance
- Agreement interpretability
In the cloud scene , Microservices do not need to implement interaction logic that conforms to communication standards in business logic , It is left to the framework to do .

Service network
Service Grid (Service Mesh):
- The middle layer of communication between microservices
- High performance network agent
- Business code is decoupled from governance
Compared with RPC/HTTP frame :
- Unification of heterogeneous system governance
- Decouple from business processes , The lifecycle is easy to manage

Come here , We use the cake shop as an analogy to the back-end architecture , Here's the picture :

Challenges of enterprise class back-end Architecture
problem
Challenge :
- Infrastructure level
- Physical resources are limited
- machine
- bandwidth
- Resource utilization is constrained by Deployment Services
- Physical resources are limited
- At the user level
- The network communication cost is large
- Network jitter leads to higher operation and maintenance costs
- Heterogeneous environment , The water level of resources in different instances is uneven

Leave online resources and pool
Solutions to improve the utilization of physical resources within the enterprise
Core revenue :
- Reduce the cost of physical resources
- Provide more flexible resources , increase income
Solutions : Leave online resources and pool
- Characteristics of online business
- IO It's mainly intensive
- Tidal property ( There are few visits in the early morning 、 There is a large number of visitors in the evening peak )、 The real time ( Delay sensitive )
- Characteristics of offline business
- Computing intensive is in the majority
- Non real time

Automatic volume expansion and shrinkage
Core revenue : Reduce business costs
Solutions : Automatic volume expansion and shrinkage
- Utilize the tidal nature of online business to automatically expand and shrink capacity
problem : What index is the expansion and contraction capacity based on ?
example :CPU utilization 、 Memory utilization

Microservice affinity deployment
Core revenue :
- Reduce business costs
- Improve service availability
Solutions : Microservice affinity deployment
- Schedule containers that meet affinity conditions to a host
- Microservice middleware communicates with service grid through shared memory
- The implementation of service grid control surface is flexible 、 Dynamic traffic scheduling

Traffic management
Core revenue :
- Improve microservice invocation fault tolerance
- disaster
- Further improve development efficiency ,Dev0ps Play to the extreme
Solutions : Based on micro middleware & Traffic governance of service grid
- Fuse 、 retry
- unitized
- Complex environment ( function 、 preview ) Traffic scheduling for
CPU Water level load balancing
Core revenue :
- Balance the differences in computing power in heterogeneous environments
- Provide positive input for automatic expansion and contraction
Solutions : CPU Water level load balancing
- IaaS
- Provide probe resources
- Service Grid
- Dynamic load balancing

The end of the
- No best architecture , Only the most appropriate architecture
- How to do architecture design
- Demand comes first . Find out what problem to solve
- Industry Research . What solutions are available in the industry
- Technology selection . Inside / What are the basic components of the community
- Abnormal situation . Think about it xxx What if I can't
- Architecture and engineer growth
- Technology Manager
- Architects
边栏推荐
- 2022 western style pastry (technician) recurrent training question bank and online simulated examination
- Navicat for MySQL 11 Linux cracking method
- Force deduction solution summary 1037- effective boomerang
- How to make div 100% page (not screen) height- How to make a div 100% of page (not screen) height?
- A single quarter of educational technology revenue of 230million: a year-on-year decrease of 51% and a sharp narrowing of net loss
- 力扣解法汇总868-二进制间距
- What is SAP c/4hana Foundation
- Force deduction solution summary 497 random points in non overlapping rectangles
- 力扣解法汇总396-旋转函数
- Summary of force deduction method 417- Pacific Atlantic current problems
猜你喜欢

BaseDexClassLoader那些事

Layered architecture of DDD

Oracle 11g graphic download installation tutorial (step by step)

How to make div 100% page (not screen) height- How to make a div 100% of page (not screen) height?

Graduation design of fire hydrant monitoring system --- thesis (add the most comprehensive hardware circuit design - > driver design - > Alibaba cloud Internet of things construction - > Android App D

(9) Serial port interrupt

maya前臺渲染插件mel脚本工具

ACL 2022 | 预训练语言模型和图文模型的强强联合

ozzanimation-基於sse的動作系統

maya前台渲染插件mel脚本工具
随机推荐
小红的删数字
Force deduction solution summary - Sword finger offer II 114 Alien dictionary
UE4\UE5触摸屏touch事件:单指、双指
SwiftyJSON解析本地JSON文件
SQL calculates KS, AUC, IV, psi and other risk control model indicators
Summary of concrete (ground + wall) + Mountain crack data set (classification and target detection)
Force deduction solution summary 1728- cat and mouse II
没有文笔,大家多多包涵
力扣解法汇总396-旋转函数
Master of a famous school has been working hard for 5 years. AI has no paper. How can the tutor free range?
Navicat for MySQL 11 Linux 破解方法
Oracle 11g graphic download installation tutorial (step by step)
[adjustment] in 2022, the Key Laboratory of laser life sciences of the Ministry of education of South China Normal University enrolled adjustment students in optics, electronic information, biomedicin
The most comprehensive redis transaction control in 2022 (with illustration)
ACL2022 | DCSR:一种面向开放域段落检索的句子感知的对比学习方法
Ue4\ue5 touch screen touch event: single finger and double finger
Graphical data analysis | data analysis tool map
Force deduction solution summary 1037- effective boomerang
$. map(data,function(item,index){return XXX})
Apply concentrated load to nodes in batch in ABAQUS