系统技术方案 系统构架_构架系统时应注意的事项
系统技术方案 系统构架
by Ayelet Sachto
通过Ayelet Sachto
架构系统时要记住的6件事 (6 Things to keep in mind when architecting a system)
Architecture may sound like a “scary ” or overwhelming subject, but actually, applying logic and approaching the problem methodologically simplifies the process drastically.
体系结构听起来可能像是“恐怖”或压倒性的话题,但实际上,应用逻辑并以方法论的方式解决问题可以极大地简化流程。
When you architect a system, service, or feature, you actually design a solution to a problem in a specific context. The solution should answer a real need and solve the problem at hand.
当您设计系统,服务或功能时,实际上是在特定上下文中设计问题的解决方案 。 解决方案应满足实际需求并解决眼前的问题。
Throughout the text, I’ll be using solution in order to emphasize that the systems, services, and features we build are part of a bigger flow.
在整篇文章中,我将使用解决方案来强调我们构建的系统,服务和功能是更大流程的一部分。
When designing a solution think about the entire environment flow you affect.
设计解决方案时,请考虑您所影响的整个环境流程。
- Think about what happens before the data reaches your code想想数据到达代码之前会发生什么
- What triggers your feature or service是什么触发了您的功能或服务
- Who sends it?谁寄的?
- Is it something automatic?它是自动的吗?
- Is it a user?是用户吗?
This will also help you think about tests and edge cases you want to address, what happens after, who would use it and how.
这也将帮助您考虑要解决的测试和极端情况,之后发生的事情,谁将使用它以及如何使用。
1.了解问题 (1.Understand the problem)
Start from understating the problem at hand and understand your boundaries. Don’t optimize for an unknown future, focus on the current situation and most importantly, don’t make assumptions. Don’t limit yourself by requirements that are not there.
从轻描淡写眼前的问题开始,了解您的界限。 不要针对未知的未来进行优化,而要关注当前情况,最重要的是, 不要做任何假设。 不要受到不存在的要求的限制。
Make sure you have all the information you need to understand the problem, don’t be afraid to do research, Google is your friend ;)
确保您拥有了解问题所需的所有信息,不要害怕进行研究,Google是您的朋友;)
2.了解您的界限并设定优先级 (2. Understand your boundaries and set priorities)
Solution architecture is always a trade-off between concerns, such as resilience, security, data integrity, throughput, scalability, performance and of course cost.
解决方案体系结构始终是折衷之间的权衡,例如弹性,安全性,数据完整性,吞吐量,可伸缩性,性能以及成本。
Think about value vs friction
考虑价值与摩擦
Understand your constraints. What are your must-haves. If you have a product team, work with them in order to understand the business need, impact and SLA’s. This will help you understand your considerations and limitations better.
了解您的约束。 您必须具备什么。 如果您有产品团队,请与他们合作,以了解业务需求,影响和SLA。 这将帮助您更好地了解您的注意事项和限制。
Use data to make priorities, avoid assumptions when possible and be data-driven.
使用数据 确定优先级 ,在可能的情况下避免假设,并以数据为驱动力。
- How many users?有多少用户?
- Number of requests?请求数量?
- Size of requests?请求大小?
Test your service in order to estimate the resources that are needed.
测试您的服务以估计所需的资源。
Make sure you address the maximum rate you want to support and not only the average (look at percentage vs average).
确保您解决了要支持的最大比率,而不仅仅是平均值(查看百分比与平均值)。
Think about solving the problem and not just how to solve it. First think about the solution and only after that think about the implementation. When you free yourself from the expectation of how the solution should look like, you understand that a solution can be provided in many forms. It can be a system, service, feature, process or even documentation.
想想解决问题,而不仅仅是如何解决这个问题。 首先考虑解决方案,然后再考虑实现。 当您从的解决方案应该如何看起来像期望中解放出来,你明白,一个解决方案能够以多种形式来提供。 它可以是系统,服务,功能,过程甚至文档。
3.问为什么? (3. Ask WHY?)
Challenging people and even yourself can be frustrating sometimes. But asking why can help you solve the real problem, understand the mandatory requirements and your boundaries, and can help you avoid mistakes and understand the motivation from the business side.
挑战性的人甚至您自己有时都会感到沮丧。 但是问为什么可以帮助您解决真正的问题,了解强制性要求和边界,并可以帮助您避免错误并从业务方面了解动机。
- Why is it a real pain?为什么是真正的痛苦?
- Why should it be done like this?为什么要这样做?
- Why it works like this today?为什么今天这样工作?
Challenge yourself and ask questions. It will help make better decisions and better solutions.
挑战自己,问问题。 这将有助于做出更好的决策和更好的解决方案。
4.您的解决方案不是在真空中 (4. Your solution is not in a vacuum)
Context is important. A startup of 4 people that needs to provide MVP and is limited by funds will and should solve a problem differently than a team in a big organization that needs to create a sustainable product that will need to be maintained by several teams.
上下文很重要。 与需要提供MVP并受资金限制的4人创业公司相比,解决这个问题的方式应该不同于大型组织中需要创建可持续产品(需要由多个团队维护)的团队。
Going back to my first statement, after you understand the problem think about the context.
回到我的第一句话,理解问题后,考虑一下上下文。
- What are the tools you have at your disposal?您可以使用哪些工具?
- Are you part of a big organization?您是大型组织的成员吗?
- Are there any limitations such as time or money?有时间或金钱等限制吗?
- Who will maintain the solution?谁来维护解决方案?
Think about what is right for your situation, define what production ready means to you, and whether it should be highly available (HA). Think about the ROI. Should you address Edge cases?
考虑什么适合您的情况,定义准备生产对您意味着什么 ,以及它是否应具有很高的可用性(HA)。 考虑一下投资回报率 。 您应该解决边缘案例吗?
- How would you design a solution that will return values from a database?您将如何设计一个将从数据库返回值的解决方案?
- And what if I told you that it would be used only once a week until the end of the year. Would it change your answer? Would it affect the design?而且,如果我告诉您,直到年底将仅每周使用一次,该怎么办。 它会改变您的答案吗? 会影响设计吗?
- If you have 1 day to build a solution would it be the same as if you had a month?如果您有1天的时间来构建解决方案,那将与您有一个月的时间一样?
Think about growth. For different solutions and different companies, growth means different things. It can be from a scale perspective, such as supporting the growth of additional users. It can also be from a functionality perspective, where your solution should be flexible to enable other developers to add /modify functionality with ease.
考虑增长 。 对于不同的解决方案和不同的公司,增长意味着不同的事情。 它可以从规模角度来看,例如支持其他用户的增长。 从功能的角度来看,它也可以是灵活的 ,您的解决方案应具有灵活性,以使其他开发人员可以轻松添加/修改功能。
5.费用 (5. Cost)
As engineers and developers, we sometimes do not stop to think about the cost of our solutions and services. From my experience it is mostly due to lack of awareness and not willingness.
作为工程师和开发人员,我们有时不停地思考我们的解决方案和服务的成本。 根据我的经验,这主要是由于缺乏意识和不愿意。
When we are at university, we are “pumped” with performance and complexity concerns, and taught to think about the efficiency of the solution. But when designing a product that will be used, we need to also think about efficiency with regards to cost. You can build an amazing stable and reliable service that provides value, but if its ROI is not high or if your company won’t be able to afford the cost, it will be axed in favor of other alternatives.
当我们上大学时,我们会被性能和复杂性问题“困扰”,并被教会去思考解决方案的效率。 但是,在设计将要使用的产品时,我们还需要考虑成本方面的效率。 您可以构建出色的稳定,可靠的服务来提供价值,但是如果投资回报率不高,或者如果您的公司无法负担得起成本,那么它将被其他替代方案所取代。
Remember, performance and infrastructure are not free.
请记住,性能和基础架构不是免费的。
6.生产部署仅仅是开始 (6. Production deployment is only the beginning)
An important concept that sometimes is neglected is maintenance. Is our system or service stable and easy to maintain, debug, troubleshoot and fix?
维护有时是一个有时被忽略的重要概念。 我们的系统或服务是否稳定且易于维护,调试,故障排除和修复?
Production deployment is only the beginning of our solution. Make sure it can be easily maintained, make sure it is production ready and can serve real traffic and users. When developing your solution, think about end to end monitoring, focusing on application monitoring vs. utilization, and make sure to add logging and documentation.
生产部署仅仅是我们解决方案的开始。 确保可以轻松维护它,确保已准备好生产并且可以为实际流量和用户提供服务。 在开发解决方案时,请考虑端到端监控,着重于应用程序监控与利用率,并确保添加日志记录和文档。
When designing your solution, think about a simple and easy to maintain design, as much as the requirements allow for it of course.
设计解决方案时,请考虑一个简单且易于维护的设计,当然要满足需求。
As developers, we are sometimes drawn to new “flashy” and trendy technologies. Stop to think whether this technology is mature enough. Could it be maintained in production? Could a different stack be more efficient or offer fewer risks?
作为开发人员,有时我们会被吸引到新的“时髦”技术。 停止思考这项技术是否足够成熟。 可以在生产中进行维护吗? 不同的堆栈能提高效率还是减少风险?
结语 (Wrapping up)
To recap, if you want to architect the best solution EVER, start from understanding the problem and your limitations, and know the context of the solution you are trying to design for.
总结一下,如果您想构建有史以来最好的解决方案,请先了解问题和局限性,然后了解要设计的解决方案的上下文。
Then think about what happens with your solution after it’s up.
然后考虑解决方案启动后会发生什么。
Unless you have unlimited funds (which is never the case), think about your solution’s cost and make sure that it maintainable.
除非您有无限的资金(永远不会这样),否则请考虑解决方案的成本并确保其可维护。
If you liked what you read, be sure to ? it below!
如果您喜欢阅读的内容,请务必阅读? 在下面!
Let me know in the comments ❤ if you like more architecture posts and/or would like me to deep dive about each of the points above.
在评论❤中让我知道,如果您喜欢更多的建筑文章和/或希望我深入探讨上述各个方面。
翻译自: https://www.freecodecamp.org/news/what-to-keep-in-mind-when-architecting-a-system-912ec5c6f79/
系统技术方案 系统构架
相关文章:

[LeetCode] Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num 38, the process is like: 3 8 11, 1 1 2. Since 2 has only one digit, return it. 分析一:最简单的循环方法 class Solutio…

vue 点击事件执行多次
把 click 改成 click.once 就可以了 示例代码 click.once"down" 这样有一个弊端,就是事件只执行一次就不再执行了, 另一种方式,做一个定时器 //默认设置dddown为 true if(that.dddown){that.dddown falsesetTimeout(function(…

如何以及为什么使用Android Visibility Listeners
The Android UI is built up from Views, and in a regular application, there are usually several of them. To find out which View the user is currently looking at, you need to install Visibility Listeners.Android UI是从Views构建的,在常规应用程序中&…

在vue中使用Element-UI
Element-UI是一套基于Vue2.0的UI组件库,http://element.eleme.io/#/zh-CN/component/carousel 首先npm install element-ui --save 然后在main.js中引入: import Vue from vue import ElementUI from element-ui import element-ui/lib/theme-default/in…
Flex布局教程(来源:阮一峰)
网页布局(layout)是 CSS 的一个重点应用。Flex 布局将成为未来布局的首选方案。本文介绍它的语法,下一篇文章给出常见布局的 Flex 写法。网友 JailBreak 为本文的所有示例制作了 Demo,也可以参考。 以下内容主要参考了下面两篇文…

ibatis的there is no statement named xxx in this SqlMap
报错情况如下:com.ibatis.sqlmap.client.SqlMapException: There is no statement named Control.insert-control in this SqlMap. at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getMappedStatement(SqlMapExecutorDelegate.java:231)at com.ibatis.sq…

javascript案例_如何在JavaScript中使用增强现实-一个案例研究
javascript案例by Apurav Chauhan通过Apurav Chauhan 如何在JavaScript中使用增强现实-一个案例研究 (How to use Augmented Reality with JavaScript — a case study) In this experiment, I talk about how Augmented Reality with JS can be used to make learning more f…

久未更 ~ 一之 —— 关于ToolBar
很久没更博客了,索性开一个久未更 系列 > > > > > 久未更 系列一:关于ToolBar的使用(后续补充) 1 //让 ToolBar 单独使用深色主题 使得 toolbar 中元素 变为淡色 2 android:theme"style/ThemeOverlay.AppCompat.Dark.ActionBar"…
SQLServer怎样把本地数据导入到远程服务器上(转载)
平常用到mssql时间比较少,总是过一段时间就忘记应该怎么操作了。当要做mssq把本地数据导入到远程服务器的时候,就去网上搜索很久都没有图解的,所以今天自己收集一下免得下次又到处去找。希望对自己,同时对其它需要的人都有一定的帮…

input 默认样式的修改
/* 修改input选中的默认边框样式 */ outline: none; /* 修改input的选中时的光标颜色 */ caret-color:red; /* 修改input的选中时的默认边框 */ border: none; /* 修改input的提示文字的默认样式 */ input::-webkit-input-placeholder{color:#d0d0d0;}

巨石加密_点餐:如何吃一个可怕的巨石
巨石加密by Alan Ridlehoover通过艾伦里德尔霍弗 点餐:如何吃一个可怕的巨石 (Ordering Take Out: How to Eat a Scary Monolith) Martin Fowler said:马丁福勒(Martin Fowler) 说 : Almost all the successful microservice stories have started wit…

Halcon学习之六:获取Image图像中Region区域的特征参数
area_center_gray ( Regions, Image : : : Area, Row, Column ) 计算Image图像中Region区域的面积Area和重心(Row,Column)。 cooc_feature_image ( Regions, Image : : LdGray, Direction : Energy,Correlation, Homogeneity, Contrast ) …

dos下命令行执行程序时候注意程序所使用文件的路径问题
dos下命令行执行程序时候,最好是用cd命令先切换到程序所在目录下,这样就不会出现文件找不到的问题,如果由于特殊原因,不使用cd命令,而只使用路径命令时候程序中访问的资源也只能是改成绝对路径了,这样对有源…

Vant 使用之Toast Vant安装和使用
Vant 是一个VUE 的移动端组件库,里面有很多好用的组件。 第一步,安装和配置 Vant npm i vant -S npm i babel-plugin-import -D 安装完成之后,在项目 .babelrc 文件修改配置 plugins "plugins": [["import", {"…

15-5重构_重构-糟糕,我一直在向后做。
15-5重构by Justin Fuller贾斯汀富勒(Justin Fuller) 重构-糟糕,我一直在向后做。 (Refactoring — oops, I’ve been doing it backwards.) Welcome to my intervention. I’m a refactoring addict and I’m not afraid to admit it, but there’s only one prob…

JPush 使用教程
JPush 使用教程 自己使用的一些经验,为了方便直接从这里复制过去就行。 就当做个笔记,防止长时间忘记之后,还需要去官网看文档。 主要思路: sdk文件 三方依赖系统库 头文件 添加代理 初始化代码 1.版本信息 JPush : 2.2.0 Xco…

浏览器常见兼容性问题汇总
1、随便写几个标签,不加样式控制的情况下,各自的margin 和padding差异较大,解决方案是:*{margin:0;padding:0;} 2、块属性标签float后,又有横行的margin情况下,在IE6显示margin比设置的大,常出现…

VUE 动态绑定class
第一种:通过一个布尔值判断样式类是否生效 //isActive 是在data里面布尔值, rotateRight 是 class 样式类 //isActive 为true时样式类 rotateRight 生效 <div :class"{rotateRight:isActive}">abs</div> 第二种:通…

低声教育_我内心低声说:“成为建设者”
低声教育by Rebecca Radding由丽贝卡拉丁(Rebecca Radding) 我内心低声说:“成为建设者” (Something within me whispered: “Be the builder”) 加沙代码学院前任主持人Yasmin Hillis(自称嬉皮士)是一个内心的嬉皮士,她谈到了弗吉尼亚伍尔夫如何激发她…

【Web API系列教程】1.2 — Web API 2中的Action Results
前言 本节的主题是ASP.NET Web API怎样将控制器动作的返回值转换成HTTP的响应消息。 Web API控制器动作能够返回下列的不论什么值: 1。 void 2。 HttpResponseMessage 3, IHttpActionResult 4, Some other type 取决于返回的以上哪一种。…

前端开发常用单词
methods 方法 mounted 创建完成 export 输出 default 默认的 install 安装 components 组件 template 模板 params 参数 route 路线;途径 package 包;盒子;袋 ; toutes 路由器 plugin 插件 local host 本地 require 需要;依赖; storage 储存 prototype 原型 …

原生ajax的post操作
xml.open(方法,路径,是否开启异步); console.log(e);来找出数据所在位置; 调用 ajax只能传二进制或字符串,需要先把json转一下,JSON.stringify(); 获取到数据时我们要通过JSON.parse()再转成JSO…

jquery后学什么_我在训练营两年后学到了什么
jquery后学什么by Kara Luton卡拉卢顿(Kara Luton) 我在训练营两年后学到了什么 (What I’ve Learned Two Years Post-Bootcamp) It’s been two entire years since I left behind my career of being a music publicist — one I worked towards all of college and miracul…

ExecutorService 的理解与使用
接口 Java.util.concurrent.ExecutorService 表述了异步执行的机制,并且可以让任务在后台执行。壹個 ExecutorService 实例因此特别像壹個线程池。事实上,在 java.util.concurrent 包中的 ExecutorService 的实现就是壹個线程池的实现。 ExecutorService…

前后端交互,网络请求
这边文章主要根据我自己的前端开发工作经验,东拼西凑出来的一点理解,希望能够对大家有点帮助,如果有误导或者错误的地方还请帮助指正,感谢!!! 前后端交互我理解主要分为三个主要的部分…

HDU 1877 另一个版本 A+B
另一个版本 AB Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 12894 Accepted Submission(s): 4901Problem Description输入两个不超过整型定义的非负10进制整数A和B(<231-1)。输出AB的m (1 < m <10…

gatsby_如何使用Gatsby.js来获取内容
gatsbyby Dimitri Ivashchuk由Dimitri Ivashchuk 如何使用Gatsby.js来获取内容 (How to source content with Gatsby.js) Gatsby.js is a powerful static site generator (with dynamic capabilities) which can be used to build super performant web-sites. It has a very…

使用 AFNetworking 进行 XML 和 JSON 数据请求
(1)XML 数据请求 使用 AFNetworking 中的 AFHTTPRequestOperation 和 AFXMLParserResponseSerializer,另外结合第三方框架 XMLDictionary 进行数据转换 使用 XMLDictionary 的好处:有效避免自行实现 NSXMLParserDelegate 委托代理…

批处理+定时任务实现定时休息提醒
前言:俗话说的好,懒是第一生产力,懒是提高生产效率的必要条件。而现今windows是大部分人的第一生产工具,批处理定时任务这对黄金搭档就是提升生产效率的第一工具。大家在生产过程中经常会遇到各种周期性的重复的工作,比…

后端返回的数据中换行符 html换行
标签代码 <span v-html"model3_txt"></span> vue js代码 var txt "恭喜你\n获得某某某奖品"; if(txt.indexOf(\n)!-1){var reg new RegExp("/r/n", "g");txttxt.replace(reg, "<br/>");console.log(t…