DISSERTATION  - Architectural Styles and the Design of Network-based Software Architectures

DISSERTATION - Architectural Styles and the Design of Network-based Software Architectures

by Roy Thomas Fielding

What is life?
It is the flash of a firefly in the night.
It is the breath of a buffalo in the wintertime.
It is the little shadow which runs across the grass
and loses itself in the sunset.

-Crowfoot’s last words(1890), Blackfoot warrior and orator.

Almost everybody feels at peace with nature: listening to the ocean
waves against the shore, by a still lake, in a field of grass, on a
windblown heath. One day, when we have learned the timeless way
again, we shall feel the same about our towns, and we shall feel as
much at peace in them, as we do today walking by the ocean, or
stretched out in the long grass of a meadow.

Christopher Alexander, The Timeless Way of Building (1979)

CHAPTER 1: Software Architecture

CHAPTER 2: Network-based Application Architectures

CHAPTER 3: Network-based Architectural Styles

CHAPTER 4: Designing the Web Architecture: Problems and Insights

CHAPTER 5: Representation State Transfer (REST)

CHAPTER 6: Experience and Evaluation

Uniform Resource Identifier, URI

INTRODUTION

The complexity of modern software systems have necessitated a greater emphasis on componentized system, where
the implementation is partitioned into independent components that communicate to perform a desired task. Software
architecture research investigates methods for determining how best to partition a system, how components identify
and communicate with each other, how information is communicated, how elements of a system can evolve
independently, and how all of the above can be described using formal and information notations.

At least some of this behavior within the software industry is due to a lack of understanding of why a given set of architectural constrains is useful. In other words, the reasoning behind good software architectures is not apparent to designers when those architectures are selected for reuse.


This dissertation explores a junction on the frontiers of two research disciplines in computer science: software and
**networking. Software research has long been concerned with the categorization of software designs and the development of design methodologies, but has rarely been able to objectively evaluate the impact of various design choices on system behavior. Networking research, in contrast, is focused on the details of generic communication **
**behavior between systems and improving the performance of particular communication techniques, often ignoring the **
fact that changing the interaction style of an application can have more impact on performance than the communication
protocol used for that interaction.

Discuss in Chapter 4. The Web is intended to be an Internet-scale distributed hypermedia system, which means
considerable more than just geographical dispersion. The Internet is about interconnecting information networks
across organizational boundaries. Suppliers of information services must be able to cope with the demands of anarchic
scalability and the independent deployment of software components. Distributed hypermedia provides a uniform means
of accessing services through the embedding of action controls within the presentation of information retrieved form
remote sites. An architecture for the Web must therefore be designed with the context of communicating large-grain
data objects across high-latency networks and multiple trust boundaries.

Chapter 5 introduces and elaborates the Representational State Transfer (REST) architectural style for distributed
hypermedia systems. REST provides a set of architectural constrains that, when applied as a whole, emphasizes
scalability of component interactions, generality of interfaces, independent deployment of components, and
intermediary components to reduce interaction latency, enforce security, and encapsulate legacy system. I describe
the software engineering principles guiding REST and the interaction constraints chosen to retain those principles,
contrasting them to the constraints of other architectural styles.

Like most real-world systems, not all components of the deployed Web architecture obey every constraint in its
architectural design. REST has been used both as a means to define architectural constraints. While mismatches
cannot be avoided in general, it is possible to identify them before they become standardized. Several mismatches
within the modern Web architecture are summarized in Chapter 6, along with analyses of why they arose and how they
deviate from REST.

In summary, this dissertation makes the following contributions to software research within the field of Information and
Computer Science:

a framework for understanding software architecture through architectural styles, including a consistent set of

terminology for describing software architecture;
a classification of architectural styles for network-based application software by the architectural properties

they would induce when applied to the architecture for a distributed hypermedia system;
REST, a novel architectural style for distributed hypermedia systems; and
application and evaluation of the REST architectural style in the design and deployment of the architecture for the

modern World Wide Web.

CHAPTER 1 Software Architecture

1.1 Run-time Abstraction

A software architecture is an abstraction of the run-time elements of a software system during some phase of its
operation. A system may be composed of many levels of abstraction and many phases of operation, each with its own
software architecture.

At the heart of software architecture is the principle of abstraction: kidding some of the details of a system through encapsulation in order to better identify and sustain its properties[117]. A complex system will contain many levels of abstraction, each with its own architecture. An architecture represents an abstraction of system behavior at that level,
such that architectural elements are delineated by the abstract interfaces they provide to other elements at the level [9].
Within each element may be found another architecture, defining the system of sub-elements that implement the behavior represented by the parent’s abstract interface. This recursion of architectures continues down to the most
basic system elements: those that cannot be decomposed into less abstract elements.

In addition to levels of architecture, a software system will often have multiple operational phases, such as start-up,
initialization, normal processing , re-initialization, and shutdown. Each operational phase has its own architecture. For example, a configuration file will be treated as a data element during the start-up phase, but won’t be considered an
architectural element during normal processing, since at that point the information it contained will have already been
distributed throughout the system. It may, in fact, have defined the normal processing, since at that point the information
it contained will have already been distributed throughout the system. It may, in fact, have defined the normal
processing architecture. An overall description of a system architecture must be capable of describing not only the
operational behavior of the system’s architecture during each phase, but also the architecture of transitions between
phases.

Perry and Wolf [105] define processing elements as “transformers of data,” while Shaw et al.[118] describe
components as “the locus of computation and state.” This is further clarified in Shaw and Clements [122]: “A component is a unit of software that performs some function at run-time. Examples include programs, objects, processes, and filters.” This raises an important distinction between software architecture and what is typically referred to as software
structure: the former is an abstraction of the run-time behavior of a software system, whereas the latter is a property of
the static software source code. Although there are advantages to having the modular structure of the source code
match the decomposition of behavior within a running system, there are also advantages to having independent
software components be implemented using parts of the same code (e.g., shared libraried). We separate the view of
software architecture from that of the source code in order to focus on the software’s run-time characteristics independent of a given component’s implementation. Therefore, architectural design and source code structural design,
though closely related, are separate design activities. Unfortunately, some descriptions of software architecture fail to
make this distinction (e.g., [9]).

1.2 Elements

As an illustration, consider what happens to a building if its blueprints and design plans are burned. Does the
building immediately collapse? No, since the properties by which the walls sustain the weight of the roof remain intact.
An architecture has, bu design, a set of properties that allow it to meet or exceed the system requirements. Ignorance of
those properties may lead to later changes which violate the architecture, just as the replacement of a load-bearing wall
with a large window frame may violate the structural stability of a building. Thus, instead of rationale, our definition of
software architecture includes architectural properties. Rationale explicates those properties, and lack of rationale may
result in gradual decay or degradation of the architecture over time, but the rationale itself is not part of the architecture.

1.2.1 Components

A component is an abstract unit of software instructions and internal state that provides a transformation of data via
its interface.

1.2.2 Connectors

A connector is an abstract mechanism that mediates communication, coordination, or cooperation among
components.

1.2.3 Data

A datum is an element of information that is transferred from a component, or received by a component, via
a connector.

1.3 Configurations

A configuration is the structure of architectural relationships among components, connectors, and data during
a period of system run-time.

1.5 Styles

An architectural style is a coordinated set of architectural constraints that restricts the roles/features of architectural
elements and the allowed relationships among those elements within any architecture that conforms to that style.

A good designer should select a style that matches the needs of the particular problem being solved.

Choosing the right architectural style for a network-based application requires an understanding of the problem
domain and thereby the communication needs of the application, an awareness of the variety of architectural
styles and the particular concerns they address, and the ability to anticipate the sensitivity of each interaction
style to the characteristics of network-based communication.

1.6 Pattern and Pattern Languages

Like software architectural styles, the software patterns research has deviated somewhat from its origin in building
architecture. Indeed, Alexander’s notion of patterns centers not on recurring arrangements of architectural
elements, but rather on the recurring pattern of events - human activity and emotion - that take place within space,
with the understanding that a pattern of events cannot be separated from the space where it occurs.

As an element in the world, each pattern is a relationship between a certain context, a certain system of forces
which repeatedly in that context, and a certain spatial configuration which allows these forces to resolve
themselves.

As an element of language, a pattern is an instruction, which shows how this spatial configuration can be used,
over and over again, to resolve the given system of forces, wherever the context makes it relevant.

The pattern is, in short, at the same time a thing, which happens in the world, and the rule which tells us how to
create that thing, and when we must create it. It is both a process and a thing; both a description of a thing which
is alive, and a description of the process which will generate that thing.

1.7 Views

An architectural viewpoint is often application-specific and varies widely based on the application domain.
we have seen architectural viewpoints that address a variety of issues, including: temporal issues, state and
control approaches, data representation, transaction life cycle, security safeguards, and peak demand and
graceful degradation. No doubt there are many more possible viewpoints.

Three important views in software architecture: processing, data, and connection views.

  1. A process view emphasized the data flow through the components and some aspects of the connections among
    the components with respect to the data.
  2. A data view emphasized the processing flow, with less emphasis on the connectors.
  3. A connection view emphasizes the relationship between components the state of communication.

1.8 Related Work

1.8.1 Design Methodologies
1.8.2 Handbooks for Design, Design Patterns, and Pattern Languages
1.8.3 Reference Models and Domain-specific Software Architectures(DSSA)
1.8.4 Architecture Description Languages (ADL)
1.8.5 Formal Architectural Models

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 200,045评论 5 468
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 84,114评论 2 377
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 147,120评论 0 332
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,902评论 1 272
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,828评论 5 360
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,132评论 1 277
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,590评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,258评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,408评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,335评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,385评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,068评论 3 315
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,660评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,747评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,967评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,406评论 2 346
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,970评论 2 341

推荐阅读更多精彩内容