当前位置:网站首页>Personal thoughts on Architecture Design (this article will be revised and updated continuously later)
Personal thoughts on Architecture Design (this article will be revised and updated continuously later)
2022-07-04 19:34:00 【RichardGeek】
Preface
lately , Participated in many internal or external technical architecture sharing , In the process of personal learning, I often occasionally post on various blogs 、 In other cases, such as official account articles, we often see resources about architecture design .
There are many design ideas that can be used for reference , This article aims at personal superficial understanding , Make personal summary and record , For reference only . Key design ideas such as Trade Off( Balance )、 The robustness considerations of the architecture include but are not limited to three high ( High performance 、 Highly reliable 、 High concurrency ) etc. 、DDD Domain design ( Such as domain events 、 Add anti-corrosion coating )、 layered design idea (MVC framework 、 Adaptive layer 、 similar DDD Anticorrosive coating Transformation Data Data conversion layer 、 Business tier and storage tier ) And so on decoupling Thoughts, etc .
Trade Off
” Balance “, This idea is a design concept that I find interesting and personally agree with recently . There is a popular saying about architecture design ” quotes “: There is no perfect architecture , Only the most appropriate and suitable architecture .
This trade-off involves many factors , Such as the current business scenario 、 The landing cost of the feasible technical scheme ( Machine cluster budget cost 、 Developer labor costs 、 Post operation and maintenance costs, etc ), In short , Some decisions are needed Boss Level consideration , It is input and output trade off. To achieve the current optimal architecture scheme at the lowest cost is “ king ”.
Highly reliable
In addition to simply setting up a service cluster , Add copy and other conventional design ideas . From some special ” spot “ Ability to be highly reliable .
Consistent and reliable data
For example, in the business scenario of service design and implementation, consider the key “ Business node ”、“ Milestones ” Check the reliability of data .
Design ideas such as : Before the business logic is triggered 、 Trigger process 、 After the completion of the key stage, do the corresponding treatment .” Pre storage snapshots or notifications 、 Mid - check、 Post reconciliation “. Do a good job in snapshot data storage 、 Event notification or "double check" Data snapshot reconciliation, etc . consider ODPS Flink/Spark Near real time / offline Stream data analysis , comparison . The unified data of the central data center is quasi real-time 、MQ Event notification & retry 、 backstage Job Task check&alarm etc. 、 Solutions for distributed transactions, such as TCC/2PC/3PC/ Message record table, final consistency, flexible transaction, etc .
High concurrency
There are often ” Lock “ Design idea , Some... Used to guarantee concurrency ” The order “ Feature scenario . Distributed locking scenarios are common, such as using other middleware : Such as Redis Of lua Script /setNx/watch Dog/Redission wait ,zookeeper The order of temporary nodes plus watch Mechanism ,mysql Wait for the pessimistic lock of the database Such as select ... from table where status=' ' for update etc. .
Except for the similar “ Pessimistic locking ” The implementation of the ( It has a great impact on concurrent performance , It's similar to the above trade off The concept of trade-offs ), It can also be used ” Optimism lock “ Such as CAS(compare and swap) Ideas . prevent ABA problem You can add a list of snapshot version numbers to ensure . mysql Examples of optimistic locking implemented by the library are update .... where status=' ' and snapshot_version=' ';
The process stage of architecture design
research - Technology selection
Focus assessment :
1、 Investigate the ecological environment of related technologies . Such as the activity of the technology community 、 Prospects for sustainable development in the future
2、 Study 、 Development cost problem . New technology ” Get started “ Efficiency of the 、 Secondary development ability in the later stage 、 Team acceptance ( Such as whether cross language , Cross technology stack )
3、 Compare the advantages and disadvantages of the technical framework or architecture direction horizontally and vertically . Such as three high (AP or CP) Implementation and support of 、 Long term consideration of possible follow-up “ transfer ” cost 、 Whether it supports cross machine room 、 Multi data center storage 、 Multi cluster and multi tenant isolation 、 The smoothness of data migration
4、 Evaluate performance .CPU、Mem、 The Internet IO、 Minimum support for machine performance, such as disk occupancy . High concurrency Multi Request、 throughput 、 Response time RT、 Fault tolerance and other indicators
etc...
Demo - Realize trial
Performance evaluation & Pressure measurement
Grayscale - Try it on a small scale
Comprehensive upgrading & Use
边栏推荐
- Lenovo explains in detail the green smart city digital twin platform for the first time to solve the difficulties of urban dual carbon upgrading
- mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
- 更安全、更智能、更精致,长安Lumin完虐宏光MINI EV?
- Leetcode fizzbuzz C # answer
- HDU 1372 & POJ 2243 Knight Moves(广度优先搜索)
- Is the securities account opened by qiniu safe?
- 26. Delete the duplicate item C solution in the ordered array
- prometheus安装
- 2022CoCa: Contrastive Captioners are Image-Text Fountion Models
- Detailed explanation of issues related to SSL certificate renewal
猜你喜欢
【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案
Introduction to polyfit software
使用canal配合rocketmq监听mysql的binlog日志
Oracle with as ora-00903: invalid table name multi report error
Pytorch学习(四)
勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
YOLOv5s-ShuffleNetV2
Stream流
随机推荐
爬虫(6) - 网页数据解析(2) | BeautifulSoup4在爬虫中的使用
性能优化之关键渲染路径
mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
[release] a tool for testing WebService and database connection - dbtest v1.0
测试工程师如何“攻城”(上)
勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
Oracle with as ORA-00903: invalid table name 多表报错
基于NCF的多模块协同实例
Stream stream
1007 Maximum Subsequence Sum(25 分)(PAT甲级)
Wireshark网络抓包
用实际例子详细探究OpenCV的轮廓绘制函数drawContours()
求2的n次方
C#实现定义一套中间SQL可以跨库执行的SQL语句(案例详解)
Leetcode ransom letter C # answer
自由小兵儿
1002. A+B for Polynomials (25)(PAT甲级)
1009 Product of Polynomials(25 分)(PAT甲级)
《工作、消费主义和新穷人》的微信读书笔记
Unity adds a function case similar to editor extension to its script, the use of ContextMenu