菜单

关于系统规划基准回想一点资讯

2019年1月24日 - 一点资讯

     如今有人问我
系统规划的尺度,事实上无论明日逐条技术栈怎么衍变,这些本质的尺码与措施不会变,
让大家回想一下 这几个条件:

•分散关心 Separation of concerns. Divide your application into
distinct features with as little overlap in functionality as possible.
The important factor is minimization of interaction points to achieve
high cohesion and low coupling. However, separating functionality at
the wrong boundaries can result in high coupling and complexity
between features even though the contained functionality within a
feature does not significantly overlap.
不相同世界的效应,应该由不一致的代码和微小重迭的模块组合。

•单一任务,功能高内聚 Single Responsibility principle. Each
component or module should be responsible for only a specific feature
or functionality, or aggregation of cohesive functionality.

•一个模块不要求精通另一个模块的里边细节 Principle of Least Knowledge
(also known as the Law of Demeter or LoD).
A component or object
should not know about internal details of other components or
objects.

•Don’t repeat yourself (DRY). You should only need to specify
intent in one place. For example, in terms of application design,
specific functionality should be implemented in only one component;
the functionality should not be duplicated in any other component.

•不要过于设计过多模块 Minimize upfront design. Only design what is
necessary. In some cases, you may require upfront comprehensive design
and testing if the cost of development or a failure in the design is
very high. In other cases, especially for agile development, you can
avoid big design upfront (BDUF). If your application requirements are
unclear, or if there is a possibility of the design evolving over
time, avoid making a large design effort prematurely. This principle
is sometimes known as YAGNI (“You ain’t gonna need it”).

一点资讯 1

软件设计 中 SOLID原则

Simplicity (KISS)

     The most important principle is keeping things simple.
不难是软件设计的目的,简单的代码占用时间少,漏洞少,并且易于修改。Simplicity
should be your northern star, your compass, and your long-term
commitment. Keeping software simple is difficult because it is
inherently relative. There is no standardized measurement of
simplicity, so when you judge what is simpler, you need to first ask
yourself for whom and when. For example, is it simpler for you or for
your clients? Is it simpler for you to do now or maintain in the
future?

低耦合原则(Minimize Coupling)

      
代码的其余一个局地应该压缩对别的区域代码的依赖性关系。尽量不要使用共享参数。低耦合往往是一揽子结构连串和漂亮设计的标志

Designing for scale      Designing for scale is a difficult art, and each technique
described in this section comes with some costs. As an engineer, you
need to make careful tradeoffs between endless scalability and the
practicality of each solution. To make sure you do not over engineer
by preparing for scale that you will never need, you should first
carefully estimate the most realistic scalability needs of your system
and design accordingly.
Design for Self-Healing
    
The final design principle in this chapter is designing
software for high availability and self-healing. A system is
considered to be available as long as it performs its functions as
expected from the client’s perspective. It does not matter if the
system is experiencing internal partial failure as long as it does not
affect the behavior that clients depend on. In other words, you want
to make your system appear as if all of its components were
functioning perfectly even when things break and during maintenance
times.
Designing For Failure
    
Each application component must be deployed across redundant
cloud components, ideally with minimal or no common points of
failure
      Each application component must make no assumptions about the
underlying infrastructure—it must be able to adapt to changes in the
infrastructure without downtime
      Each application component should be partition tolerant—in other
words, it should be able to survive network latency (or loss of
communication) among the nodes that support that component
      Automation tools must be in place to orchestrate application
responses to failures or other changes in the infrastructure

一部分设计的施行

Keep design patterns consistent within each layer. Within a
logical layer, where possible, the design of components should be
consistent for a particular operation. For example, if you choose to
use the Table Data Gateway pattern to create an object that acts as a
gateway to tables or views in a database, you should not include
another pattern such as Repository, which uses a different paradigm
for accessing data and initializing business entities. However, you
may need to use different patterns for tasks in a layer that have a
large variation in requirements, such as an application that contains
business transaction and reporting functionality.
Do not duplicate functionality within an application. There should
be only one component providing a specific functionality—this
functionality should not be duplicated in any other component. This
makes your components cohesive and makes it easier to optimize the
components if a specific feature or functionality changes. Duplication
of functionality within an application can make it difficult to
implement changes, decrease clarity, and introduce potential
inconsistencies.
Prefer composition to inheritance. Wherever possible, use
composition over inheritance when reusing functionality because
inheritance increases the dependency between parent and child classes,
thereby limiting the reuse of child classes. This also reduces the
inheritance hierarchies, which can become very difficult to deal
with.
Establish a coding style and naming convention for development.
Check to see if the organization has established coding style and
naming standards. If not, you should establish common standards. This
provides a consistent model that makes it easier for team members to
review code they did not write, which leads to better
maintainability.
Maintain system quality using automated QA techniques during
development.
Use unit testing and other automated Quality Analysis
techniques, such as dependency analysis and static code analysis,
during development. Define clear behavioral and performance metrics
for components and sub-systems, and use automated QA tools during the
build process to ensure that local design or implementation decisions
do not adversely affect the overall system quality.
Consider the operation of your application. Determine what metrics
and operational data are required by the IT infrastructure to ensure
the efficient deployment and operation of your application. Designing
your application’s components and sub-systems with a clear
understanding of their individual operational requirements will
significantly ease overall deployment and operation. Use automated QA
tools during development to ensure that the correct operational data
is provided by your application’s components and sub-systems.

在互联网系统下发出的有的规范

1.防止单点故障:任何东西都要有八个。那扩展了资金和复杂度,但却能在可用性和负载性能上收入。而且,那促进设计者接纳一种分布式优先的思维。可(异地)布署和内外路由连接,破除单点故障;可分布,可调度的条件

2.横向扩充,而不是纵向扩展:升级服务器(纵向)的本钱是指数拉长的,而充实另一台商用服务器(横向)的血本是线性增进的。
3.尽量减去应用程序大旨所急需做到的工作。

4.API优先:将应用程序视为一个提供API的劳动,而且,不假定服务的客户端类型(手机应用、Web站点、桌面应用程序)。

5.提供尽可能新的数目:用户可能不需求即刻看到最新的数码,最后一致性可以带来更高的可用性。
6.设计时要考虑珍惜和自动化:不要低估应用程序维护所急需的年华和工作量。软件首次公开宣布是一个值得称扬的里程碑,但也评释着真正的行事要从头了。
7.为故障做好准备:将故障对终端用户的震慑最小化。
8.数目反映和监控平台;
用户作为数据,系统性能监控数据,系统格外和业务相关数据等的上报
9.数码分级存储原则:单内存cache存储,内存cache+异步更新,内存cache+同步更新;
从四个纬度分析用户作为模型,决定有关数据的仓储策略:1),能经受用户数量的遗失吗?2),能经得住多少的非及时性吗?
3),数据的读写比例分布怎么着?
10.情形分离原则;
能静态化尽量静态化,在代码和进程安排上,在DNS层上做好气象分离的种类规划准备
11.轻重分开原则;
保险衔接和工作处理的离别,接入尽量轻量化,使得系统有着很好的吞吐量,处理尽量异步化,使得可以平滑扩大
12.
拔除服务依赖原则:同一IDC的其余服务对系统的影响,第三方调用系统接口的隔断和过载保养,着重第三方服务的监察和安全维护条件等。
13.柔性可用原则;
处理好很是处境下的灰度体验,区分好紧要处理途径和非关键路径,而系统规划要尽量把重大路径转换成非关键路径
14.异步化,能异步的尽心异步原则;
经过内存管道,操作流水等技巧进行拼接各类处理模块
15.灰度条件;
灰度揭橥政策是按照用户号码段,用户ip段,依旧用户vip等级,用户所在城市等展开灰度升级,保障系统的平滑迭代
16.卓殊的高效响应和一键切换原则;
IDC断电?系统切换来正常的资本是多少?时间呢?需求多少人操作?牛的系统可以一个人在管制后台按一个按钮就足以切换,再按一下就可以切换回来
17.有损服务条件;
用低本钱提供海量的劳动规范
18.丰裕利用DNS层做好系统的可分布设计
19.区分系统作为和用户作为并各自开展统筹,甚至在关键时刻可以举办转移。
20.努力达成无状态:状态音信要保留在尽可能少的地点,而且要保存在特意陈设的零件中。百折不挠app_server设计的无状态统筹原则,转变用户作为为系统作为,使得app_server具有无状态的特色
21.多级cache设计以及各种cache的路由设计
22.“大系统小做”原则  
23.强作业模型到最后一致性事务模型的变换原则
24.尽可能拆分
25.服务架构“去中心化”
26.数据化运营
27.尽可能使用成熟组件
28.尽可能自动化

周边web系统规划的有的骨干标准:

可用性:
一个网站的正常化运作时刻对于众多供销社的信誉与运行都是重视的。对于部分更大的在线零售站点,几分钟的不可用都会导致数千或数百万澳元的营收损失,由此系统规划得可以持续服务,并且能高效从故障中回复是技术和工作的最基本必要。分布式系统中的高可用性须要仔细考虑关键部件的冗余,从部分系统故障中火速复原,以及问题发出时优雅降级。
性能:
对于绝大部分站点而言,网站的属性已变为一个至关首要的设想因素。网站的速度影响着使用和用户满足度,以及查找引擎名次,与营收和是还是不是能留下用户一向有关。由此,创造一个针对性高速响应与低顺延进行优化的系统相当首要。
可靠性:
系统必须是保证的,那样同样数量请求才会始终重返相同的数码。数据变换或更新之后,同样的央求则应当回到新的多少。用户应该清楚一点:尽管东西写入了系统,或者取得存储,那么它会持久化并且肯定保持不变以便以后进行搜索。
可增加性:
对于别的大型分布式系统而言,大小(size)只是亟需考虑的规模(scale)问题的一个方面。同样关键的是极力去增强处理更大负荷的能力,那平常被喻为系统的可扩大性。可增加性以体系的许多见仁见智参数为参照:可以处理多少额外流量?伸张存储容量有多不难?可以处理多少越来越多的作业?
可管理性:
系统规划得不难运维是另一个关键的考虑要素。系统的可管理性等价于运维(维护和更新)的可扩张性。对于可管理性必要考虑的是:问题发生时便于诊断与明白,便于更新或涂改,系统运维起来何等简单(例如:常规运维是或不是不会吸引败北或尤其?)
成本:
开销是一个重大元素。很明确这包蕴硬件和软件花费,但也要考虑系统布署和维护这一派。系统构建所花费的开发者时间,系统运转所急需的运维工作量,以及陶铸工作都应当考虑进来。开支是颇具系统的总财力。

剩下来 就足以围绕 ISO 9126质地模型:软件质地模型的6大特征和27个子特性
来举办系统规划与分析,度量, 他们是:

一、功能性:
1、适合性:提供了对应的效果
2、准确性:正确(用户须求的)
3、互操作性:产品与产品中间交互数据的力量
4、保密安全性:允许通过授权的用户和系统可以正常的造访相应的数额和音讯,禁止未授权的用户访问…….
5、功用性的依从性:国际/国家/行业/集团 标准规范一致性

二、可相信性:产品在规定的规则下,在确定的光阴内形成规定职能的力量
1、成熟性:防止内部错误导致软件失效的力量
2、容错性:软件现离世障,自我处理能力
3、易復苏性:失效情形下的死灰复燃能力
4、可相信性的依从性

三、易用性:在指定使用原则下,产品被清楚、
学习、使用和引发用户的能力
1、易精晓性:
2、易学性:
3、易操作性:
4、吸引性:
5、易用性的依从性:

一点资讯,四、功用性:在确定台标准下,相对于所用资源的数目,软件出品可提供适宜性能的力量
1、时间特性:平均事务响应时间,吞吐率,TPS(每秒事务数)
2、资源利用性:CPU 内存 磁盘 IO 网络带宽 队列 共享内存
3、功用依从性:

五、软件维护性:”四规”,
在规定条件下,规定的时日内,使用规定的工具或艺术修复规定职能的力量
1、易分析性:分析定位问题的难易程度
2、易改变性:软件出品使指定的修改可以被完成的能力
3、稳定性:幸免意外修改导致程序失效
4、易 测试性:使已修改软件能被承认的能力
5、维护性的依从性

六、软件可移植性:从一种环境迁移到另一种环境的能力
1、适应性:适应差别平台
2、易安装性:被装置的能力
3、共存性:
4、易替换性
5、可移植性的依从性:

精心回顾现在种种的系统平台,框架,组件,工程措施,都至少含有有上面的宏图思想与规范。可能还有遗漏的,后续补充。


明天先到此时,希望对您在系统架构设计与评估,团队管理, 项目管理, 产品管理
有参考意义 , 您可能感兴趣的稿子:
互联网电商购物车架构衍生和变化案例
互联网业务场景下音信队列架构
信息系统架构设计演进
互联网电商搜索架构衍变之一
信用社音讯化与软件工程的迷思
商厦项目化管理介绍
软件项目成功之要素
人际沟通风格介绍一
精益IT社团与分享式领导
学习型协会与店家
供销社更新知识与等级观念
公司目的与民用目标
初创公司人才招聘与管理
人才集团环境与公司文化
店家文化、团队文化与文化共享
高功效的团协会建设
类型管理关系计划
构建高效的研发与自动化运维
某大型电商云平台实践
互联网数据库架构设计思路
IT基础架构规划方案一(网络连串规划)
餐饮行业解决方案之客户分析流程
餐饮行业解决方案之采购战略制定与履行流程
餐饮行业解决方案之业务设计流程
供应链要求调研CheckList
公司应用之性质实时度量系统衍生和变化

如有想询问越来越多软件设计与架构, 系统IT,集团信息化, 团队保管
资讯,请关切自我的微信订阅号:

一点资讯 2

作者:Petter Liu
出处:http://www.cnblogs.com/wintersun/
正文版权归小编和乐乎共有,欢迎转发,但未经小编同意必须保留此段阐明,且在小说页面显然地点给出原文连接,否则保留追究法律权利的义务。
该小说也同时揭橥在本人的单身博客中-Petter Liu
Blog

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图