Scalability and Extensibility in Software Engineering

 Definition

可扩展性(Scalability)是指 系统/网络/软件 能被快速方便应用到的不断增长的工作中的能力。例如,好的数据库系统可以通过增加硬件设施扩大数据库容量。

Scalability is the capability of a system, network, or process to handle a growing amount of work, or its potential to be enlarged to accommodate that growth. For example, a system is considered scalable if it is capable of increasing its total output under an increased load when resources (typically hardware) are added. An analogous meaning is implied when the word is used in an economic context, where a company's scalability implies that the underlying business model offers the potential for economic growth within the company.

Ref: https://en.wikipedia.org/wiki/Scalability

可延展性 (Extensibility)是指系统能够方便的增加组件、扩充功能的能力。例如,好的(松耦合)软件在增加/修改功能时不需要花很多时间去处理耦合关系,可以轻易的延展其功能。

Extensibility is a software engineering and systems design principle where the implementation takes future growth into consideration. The term extensibility can also be seen as a systemic measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be through the addition of new functionality or through modification of existing functionality. The central theme is to provide for change – typically enhancements – while minimizing impact to existing system functions.

Ref: https://en.wikipedia.org/wiki/Extensibility

 Application in Software

Scalability

对于软件公司来说,Scalability指同一个产品被多次重复利用的能力,这种能力对于商业软件非常重要,因为其开发成本一定,能服务于越多的用户就能创造越大的利润。

Scalability的设计理念体现在软件设计的各个方面,以下是我有体会的一些地方:

1. 权限管理

权限管理可以使得系统使用一套系统框架就可以服务于多种不同类型的用户(eg. 不同权限等级的用户:管理员、开发者、分析者等用户),不同类型的用户共用一套系统框架、一套数据库、一套交互界面,使得一次开发的成果应用在多个不同类型的用户上,是一种典型的提升Scalability的体现。

而且,权力的下放可以减轻开发者的工作量,同时对于面向业务的工作人员也可以减少与开发人员的沟通成本,对业务作出更快的反应。

Ref: http://help.finereport.com/doc-view-661.html

2. 通用功能

提供通用的功能,保证成本的情况下尽可能多的覆盖通用的功能,使得对该软件有需求的用户更多。举一个常见的通用功能的例子:系统监控,dynatrace这家公司就从监控功能这一个点入手已经做得风生水起了,同类的公司还有sematext等,可见这一个通用的功能是有多么大的市场。

反之,对于应用较少的边缘功能,无需开发,因为同样的成本带来的收益相对于通用功能来说太少了,而且会造成许多不必要的麻烦,如果定制化的服务不能回收巨大的回报,这样的开发需求最好拒绝(当然,这是公司层面的考虑,程序员提出拒绝开发的要求需要较大的影响力)。但是实际的业务中肯定有这种定制化的需求,一些软件公司的企业服务部门就专门在做这个事情,收费一般也会比较高。

3. 性能测试

服务于大量用户,需要保证在大量用户同时在线时系统的稳定性、并发的可靠性。

Ref: https://blog.csdn.net/huangjin0507/article/details/51878559

Extensibility

Extensibility在软件开发过程中有着非常多的体现。

基本上所有的设计模式都有增强Extensibility的理念在其中,比如经典的工厂模式,用抽象方法代替实例化过程,真正实例化的过程要放到子类中,通过工厂方法可以灵活的定义子类,不需要太多的修改原有代码(仅需在调用子类时做具体的业务流程)。

Ref: https://blog.csdn.net/sinat_34763749/article/details/80586218

同样的,微服务通过将大型服务拆分成松耦合的小块,小块之间通过一定的协议通信,来完成原来大服务的工作内容。需要新增/修改逻辑时,仅需开发/改动自己的服务,之后在服务器上进行简单的通信配置,不影响其他服务的进程,这个过程也体现了Extensibility的理念。

Ref: https://martinfowler.com/articles/microservices.html

猜你喜欢

转载自blog.csdn.net/sinat_34763749/article/details/80733629