软件架构师——软件架构

软件架构师

“Architecture is about the important stuff. Whatever that is”

“建筑是关于重要的东西。 不管是什么”

Software Architecture is the founding stone for any project. It is the set of principal design decisions made at the start of the project, the blueprint for a software system’s construction and evolution. It describes the system’s major components, their relationships, and how they interact with each other.

软件构架是任何项目的奠基石。 它是在项目开始时制定的一组主要设计决策,这是软件系统构建和发展的蓝图。 它描述了系统的主要组件,它们之间的关系以及它们之间如何交互。

Let’s start with understanding how Software Architecture has evolved over the years.

让我们首先了解多年来软件架构的发展。

Earlier in the 1990s, codes were organized as spaghetti with very little structure given to the whole product. Over the next decade, the structure was improved and codes were arranged in layers like lasagna. In recent times, a lot of push has been towards a ravioli-oriented structure, which is a bundle of many self-contained items. If you want an Indian equivalent, it started with sevaiya /maggi— everything tangled, then went to layered biryani — it’s big but structured and now they are like Kofta curry — each kofta complete in itself and the whole dish, taken all at once, is amazing.

在1990年代初期,代码被组织为意大利面条,对整个产品的结构很少。 在接下来的十年中,对结构进行了改进,并且代码被像烤宽面条那样分层放置。 近年来,人们对以馄饨为导向的结构进行了很多推动,该结构是许多独立物品的组合。 如果您想要印度菜,那就先从sevaiya / maggi开始-一切都纠结了,然后去了分层的biryani-它很大但是结构化,现在就像是Kofta咖喱-每个kofta本身就完成了,整道菜都一次吃了,是惊人的。

单片 (Monolithic)

The layered structure, used by most of the companies then in the 2000s refers to the Monolithic structure. Here, the software is built as a single unit. Any new feature is added to the core software. With every feature addition, the codebase becomes more and more complex, increasing the testing requirements to ensure no adverse impact on any other functionality. This complexity makes further development processes very slow. Monolithic software is like a baby elephant: cute and fun when they are little, but difficult to steer and resistant to change when they get big. But if you are sure to have a limited user base, it makes sense to build a monolithic structure, as it is simple to build and quick to launch.

当时,大多数公司在2000年代使用的分层结构是指整体结构。 在这里,该软件是作为单个单元构建的。 任何新功能都会添加到核心软件中。 每增加一个功能,代码库就会变得越来越复杂,从而增加了测试要求,以确保不会对任何其他功能产生不利影响。 这种复杂性使得进一步的开发过程非常缓慢。 整体式软件就像一头小象:很小的时候可爱而有趣,但是变大时很难操纵并且难以改变。 但是,如果您确定用户群有限,那么构建整体结构是很有意义的,因为它易于构建并且可以快速启动。

微服务 (Microservices)

The latest in the evolution, currently preferred by most of the large technology companies, is the Microservices architecture. Amazon, Netflix, Spotify, Uber, all have transformed their base structure from Monolithic to Microservices. Here, instead of building one big program, developers create a number of different tiny programs that are bundled together as one service. These programs connect with each other via an application programming interface (API), i.e., some tightly-controlled set of rules that both programs can handle. These collections or programs can be independently developed, deployed, and maintained, as long as it is ensured that they play well with the API.

在演变,目前大部分的大型科技企业的首选的最新产品,是微服务 建筑。 亚马逊,Netflix,Spotify和Uber都已将其基本结构从Monolithic转变为Microservices。 在这里,开发人员创建多个不同的小程序,而不是构建一个大程序,而是将它们捆绑在一起作为一项服务。 这些程序通过应用程序编程接口(API)相互连接,即两个程序可以处理的一组严格控制的规则。 这些集合或程序可以独立开发,部署和维护,只要确保它们与API配合良好即可。

Consider an example of Netflix. It uses around 700 microservices to control each of the many parts of what makes up the entire Netflix service: one microservice stores all the shows you watched, one deducts the monthly fee from your credit card, one provides your device with the correct video files that it can play, one takes a look at your watching history and uses algorithms to guess a list of movies that you will like, and one will provide the names and images of these movies to be shown in a list on the main menu, and more with other functionalities. Netflix engineers can make changes to any part of the application and can introduce new changes rapidly while ensuring that nothing else in the entire service breaks down.

以Netflix为例。 它使用大约700种微服务来控制组成整个Netflix服务的各个部分的每一个:一种微服务可以存储您观看的所有节目,一种可以从信用卡中扣除月费,一种可以为设备提供正确的视频文件,它可以播放,一个查看您的观看历史,并使用算法来猜测您想要的电影列表,一个将提供这些电影的名称和图像以显示在主菜单上的列表中,等等。与其他功能。 Netflix工程师可以对应用程序的任何部分进行更改,并可以快速引入新的更改,同时确保整个服务中的其他功能都不会崩溃。

其他一些架构 (Some more architectures)

While the ones discussed above are two ends of a spectrum and commonly used architectures, there are many more architecture patterns designed and documented for varied use-cases. These patterns help as a reference point for future work, to align one’s designs with what has been successful in the past. A live application may have one of the specific patterns as its base structure or it might be a mixture of two or three or even more, given the business use case. Some more examples of Software Architecture patterns are:

尽管上面讨论的是频谱的两端和常用的体系结构,但还有许多针对不同用例设计和记录的体系结构模式。 这些模式有助于将来的工作,使自己的设计与过去的成功保持一致。 在业务用例的情况下,实时应用程序可能具有一种特定的模式作为其基本结构,或者可能是两种或三种甚至更多种的混合物。 软件体系结构模式的更多示例包括:

Event-driven Architecture — Many programs are triggered only after a specific event takes place. This structure has a central unit that accepts all triggers/data and delegates them to respective programs handling that trigger. For example, every time you click on the mouse, it generates a trigger for the respective Javascript code to run at the backend for the intended action to take place.

事件驱动的体系结构—许多程序仅在发生特定事件后才触发。 该结构具有中央单元,该中央单元接受所有触发器/数据并将它们委托给处理该触发器的相应程序。 例如,每次您单击鼠标时,它都会为相应的Javascript代码生成一个触发器,以在后端运行以执行预期的操作。

Layered/ Multi-tier Structure — This is one of the most common structures for enterprise software systems, as it is built with a database at its base, and many business applications have data storage as their prime function. Usually, a three-layered architecture is used: a client-side user interface, a database, and a server-side application. Here, each layer in the structure is a monolith, has a different task, and can be managed by different programmers with access limited to specific layers. This is a useful feature where data protection is an important concern.

分层/多层结构-这是企业软件系统最常见的结构之一,因为它是以数据库为基础构建的,并且许多业务应用程序都以数据存储为主要功能。 通常,使用三层体系结构:客户端用户界面,数据库和服务器端应用程序。 在这里,结构中的每一层都是一个整体,具有不同的任务,并且可以由不同的程序员来管理,访问权限仅限于特定的层。 当数据保护成为重要问题时,这是一个有用的功能。

Microkernel Architecture — Consider the famous Dell customization offer when buying laptops. It has a core hardware over which you can select and drop features to get the final output as per your choice. Similarly, in Microkernel Architecture, as the name suggests, there is a central core part in the system. Multiple standalone, separately managed plug-ins with different features based on business use-case can be added to this core to form a variety of products. This is an ideal structure for applications with a fixed set of core routines and a dynamic set of rules that must be updated frequently.

微内核架构— 购买笔记本电脑时,请考虑著名的戴尔定制服务。 它具有核心硬件,您可以在其上选择和删除功能以根据您的选择获得最终输出。 类似地,顾名思义,在微内核体系结构中,系统中有一个核心核心部分。 可以将多个基于业务用例具有不同功能的独立管理的插件添加到此核心中,以形成各种产品。 对于具有固定的核心例程集和动态的规则集(必须经常更新)的应用程序来说,这是理想的结构。

The architecture makes everything float. You decide it right, you are done with half the job. You do that poorly, it takes everything down. As it is said, “The captain goes down with their ship ” — it also applies to engineers and architectural decisions. So without a doubt, these are the decisions you would want to get right early in the project.

该体系结构使所有东西浮空。 您决定正确,完成一半的工作。 您做得不好,它会使一切都消失了。 据说,“船长随船而降” –它也适用于工程师和建筑决策。 因此,毫无疑问,这些都是您希望在项目早期就做出的决定。

Govinda NathaniIIM Calcutta (2019–21)
Govinda NathaniIIM加尔各答(2019-21)
翻译自: https://medium.com/tech-trek-for-rookies/software-architecture-8d565fa736a

posted @ 2022-03-25 08:00  Gazikel  阅读(35)  评论(0编辑  收藏  举报