当前位置:网站首页>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
边栏推荐
- Android HTML5 page load cache optimization
- A single quarter of educational technology revenue of 230million: a year-on-year decrease of 51% and a sharp narrowing of net loss
- 力扣解法汇总875-爱吃香蕉的珂珂
- Basedexclassloader
- Oracle 11g graphic download installation tutorial (step by step)
- 力扣解法汇总933-最近的请求次数
- $. map(data,function(item,index){return XXX})
- 力扣解法汇总462-最少移动次数使数组元素相等 II
- 力扣解法汇总398-随机数索引
- Is there a female Bluetooth headset suitable for girls? 38 Bluetooth headsets worth getting started
猜你喜欢

Graphic data analysis | business cognition and data exploration

Maya foreground rendering plug-in Mel scripting tool

一起教育科技单季营收2.3亿:同比降51% 净亏大幅收窄

Implementation scheme of iteration and combination pattern for general tree structure

Cvpr2022 | IFS RCNN: an incremental small sample instance splitter

Don't miss it! Five large data visualization screens that HR must collect
![[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](/img/f9/332b206d5aca0ca6afc3fdf11a53c8.jpg)
[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

ACL2022 | DCSR:一种面向开放域段落检索的句子感知的对比学习方法

(9) Serial port interrupt

Installing MySQL version 5.5 database for Linux (centos6)
随机推荐
Force deduction solution summary 732- my schedule III
力扣解法汇总396-旋转函数
Several common instructions for virsh to create / shut down / stop virtual machines
力扣解法汇总1022-从根到叶的二进制数之和
Force deduction solution summary 450- delete nodes in the binary search tree
力扣解法汇总953-验证外星语词典
高考完不要急着去打工了,打工以后有的是机会,不差这三个月
函数模板 Function Templates
Ue4\ue5 touch screen touch event: single finger and double finger
el-upload上传文件
What insurance products can you buy at the age of 60?
El upload upload file
Introduction to program environment and preprocessing C language (advanced level)
力扣解法汇总944-删列造序
How can low code platforms improve cost effectiveness?
$. map(data,function(item,index){return XXX})
力扣解法汇总668-乘法表中第k小的数
Force deduction solution summary 942- increase / decrease string matching
Layered architecture of DDD
Start ticwatch2