Don’t Control, but Observe

?

Don’t Control, but Observe

Gregor Hohpe

TodAy’S SySTEMS ARE diSTRiBuTEd And looSEly CouplEd. Build- ing loosely coupled systems is a bit of a drag, so why do we bother? Because we want our systems to be flexible so they do not break apart at the slightest change. This is a critical property in today’s environments, where we may only control a small portion of our application, the remainder living in distributed services or third-party packages, controlled by other departments or external vendors.

So, it looks like the effort to build a system that is flexible and can evolve over time is a good idea. But that also means our system will change over time. As in “today’s system is not what it was yesterday.” Unfortunately, this makes doc- umenting the system challenging. It’s commonly known that documentation is out of date the moment it is printed, but in a system that changes all the time, things can only be worse. Moreover, building a system that is flexible gener- ally means the architecture is more complex and it’s more difficult to get the proverbial “big picture.” For example, if all system components communicate with one another over logical, configurable channels, one better have a look at the channel configuration to get any idea what is going on. Sending messages into the logical la-la-land is unlikely to trigger a compiler error, but it is sure to disappoint the user whose action was encapsulated in that message.

Being a control-freak architect is so yesteryear, leading to tightly coupled and brittle solutions. But letting the software run wild is sure to spawn chaos. You have to supplement the lack of control with other mechanisms to avoid doing an instrument flight without the instruments. But what kind of instruments do

?

??we have? Plenty, actually. Today’s programming languages support reflection, and almost all runtime platforms provide runtime metrics. As your system becomes more configurable, the current system configuration is another great source of information. Because so much raw data is difficult to understand, extract a model from it. For example, once you figure out which components send messages to which logical channels, and which components listen to these channels, you can create a graph model of the actual communication between components. You can do this every few minutes or hours, providing an accurate and up-to-date image of the system as it evolves. Think of it as “Reverse MDA.”1 Instead of a model driving the architecture, you build a flex- ible architecture, and extract the model from the actual system state.

In many cases, it’s easy to visualize this model, creating the literal big picture. However, resist the temptation to plot the 3×5-meter billboard of boxes and lines, which contains every class in your system. That picture may pass as con- temporary art, but it’s not a useful software model. Instead, use a 1,000-foot view as described by Erik Doernenburg, a level of abstraction that actually tells you something. On top of that, you can make sure your model passes basic validation rules, such as the absence of circular dependencies in a dependency graph, or no messages being sent to a logical channel no one listens to.

Letting go of control is a scary thing, even when it comes to system architec- ture. But supplemented by observation, model extraction, and validation, it is probably the way only to architect for the 21st century.

时间: 2024-10-13 00:07:01

Don’t Control, but Observe的相关文章

[蓝牙] 3、<KEIL path> \ARM\Device\Nordic\nrf51822\Board\pca10001\s110\ble_app_hrs BLE心率检测工程

Heart Rate Example The Heart Rate Application is a firmware example that implements the Heart Rate profile using the hardware delivered in the nRF51822 Development Kit. The source code and project file can be found in the <InstallFolder>\Nordic\nrf5

scan cell

scan cell有两种不同的input: 1)data input:由电路的combinational logic驱动: 2)scan input:由另一个scan cell驱动,从而形成scan chain: 在normal/capture mode下,data input来驱动output: 在shift mode下,scan input来驱动output: 几种scan_cell:muxed-D scan,clockd-scan,level-sensitive scan design(L

CNCF LandScape Summary

CNCF Cloud Native Interactive Landscape 1. App Definition and Development 1. Database Vitess:itess is a database clustering system for horizontal scaling of MySQL. Apache CarbonData:Apache CarbonData is an indexed columnar data format for fast analyt

五:理解控件的运行机制(例:基于Control命名空间的简单控件)

一:先用最简短的话说点理论的1.asp.net中所有的标准控件都可以重写 2.和控件相关的命名空间有 System.Web.UI.Control是所有控件的基类只提供简单的呈现逻辑,不支持样式表 System.Web.UI.WebControls.WebControl继承自Control支持控件外观 System.Web.UI.WebControls.CompositeControl继承自WebControl类派生出多个控件合成的复合控件 3.控件树的实现原理首先Page类本身就是一个控件,它继

hdoj 4289 Control 【拆点 求最小割】

Control Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2295    Accepted Submission(s): 961 Problem Description You, the head of Department of Security, recently received a top-secret informati

Price Control V or S in Material Type (Price control in material master )

When is it useful to use the price control V or S in Material Master?  Do I have to follow the SAP standard setting in the material type for the following material types: - ROH (Raw materials) -> moving average price - HALB (Semifinished products) ->

ORA-01665 control file is not a standby control file

ORA-01665错误处理 问题描述: 在备库启动至mount状态时,报如下错误: ORA-01665: control file is not a standby control file 解决办法: 在主库备份一个控制文件 SQL> alter database create standby controlfile as '/home/oracle/bak.ctl'; 然后传到备库,用此控制文件启动数据库即可

centOS 7一个解决“network.service: control process exited, code=exited status=1”方法

今天早上2017-08-04,我打开虚拟机,使用远程工具xshell对虚拟机进行连接,我发现连接不上去,然后我ifconfig,发现找不到ens33了,就剩一个本地回环,看来是我的网络出现了问题,然后我查看我的网络状态,发现了如下情况: [[email protected] ~]# systemctl status network.service ● network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d

nginx提示Job for nginx.service failed because the control的问题

启动nginx时就报错!Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. 墙内外找了一圈找了一圈终于还是在墙外找到答案了.. 现在假设你是这样操作的:你修改了/etc/nginx/conf.d/default.con