﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-全世界的屋顶-文章分类-REST</title><link>http://www.blogjava.net/honeybee/category/29111.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 22 Feb 2008 13:27:30 GMT</lastBuildDate><pubDate>Fri, 22 Feb 2008 13:27:30 GMT</pubDate><ttl>60</ttl><item><title>我的读后感二：架构如此，人生亦如此！</title><link>http://www.blogjava.net/honeybee/articles/181449.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Fri, 22 Feb 2008 08:47:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/181449.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/181449.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/181449.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/181449.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/181449.html</trackback:ping><description><![CDATA[<p>&nbsp;&nbsp;&nbsp; 用了近一周的时间认真读了作者Roy Thomas Fielding的博士论文《Architectural Styles and the Design of Network-based Software Architectures》，虽然要完整读完这篇长达180余页的Paper还需要一到两天的时间，但Roy Thomas Fielding博士对于网络的架构思想及他的REST架构深深地吸引着我。<br />
&nbsp;&nbsp;&nbsp;&nbsp; 对于这篇论文的论述，思路上，从简单的Software Architecture谈起，逐渐深入到基于网络的architectures, properties,styles等，最后提出了REST架构风格；对于每个部分的阐述，方法上，从最简单的模型说起，逐步深入直至引出一个完整而综合的模型。何谓简单的模型？我觉得，是一种 null styled and constrainted model。何谓复杂的模型或者说是架构风格？我觉得，是一种 architectural style consisting of the set of constraints applied to elements within the architecture。不难发现，从简单过渡到复杂的关键点是&#8220;constraints&#8221;。其实，在做架构时，道理很简单——首先考虑的是大方向，给自己一个概念上的目标，得到一个初级的模型，然后在此基础上，结合自己的学习、前人的经验，进而考虑种种约束、细节极现实情况，力争设计出一个具有Performance, Scalability, Simplicity, Modifiability, Visibility, Reliability and etc.的系统。道理虽然简单，问题在于平时的学习中，我是否主观的思考过？推而广之，对于生活的态度，人生的认识，道理是否也是一样呢？<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 其实，架构如此，人生亦如此！<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于这篇论文，我认为，它不单纯是一篇学位论文，因为作者的写作手法，写作语言真的值得我学习，如，对于架构的方法，作者从derivation tree的角度类比阐述，形象而生动，我想，Roy Thomas Fielding的博士论文为我今后写论文帮助很大。<br />
&nbsp;&nbsp;&nbsp;&nbsp; 另外，本篇论文的知识量很大，仅从一篇文章便可以学到很多知识，如常见的架构风格，架构关注的特性，互联网很多协议的产生及发展等等，待完整读完后，我会收获更多！<br />
&nbsp;&nbsp;&nbsp;&nbsp; 世界著名架构大师，UC Berkeley教授Christopher Alexander说过下面一段话——<br />
&nbsp;&nbsp;&nbsp;&nbsp; "Each one of us has, somewhere in his heart, the dream to make a living world, a universe. Those of us who have been trained as architects have this desire perhaps at the very center of our lives: that one day, somewhere, somehow, we shall build one building which is wonderful, beautiful, breathtaking, a place where people can walk and dream for centuries."<br />
&nbsp;&nbsp;&nbsp;&nbsp; 我很喜欢这段话，在此我把它翻译过来，我想，它对与我，是一个长期不便的目标，是一股持之以恒的力量，更是一种恒定不变的信念！<br />
&nbsp;&nbsp;&nbsp; &#8220;我们每个人，在内心深处都怀有一个梦想：梦想去创造一个鲜活的世界与宇宙。那些或许处在我们生活的中心、被训练作为架构师的人们，都拥有者一个渴望:渴望某一天，在某个地方，因某种原因，架构出一座不可思议的、美丽的、令人心动的建筑，在那里，人们可以行走，可以梦想，历经数百年依然傲然挺拔。&#8221;-- by Christopher Alexander<br />
</p>
<img src ="http://www.blogjava.net/honeybee/aggbug/181449.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-02-22 16:47 <a href="http://www.blogjava.net/honeybee/articles/181449.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Representational State Transfer (REST)</title><link>http://www.blogjava.net/honeybee/articles/181079.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Thu, 21 Feb 2008 07:42:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/181079.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/181079.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/181079.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/181079.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/181079.html</trackback:ping><description><![CDATA[&nbsp;
<p style="text-align: center" align="center"><span style="font-size: 16pt">Representational State Transfer (REST)</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">5.1 Deriving REST</span></strong></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.1</span><span style="font-size: 12pt; line-height: 173%"> Starting with the Null Style</span></h3>
<p><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">Two common perspectives</span></strong><span style="font-size: 12pt; font-family: Times-Roman"> on the process of architectural design:</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The<strong> first </strong>is that a designer <em>starts <span style="color: red">with nothing—a blank slate, whiteboard, or drawing board</span></em>—and builds-up an architecture from familiar components until it satisfies the needs of the intended system. </span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The <strong>second</strong> is that a designer starts with <em><span style="color: red">the system needs as a whole, without constraints</span></em>, and then incrementally identifies and applies constraints to elements of the system in order to differentiate the design space and allow the forces that influence system behavior to flow naturally, in harmony with the system.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">REST is based on the latter process.</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The following eight sections depict how the applied constraints would differentiate the process view of an architecture as the incremental set of constraints is applied.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">From the Null style </span></strong><span style="font-size: 12pt; font-family: Times-Roman">(Figure 5-1) is simply an empty set of constraints. It is the starting point for our description of REST.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.2</span><span style="font-size: 12pt; line-height: 173%"> Client-Server</span></h3>
<p style="text-align: left" align="left"><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">From the client-server architectural style (Figure 5-2)</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Separation of concerns is the principle behind the client-server constraints. Perhaps most significant to the Web is that the separation allows the components to evolve independently, thus supporting the Internet-scale requirement of multiple organizational domains.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.3</span><span style="font-size: 12pt; line-height: 173%"> Stateless</span></h3>
<p><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">From the client-stateless-server (CSS) style (Figure 5-3)</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server.</span></p>
<p><em><span style="font-size: 12pt; color: red; font-family: Times-Roman">Session state is kept entirely on the client.</span></em></p>
<p><span style="font-size: 12pt; color: red; font-family: Times-Roman">Advantage: </span><span style="font-size: 12pt; font-family: Times-Roman">ease the pressure of Sever.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">Disadvantage:</span><span style="font-size: 12pt; font-family: Times-Roman"> decrease network performance by increasing the repetitive data in a series of requests in clients.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.4</span><span style="font-size: 12pt; line-height: 173%"> Cache</span></h3>
<p style="text-align: left" align="left"><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">From the client-cache-stateless-server style (Figure 5-4).</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Requiring:<span style="color: red"> a response is implicitly or explicitly labeled as cacheable or noncacheable</span>.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">Advantage</span><span style="font-size: 12pt; font-family: Times-Roman">: eliminate some interactions. </span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">Disadvantage</span><span style="font-size: 12pt; font-family: Times-Roman">: decrease reliability if state data within the cache differs significantly from the data that would have been sent directly to the server.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.5</span><span style="font-size: 12pt; line-height: 173%"> Uniform Interface</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The <span style="color: red">central feature </span>that distinguishes the REST architectural style from other network-based styles is its emphasis on <span style="color: red">a uniform interface between components</span> (Figure 5-6).</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The REST interface is designed to be efficient for large-grain hypermedia data transfer, optimizing for the common case of the Web.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">REST is defined by <span style="color: red">four interface constraints</span>: <em>identification of resources</em>;<em> manipulation of resources through representations</em>;<em> self-descriptive messages</em>; and, <em>hypermedia as the engine of application state</em>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.6</span><span style="font-size: 12pt; line-height: 173%"> Layered System</span></h3>
<p style="text-align: left" align="left"><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">From layered system constraints (Figure 5-7). </span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The layered system style allows an architecture to be composed of hierarchical layers by constraining component behavior such that <span style="color: red">each component cannot &#8220;see&#8221; beyond the immediate layer with which they are interacting</span>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.7</span><span style="font-size: 12pt; line-height: 173%"> Code-On-Demand</span></h3>
<p><strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">From the code-on-demand style (Figure 5-8).</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This <em><span style="color: red">simplifies clients</span></em> by reducing the number of features required to be pre-implemented. Allowing features to be downloaded after deployment <em><span style="color: red">improves system extensibility</span></em>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.1.8</span><span style="font-size: 12pt; line-height: 173%"> Style Derivation Summary</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Figure 5-9 depicts the derivation of REST&#8217;s constraints graphically in terms of the network-based architectural styles examined in Chapter 3.</span></p>
<h4><span style="font-size: 10.5pt; line-height: 156%">
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">5.2 REST Architectural Elements</span></strong></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.2.1</span><span style="font-size: 12pt; line-height: 173%"> Data Elements</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The nature and state of an architecture&#8217;s data elements is a key aspect of REST.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">Three fundamental options</span><span style="font-size: 12pt; font-family: Times-Roman">: 1) render the data where it is located and send a fixed-format image to the recipient; 2) encapsulate the data with a rendering engine and send both to the recipient; or, 3) send the raw data to the recipient along with metadata that describes the data type, so that the recipient can choose their own rendering engine.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">5.2.2</span><span style="font-size: 12pt; line-height: 173%"> Connectors</span></h3>
<h3><span style="font-size: 12pt; line-height: 173%">5.2.3</span><span style="font-size: 12pt; line-height: 173%"> Components</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: 宋体">代理和网关之间的区别是，何时使用代理是由客户端来决定的</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">5.3 REST Architectural Views<br />
</span></strong><span style="font-size: 12pt; line-height: 173%">5.3.1 P</span><span style="font-size: 12pt; line-height: 173%">rocess View<br />
</span><span style="font-size: 12pt; line-height: 173%">5.3.2</span><span style="font-size: 12pt; line-height: 173%"> Connector View<br />
</span><span style="font-size: 12pt; line-height: 173%">5.3.3</span><span style="font-size: 12pt; line-height: 173%"> Data View</span></p>
</span></h4>
<img src ="http://www.blogjava.net/honeybee/aggbug/181079.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-02-21 15:42 <a href="http://www.blogjava.net/honeybee/articles/181079.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Designing the Web Architecture: Problems and Insights</title><link>http://www.blogjava.net/honeybee/articles/180790.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Wed, 20 Feb 2008 03:29:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/180790.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/180790.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/180790.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/180790.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/180790.html</trackback:ping><description><![CDATA[&nbsp;
<p style="text-align: center" align="center"><span style="font-size: 16pt">Designing the Web Architecture: Problems and Insights</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">4.1 WWW Application Domain Requirements</span></strong></p>
<h3><span style="font-size: 12pt; line-height: 173%">4.1.1</span><span style="font-size: 12pt; line-height: 173%"> Low Entry-barrier</span></h3>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. Since participation in the creation and structuring of information was voluntary, a low entry-barrier was necessary to enable sufficient adoption. This applied to all users of the Web architecture: readers, authors, and application developers.</span></p>
<p><span style="font-family: Times-Roman">2. Simplicity was also a goal for the sake of application developers.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">4.1.2</span><span style="font-size: 12pt; line-height: 173%"> Extensibility</span></h3>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Extensibility: A system intending to be as long-lived as the Web must be prepared for change.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">4.1.3</span><span style="font-size: 12pt; line-height: 173%"> Distributed Hypermedia</span></h3>
<p><span style="font-family: Times-Roman">1. The usability of hypermedia interaction is highly <span style="color: red">sensitive to user-perceived latency:</span> the time between selecting a link and the rendering of a usable result.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. The architecture needs to minimize network interactions.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">4.1.4</span><span style="font-size: 12pt; line-height: 173%"> Internet-scale</span></h3>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. The Internet is about interconnecting information networks across multiple organizational boundaries.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. Suppliers of information services must be able to cope with <span style="color: red">the demands of anarchic scalability</span> and <span style="color: red">the independent deployment of software components</span>.</span></p>
<h4><span style="font-size: 10.5pt; line-height: 156%">4.1.4</span><span style="font-size: 10.5pt; line-height: 156%">.1 Anarchic Scalability</span></h4>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. Anarchic scalability refers to the need for architectural elements to continue operating when they are subjected to an unanticipated load, or when given malformed or maliciously constructed data, since they may be communicating with elements outside their organizational control. </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. The anarchic scalability requirement applies to all architectural elements.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">3. Security of the architectural elements, and the platforms on which they operate, also becomes a significant concern.</span></p>
<h4><span style="font-size: 10.5pt; line-height: 156%">4.1.4</span><span style="font-size: 10.5pt; line-height: 156%">.2 Independent Deployment</span></h4>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">4.2 Problem</span></strong></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">4.3 Approach</span></strong></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">The <span style="color: red">first</span> step, is to identify the constraints placed within the early Web architecture that are responsible for its desirable properties.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Bold">Hypothesis I</span></strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Roman">: The design rationale behind the WWW architecture can be described by an architectural style consisting of the set of constraints applied to the elements within the Web architecture.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">The <span style="color: red">next</span> step, is to identify the properties desirable in an Internet-scale distributed hypermedia system, select additional architectural styles that induce those properties, and combine them with the early Web constraints to form a new, hybrid architectural style for the modern Web architecture.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Bold">Hypothesis II: Constraints can be added to the WWW architectural style to derive a new hybrid style that better reflects the desired properties of a modern Web architecture.</span></strong></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">The <span style="color: red">third</span> step, is to use the new architectural style as a guide, we can compare proposed extensions and modifications to the Web architecture against the constraints within the style.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Bold">Hypothesis III: Proposals to modify the Web architecture can be compared to the updated WWW architectural style and analyzed for conflicts prior to deployment.</span></strong></p>
<p style="text-align: left" align="left"><strong><em><span style="font-family: Times-Roman">This approach as a single sequence, it is actually applied in a non-sequential, iterative fashion.</span></em></strong></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">4.4 Summary</span></strong></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">My approach is to use an architectural style to define and improve the design rationale behind the Web&#8217;s architecture, to use that style as the acid test for proving proposed extensions prior to their deployment, and to deploy the revised architecture via direct involvement in the software development projects that have created the Web&#8217;s infrastructure.</span></p>
<img src ="http://www.blogjava.net/honeybee/aggbug/180790.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-02-20 11:29 <a href="http://www.blogjava.net/honeybee/articles/180790.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Network-based Architectural Styles</title><link>http://www.blogjava.net/honeybee/articles/180608.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Tue, 19 Feb 2008 02:50:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/180608.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/180608.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/180608.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/180608.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/180608.html</trackback:ping><description><![CDATA[&nbsp;
<p style="text-align: center" align="center"><span style="font-size: 16pt">Network-based Architectural Styles</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.1 Classification Methodology</span></strong></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">In order to provide useful design guidance, a classification of architectural styles should be based on the architectural properties induced by those styles.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.1.1</span><span style="font-size: 12pt; line-height: 173%"> Selection of Architectural Styles for Classification</span></h3>
<h3><span style="font-size: 12pt; line-height: 173%">3.1.2</span><span style="font-size: 12pt; line-height: 173%"> Style-induced Architectural Properties</span></h3>
<h3><span style="font-size: 12pt; line-height: 173%">3.1.3</span><span style="font-size: 12pt; line-height: 173%"> Visualization</span></h3>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.2 Data-flow Styles</span></strong></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.2.1 P</span><span style="font-size: 12pt; line-height: 173%">ipe and Filter (PF)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Description</span></strong>:<span style="font-family: Times-Roman"> In a pipe and filter style, each component (filter) <span style="color: red">reads </span>streams of data on its inputs and <span style="color: red">produces </span>streams of data on its outputs, usually while applying a transformation to the input streams and processing them incrementally so that output begins before the input is completely consumed.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">:</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. One-way data flow network;</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. Zero coupling: a filter must be completely independent of other filters.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Advantage</span></strong><span style="font-family: Times-Roman">: (by Garlan and Shaw)</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. <em><span style="color: red">Simplicity</span></em>: PF allows the designer to understand the overall input/output of the system as a simple composition of the behaviors of the individual filters.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. <em><span style="color: red">Reusability</span></em>: any two filters can be hooked together, provided they agree on the data that is being transmitted between them.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">3. <em><span style="color: red">Extensibility</span></em> and <em><span style="color: red">evolvability</span></em>: new filters can be added to existing systems (extensibility) and old filters can be replaced by improved ones (evolvability).</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">4. <em><span style="color: red">Verifiability</span></em>: they permit certain kinds of specialized analysis.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">5. <em><span style="color: red">User-perceived</span></em> <em><span style="color: red">performance</span></em>: they naturally support concurrent execution.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">6. <em><span style="color: red">Configurability</span></em>: a network of filters is typically arranged just prior to each activation, allowing the application to specify the configuration of filter components based on the task at hand and the nature of the data streams.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Disadvantage</span></strong><span style="font-family: Times-Roman">:</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. <strong><em>Propagation delay</em></strong>: propagation delay is added through long pipelines;</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. <strong><em>Batch sequential processing occurs if a filter cannot incrementally process its inputs, and no interactivity is allowed.</em></strong> </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">3. <strong><em>A filter cannot interact with its environment: </em></strong>because it cannot know that any particular output stream shares a controller with any particular input stream. </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">4. <strong><em>User-perceived performance</em></strong>: these properties decrease user-perceived performance if the problem being addressed does not fit the pattern of a data flow stream.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.2.2</span><span style="font-size: 12pt; line-height: 173%"> Uniform Pipe and Filter (UPF)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">: the uniform pipe and filter style adds the constraint that all filters must<strong><em><span style="color: red"> have the same interface</span></em></strong>.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Advantage</span></strong><span style="font-family: Times-Roman">: </span></p>
<p style="text-align: left" align="left"><strong><span style="font-family: Times-Roman">Example</span></strong><span style="font-family: Times-Roman">: <em><span style="color: red">Unix</span></em> <em><span style="color: red">operating system</span></em>, where filter processes have an interface consisting of one input data stream of characters (stdin) and two output data streams of characters (stdout and stderr).</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. Restricting the interface allows independently developed filters to <span style="color: red">be arranged at will</span> to form new applications. </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2. It also <span style="color: red">simplifies</span> the task of understanding how a given filter works.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Disadvantage</span></strong><span style="font-family: Times-Roman">:</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">It may reduce network performance if the data needs to be converted to or from its natural format.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.3 Replication Styles</span></strong></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.3.1</span><span style="font-size: 12pt; line-height: 173%"> Replicated Repository (RR)</span></h3>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Example: (1) distributed filesystems, such as XMS, and, (2) remote versioning systems, like CVS [www.cyclic.com].</span></p>
<p style="text-align: left" align="left"><strong>Advantage</strong><span style="font-family: Times-Roman">: Improved user-perceived performance, both by reducing the latency of normal requests and enabling disconnected operation in the face of primary server failure or <u>intentional roaming off the network</u>(</span><span style="font-family: 宋体">线下漫游</span><span style="font-family: Times-Roman">).</span></p>
<p style="text-align: left" align="left"><strong><span style="font-family: Times-Roman">Concern</span></strong><span style="font-family: Times-Roman">: <span style="color: red">Maintaining consistency is the primary concern</span>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.3.2</span><span style="font-size: 12pt; line-height: 173%"> Cache ($)</span></h3>
<p style="text-align: left" align="left">This form of replication is most often found <span style="color: red">in cases (1) where the potential data set far exceeds the capacity of any one client, as in the WWW, or (2) where complete access to the repository is unnecessary.</span></p>
<p style="text-align: left" align="left"><strong>Advantage</strong>:caching is much <span style="color: red">easier to implement, doesn&#8217;t require as much processing and storage, and is<span style="color: red"> more efficient </span>because data is transmitted only when it is requested.</span></p>
<p style="text-align: left" align="left">A typical network-based architectural style: <strong><span style="color: red">client-stateless-server style </strong>(rest rationale).</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.4 Hierarchical Styles</span></strong></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.1</span><span style="font-size: 12pt; line-height: 173%"> Client-Server (CS)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Description</span></strong>:</p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">1. </span><strong>A <em><span style="color: red">server</em> component</span></strong>: offering a set of services, listens for requests upon those services.</p>
<p style="text-indent: 10.35pt; text-align: left" align="left"><strong>A <em><span style="color: red">client</em> component</span></strong>: desiring that a service be performed, sends a request to the server via a connector.</p>
<p style="text-align: left" align="left">2. by Andrews:</p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">A <span style="color: red">client</span> is a <em><span style="color: red">triggering process</span></em>;</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">A <span style="color: red">server</span> is a <em><span style="color: red">reactive process</span></em>. </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Clients make requests that trigger reactions from servers.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">A server is usually a <em>non-terminating</em> process and often provides service to <em>more than one</em> client.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Principle</span></strong><span style="font-family: Times-Roman">:</span><span style="color: red; font-family: Times-Roman">Separation of concerns.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Simplify the server component in order to improve scalability.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Roman">Method</span></strong><span style="font-family: Times-Roman">: moving all of the user interface functionality into the client component.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">The partition between C and S components</span></strong><span style="font-family: Times-Roman">: It is often referred to by the mechanisms used for the connector implementation, such as <em>remote procedure call</em> or <em>message-oriented middleware</em>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.2</span><span style="font-size: 12pt; line-height: 173%"> Layered System (LS) and Layered-Client-Server (LCS)</span></h3>
<p><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Layered System</span></strong><span style="font-family: Times-Roman">:</span></p>
<p><span style="font-family: Times-Roman">1. A layered system is organized hierarchically, each layer<span style="color: red"> <em>providing</em></span><em> services to the layer <strong>above</strong> it and <span style="color: red">using</span> services of the layer <strong>below</strong> it</em>.</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">2.</span><span style="font-family: Times-Roman">Layered systems reduce coupling across multiple layers by hiding the inner layers from all except the adjacent outer layer. In all, in multiple layers, <em>every layer <span style="color: red">only couple</span>s the adjacent outer layer</em>, thus improving evolvability and reusability (e.g., TCP/IP and OSI protocol stacks, and hardware interface libraries).</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">3. Disadvantage:</span><span style="font-family: Times-Roman">layered systems add overhead and latency to the processing of data, reducing user-perceived performance.</span></p>
<p><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Layered-Client-Server</span></strong><span style="font-family: Times-Roman">:</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Layered-client-server adds <u><span style="color: red">proxy and gateway components</span></u> to the client-server style.</span></p>
<p style="text-indent: 21pt; text-align: left" align="left"><span style="font-family: Times-Roman">Client -&gt; Proxy -&gt; Gateway -&gt; Server</span></p>
<p style="text-align: left" align="left"><span style="color: red; font-family: Times-Roman">A proxy</span><span style="font-family: Times-Roman"> <strong><em>acts</em></strong> as a shared server <strong><em>for one or more client components, taking requests and forwarding them</em></strong>, with possible translation, <strong><em>to server components</em></strong>. </span></p>
<p style="text-align: left" align="left"><span style="color: red; font-family: Times-Roman">A gateway</span><span style="font-family: Times-Roman"> component <strong><em>appears to be a</em></strong> normal <strong><em>server to clients or proxies</em></strong> that request its services, but<strong><em> is in fact forwarding those requests</em></strong>, with possible translation, <strong><em>to its &#8220;inner-layer&#8221; servers</em></strong>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.3</span><span style="font-size: 12pt; line-height: 173%"> Client-Stateless-Server (CSS)</span></h3>
<p><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">:<em><span style="color: red"> no </span></em></span><em><span style="color: red; font-family: Times-Italic">session state</span></em><em><span style="font-family: Times-Roman">is allowed on the server component</span></em><span style="font-family: Times-Roman">.</span></p>
<p><span style="font-family: Times-Roman">Each request from client to server must contain <span style="color: red">all</span> of the information necessary to understand the request, and cannot take advantage of any stored context on the server. <strong><em>Session state is kept entirely on the client</em></strong>.</span></p>
<p><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Advantage</span></strong><span style="font-family: Times-Roman">: <span style="color: red">visibility</span>, <span style="color: red">reliability</span>, and <span style="color: red">scalability</span>.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Disadvantage</span></strong><span style="font-family: Times-Roman">:</span><span style="font-family: Times-Roman">it may decrease network performance by increasing the repetitive data (per-interaction overhead) sent in a series of requests, since that data cannot be left on the server in a shared context.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.4</span><span style="font-size: 12pt; line-height: 173%"> Client-Cache-Stateless-Server (C$SS)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">: the client-cache-stateless-server style derives from the client-stateless-server and cache styles via the addition of cache components. </span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Description</span></strong>:<span style="font-family: Times-Roman"> A cache acts as a mediator between client and server in which the responses to prior requests can, if they are considered cacheable, be reused in response to later requests that are equivalent. </span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Roman">Example</span></strong><span style="font-family: Times-Roman">: an example system that makes effective use of this style is Sun Microsystems&#8217; NFS.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Advantage</span></strong><span style="font-family: Times-Roman">: cache components have the potential to partially or completely eliminate some interactions, improving <span style="color: red">efficiency</span> and <span style="color: red">user-perceived performance</span>.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.5</span><span style="font-size: 12pt; line-height: 173%"> Layered-Client-Cache-Stateless-Server (LC$SS)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">: the layered-client-cache-stateless-server style derives from <span style="color: red">both layered-client-server and client-cache-stateless-server through</span> <span style="color: red">the addition of proxy and/or gateway components</span>.</span></p>
<p><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Roman">Example</span></strong><span style="font-family: Times-Roman">: an example system that uses an LC$SS style is the Internet domain name system (DNS).</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.6</span><span style="font-size: 12pt; line-height: 173%"> Remote Session (RS)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">: <span style="color: red">minimize the complexity, or maximize the reuse of the client components,</span></span><span style="color: red; font-family: Times-Roman">and</span><span style="color: red; font-family: Times-Roman">the application state on server.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Description</span></strong>:<span style="font-family: Times-Roman"> each client initiates a session <u>on the server</u> and then invokes a series of services <u>on the server</u>, finally exiting the session. <span style="color: red">Application state is kept entirely <u>on the server</u></span>. </span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid; font-family: Times-Roman">Example</span></strong><span style="font-family: Times-Roman">: when it is desired to access a remote service using a generic client (e.g., TELNET) or via an interface that mimics a generic client (e.g., FTP).</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Advantage</span></strong><span style="font-family: Times-Roman">: (1) easier to centrally maintain the interface at the server, (2) reducing concerns about inconsistencies in deployed clients, and (3) improves efficiency if the interactions make use of extended session context on the server.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Disadvantage</span></strong><span style="font-family: Times-Roman">:</span><span style="font-family: Times-Roman">(1) reduces scalability of the server, due to the stored application state, and, (2) reduces visibility of interactions, since a monitor would have to know the complete state of the server.</span></p>
<h3><span style="font-size: 12pt; line-height: 173%">3.4.7</span><span style="font-size: 12pt; line-height: 173%"> Remote Data Access (RDA)</span></h3>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Characteristic</span></strong><span style="font-family: Times-Roman">: the remote data access style is a variant of client-server that<span style="color: red"> spreads the application state across both client and server</span>. </span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Description</span></strong>:<span style="font-family: Times-Roman"> a client sends a database query in a standard format, such as SQL, to a remote server. The server allocates a workspace and performs the query,which may result in a very large data set. <em>The client must know about the data structure of the service to build structure-dependent queries.</em></span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Advantage</span></strong><span style="font-family: Times-Roman">: </span></p>
<p style="text-align: left" align="left"><em><span style="color: red; font-family: Times-Roman">Eficiency</span></em><span style="font-family: Times-Roman">: a large data set can be iteratively reduced on the server side without transmitting it across the network.</span></p>
<p style="text-align: left" align="left"><em><span style="color: red; font-family: Times-Roman">Visibility</span></em><span style="font-family: Times-Roman">: is improved by using a standard query language.</span></p>
<p style="text-align: left" align="left"><strong><span style="border-right: windowtext 1pt solid; padding-right: 0cm; border-top: windowtext 1pt solid; padding-left: 0cm; padding-bottom: 0cm; border-left: windowtext 1pt solid; padding-top: 0cm; border-bottom: windowtext 1pt solid">Disadvantage</span></strong><span style="font-family: Times-Roman">:</span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Lacking<span style="color: red"> <em>simplicity</em></span>: the client needs to understand the same database manipulation concepts as the server implementation </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Decreases <em><span style="color: red">scalability</span></em>: storing application context on the server decreases <em><span style="color: red">scalability</span></em>. </span></p>
<p style="text-align: left" align="left"><span style="font-family: Times-Roman">Suffered<em><span style="color: red"> reliability</span></em>: partial failure can leave the workspace in an unknown state. </span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.5 Mobile Code Styles </span></strong></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.6 Peer-to-Peer Styles </span></strong></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.7 Limitations </span></strong></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">3.8 Related Work</span></strong></p>
<img src ="http://www.blogjava.net/honeybee/aggbug/180608.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-02-19 10:50 <a href="http://www.blogjava.net/honeybee/articles/180608.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我的读后感：beautiful description on the architectural style </title><link>http://www.blogjava.net/honeybee/articles/180416.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Mon, 18 Feb 2008 03:46:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/180416.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/180416.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/180416.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/180416.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/180416.html</trackback:ping><description><![CDATA[<p><span style="font-family: Verdana"><span style="font-size: 8pt"><span style="font-size: 12pt">&nbsp;&nbsp;&nbsp; <span style="font-size: 12pt; line-height: 150%">This morning, I&nbsp;go on reading the dissertation &#8220;Architectural Styles and the Design of Network-based Software Architectures&#8221; written by Roy Thomas Fielding. In chapter 2 Network-based Application Architectures,&nbsp;in more detail,&nbsp;in 2.2 Evaluating the Design of Application Architectures,&nbsp;the author&nbsp;gives me a&nbsp;beautiful image&nbsp;when he describes what the architectural style is. He thinks&nbsp;that an architectural style is a coordinated set of architectural constraints, and regards the architectural constraints as a derivation tree.&nbsp;It's&nbsp;to me a new, lively and powerful&nbsp;conception. To express my excitement,&nbsp;now I quote&nbsp;part of his&nbsp;article on the&nbsp;the description of&nbsp;the&nbsp;architectural style&nbsp;in my blog ——"</span></p>
<p style="text-indent: 18pt; line-height: 150%; text-align: left" align="left"><span style="font-size: 12pt; line-height: 150%">As described in the previous chapter, an architectural style is a coordinated set of architectural constraints that has been given a name for ease of reference. Each architectural design decision can be seen as an application of a style. Since the addition of a constraint may derive a new style, we can think of the space of all possible architectural styles as a derivation tree, with its root being the null style (empty set of constraints). When their constraints do not conflict, styles can be combined to form hybrid styles, eventually culminating in a hybrid style that represents a complete abstraction of the architectural design. An architectural design can therefore be analyzed by breaking-down its set of constraints into a derivation tree and evaluating the cumulative effect of the constraints represented by that tree. If we understand the properties induced by each basic style, then traversing the derivation tree gives us an understanding of the overall design&#8217;s architectural properties. The specific needs of an application can then be matched against the properties of the design. Comparison becomes a relatively simple matter of identifying which architectural design satisfies the most desired properties for that application. "</span></p>
</span></span></span><img src ="http://www.blogjava.net/honeybee/aggbug/180416.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-02-18 11:46 <a href="http://www.blogjava.net/honeybee/articles/180416.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Network-based Application Architectures</title><link>http://www.blogjava.net/honeybee/articles/180386.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Mon, 18 Feb 2008 01:38:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/180386.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/180386.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/180386.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/180386.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/180386.html</trackback:ping><description><![CDATA[&nbsp;
<p style="text-align: center" align="center"><span style="font-size: 16pt">Network-based Application Architectures</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">2.1 Scope</span></strong></p>
<p><span style="font-size: 12pt; font-family: Times-Bold">Network-based Application Architectures</span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.1.1</span><span style="font-size: 12pt; line-height: 173%"> Network-based vs. Distributed</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The primary <span style="color: red">distinction</span> between <strong>network-based architectures </strong>and <strong>software architectures</strong> in general is that communication between components is restricted to <em><span style="color: red">message passing</span></em>, or <span style="color: red">the equivalent of message passing</span> if a more efficient mechanism can be selected at runtime based on the location of components.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The <span style="color: red">disctinction</span> between <strong>distributed systems</strong> and <strong>network-based systems</strong>: a distributed system is one that looks in users&#8217; opinion like an ordinary centralized system, but runs on multiple, independent CPUs. In contrast, network-based systems are those capable of operation across a network, but not necessarily in a fashion that is transparent to the user.</span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.1.2 A</span><span style="font-size: 12pt; line-height: 173%">pplication Software vs. Networking Software</span></h3>
<p style="text-align: left" align="left"><strong><span style="font-size: 12pt; font-family: Times-Roman">Application software architecture</span></strong><span style="font-size: 12pt; font-family: Times-Roman"> is an abstraction level of an overall system, in which the goals of a user action are representable as<span style="color: red"> functional architectural properties. </span>The goal of <strong>networking abstraction (</strong><span style="color: red">behavioral architectural properties</span><strong>) </strong>is to move bits from one location to another without regard towhy those bits are being moved.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">2.2 Evaluating the Design of Application Architectures</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">An architecture is the<strong> <em>realization</em></strong> of an architectural design and not the design</span></p>
<p style="text-align: left" align="left"><strong><em><span style="font-size: 12pt; color: red; font-family: Times-Roman">itself</span></em></strong><span style="font-size: 12pt; color: red; font-family: Times-Roman">.</span></p>
<p style="text-align: left" align="left"><u><span style="font-size: 12pt; font-family: Times-Roman">The <em>first</em> level</span></u><span style="font-size: 12pt; font-family: Times-Roman"> of evaluating the design: the application&#8217;s functional requirements.</span></p>
<p style="text-align: left" align="left"><u><span style="font-size: 12pt; font-family: Times-Roman">The <em>second</em> leve</span></u><span style="font-size: 12pt; font-family: Times-Roman">l of evaluating it: regard the architectural style as<span style="color: red">a derivation tree based on a set of architectural constraints</span> because the architectural constraints are in line with the architectural style.</span></p>
<p style="text-align: left" align="left"><u><span style="font-size: 12pt; font-family: Times-Roman">The third level</span></u><span style="font-size: 12pt; font-family: Times-Roman">: build such <span style="color: red">a derivation tree</span> of architectural constraints for <span style="color: red">a given application domain</span>, and then use the tree to evaluate <span style="color: red">many different architectural designs for applications within that domain</span>. <strong>Thus, building a derivation tree provides a mechanism for architectural design guidance.</strong></span></p>
<p style="text-align: left" align="left"><u><span style="font-size: 12pt; font-family: Times-Roman">The fourth level</span></u><span style="font-size: 12pt; font-family: Times-Roman">: ensuring consistency is to make the tree domain-specific.</span></p>
<p style="text-align: left" align="left"><u><span style="font-size: 12pt; font-family: Times-Roman">The fifth level</span></u><span style="font-size: 12pt; font-family: Times-Roman">: rationally evaluate the design between trade-offs.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">2.3 Architectural Properties of Key Interest</span></strong></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.1 P</span><span style="font-size: 12pt; line-height: 173%">erformance</span></h3>
<p style="text-indent: 12pt; text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The performance of a network-based application is bound first by the application</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">requirements, then by the chosen interaction style, followed by the realized architecture, and finally by the implementation of each component.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.1</span></em><em><span style="font-size: 12pt; line-height: 150%">.1 Network Performance</span></em></h4>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Network performance is measured by some <span style="color: red">attributes</span> of communication: </span><em><span style="font-size: 12pt; color: red; font-family: Times-Italic">throughput, overhead, bandwidth, (useable bandwidth)</span></em><em><span style="font-size: 12pt; font-family: Times-Italic">.</span></em></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Styles impact network performance by their influence on the number of interactions</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">per user action and the granularity of data elements.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.1</span></em><em><span style="font-size: 12pt; line-height: 150%">.2 User-perceived Performance</span></em></h4>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The primary measures for user-perceived performance are <span style="color: red">latency</span> and <span style="color: red">completion</span> time.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">1. Latency<span style="color: red"> <em>occurs</em></span>: </span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">1) </span><span style="font-size: 12pt; font-family: Times-Roman">the time needed for the application to recognize the event that initiated the action;<span style="color: red"> 2)</span> the time required to setup the interactions between components; <span style="color: red">3) </span>the time required to transmit each interaction to the components; <span style="color: red">4)</span> the time required to process each interaction on those components; and, <span style="color: red">5)</span> the time required to complete sufficient transfer and processing of the result of the interactions before the application is able to begin rendering a usable result. It is important to<em><span style="color: red"> note</span></em>that,<span style="color: red"> (i) </span>only (3) and (5) represent actual network communication, <span style="color: red">(ii)</span> all five points can be impacted by the architectural style.</span></p>
<p style="text-align: left" align="left"><em><span style="font-size: 12pt; font-family: Times-Italic">2. Completion </span></em><span style="font-size: 12pt; font-family: Times-Roman">is the amount of time taken to complete an application action. </span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">It is important to note that design considerations for optimizing latency will often have the side-effect of degrading completion time, and vice versa.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.1</span></em><em><span style="font-size: 12pt; line-height: 150%">.3 Network Efficiency</span></em></h4>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">1.The<span style="color: red"> most efficient</span> architectural styles for a network-based application are those that can effectively <span style="color: red">minimize use of the network</span> when it is possible to do so.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">2.Method: reuse of prior interactions (<span style="color: red">caching</span>), reduction of the frequency of network interactions in relation to user actions (<span style="color: red">replicated data and disconnected operation</span>), or by removing the need for some interactions by moving the processing of data closer to the source of the data (<span style="color: red">mobile code</span>).</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">3.The impact of the various performance issues is often related to the scope of</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">distribution for the application.(LAN or WAN, a single process or multi-processes, etc)</span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.2</span><span style="font-size: 12pt; line-height: 173%"> Scalability</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Scalability refers to the ability of the architecture to support large numbers of components, or interactions among components, within an active configuration.</span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.3</span><span style="font-size: 12pt; line-height: 173%"> Simplicity</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">1. principle of separation of concerns(</span><span style="font-size: 12pt; font-family: 宋体">分离关注点原则</span><span style="font-size: 12pt; font-family: Times-Roman">) </span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">2. principle of generality(</span><span style="font-size: 12pt; font-family: 宋体">通用性原则</span><span style="font-size: 12pt; font-family: Times-Roman">), it generates middleware.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">3. properties: complexity, understandability, and verifiability</span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.4</span><span style="font-size: 12pt; line-height: 173%"> Modifiability</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Modifiability can be explained as <em><span style="color: red">evolvability</span></em>, <em><span style="color: red">extensibility</span></em>, <em><span style="color: red">customizability</span></em>, <em><span style="color: red">configurability</span></em>, and <em><span style="color: red">reusability</span></em>, as described below.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.4</span></em><em><span style="font-size: 12pt; line-height: 150%">.1 Evolvability(</span></em><em><span style="font-size: 12pt; line-height: 150%; font-family: 黑体">可进化性</span></em><em><span style="font-size: 12pt; line-height: 150%">)</span></em></h4>
<p>1. Static evolution:<span style="font-size: 12pt; font-family: Times-Roman"> depends on how well the architectural abstraction is enforced by the implementation, thus is not unique to any particular architectural style.</span></p>
<p style="text-align: left" align="left">2. Dynamic evolution:<span style="font-size: 12pt; font-family: Times-Roman"> can be influenced by the style if it includes constraints on the maintenance and location of application state.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.4</span></em><em><span style="font-size: 12pt; line-height: 150%">.2 Extensibility</span></em></h4>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">1. Dynamic extensibility implies that functionality can be added to a deployed system without impacting the rest of the system. </span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">2. Extensibility is induced within an architectural style by reducing the coupling between components.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.4</span></em><em><span style="font-size: 12pt; line-height: 150%">.3 Customizability</span></em></h4>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">1. Customizability refers to the ability to temporarily specialize the behavior of an architectural element, such that it can then perform an unusual service.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">2. Styles that support customization may also improve simplicity and scalability, since service components can be<span style="color: red"> reduced in size and complexity</span> by directly <em>implementing only the most frequent services and allowing infrequent services to be defined by the client</em>.</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.4</span></em><em><span style="font-size: 12pt; line-height: 150%">.4 Configurability</span></em></h4>
<p style="text-align: left" align="left">Two examples:<span style="font-size: 12pt; font-family: Times-Roman"> the pipe-and-filter and code-on-demand styles (</span><span style="font-size: 12pt; font-family: 宋体">管道-过滤器风格和按需代码风格</span><span style="font-size: 12pt; font-family: Times-Roman">).</span></p>
<h4 style="margin: 0cm 0cm 0pt; line-height: 150%"><em><span style="font-size: 12pt; line-height: 150%">2.3.4</span></em><em><span style="font-size: 12pt; line-height: 150%">.5 Reusability</span></em></h4>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The primary mechanisms for inducing reusability within architectural styles is reduction of (1) coupling (knowledge of identity) between components and (2) constraining the generality of component interfaces.</span></p>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.5</span><span style="font-size: 12pt; line-height: 173%"> Visibility</span></h3>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.6 P</span><span style="font-size: 12pt; line-height: 173%">ortability</span></h3>
<h3 style="margin: 0cm 0cm 0pt"><span style="font-size: 12pt; line-height: 173%">2.3.7</span><span style="font-size: 12pt; line-height: 173%"> Reliability</span></h3>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Styles can improve reliability by avoiding single points of failure, enabling redundancy, allowing monitoring, or reducing the scope of failure to a recoverable action.</span></p>
<img src ="http://www.blogjava.net/honeybee/aggbug/180386.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-02-18 09:38 <a href="http://www.blogjava.net/honeybee/articles/180386.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Software Architecture</title><link>http://www.blogjava.net/honeybee/articles/177583.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Thu, 24 Jan 2008 13:43:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/177583.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/177583.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/177583.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/177583.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/177583.html</trackback:ping><description><![CDATA[&nbsp;
<p style="text-align: center" align="center"><span style="font-size: 16pt">Software Architecture</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.1 run-time abstraction</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A </span><strong><span style="font-size: 12pt; font-family: Times-Bold">software architecture </span></strong><span style="font-size: 12pt; font-family: Times-Roman">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.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">At the heart of software architecture is the principle of abstraction: hiding some of the</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">details of a system through encapsulation in order to better identify and sustain its</span></p>
<p><span style="font-size: 12pt; font-family: Times-Roman">properties.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">The<strong> differences </strong>between <strong>software architecture </strong>and <strong>software structure</strong>: 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.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.2 Elements</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A </span><strong><span style="font-size: 12pt; font-family: Times-Bold">software architecture </span></strong><span style="font-size: 12pt; font-family: Times-Roman">is defined by a configuration of architectural elements — <strong><em>components</em></strong><em>,<strong> connectors</strong>,</em> and<em> <strong>data</strong></em> — constrained in their relationships in order to achieve a desired set of architectural properties.</span></p>
<p style="text-align: left" align="left"><strong><em><span style="font-size: 12pt; font-family: Times-Roman">Components </span></em></strong><span style="font-size: 12pt; font-family: Times-Roman">are those that perform transformations on data,</span><strong><em><span style="font-size: 12pt; font-family: Times-Italic"> data</span></em></strong><em><span style="font-size: 12pt; font-family: Times-Italic"> elements </span></em><span style="font-size: 12pt; font-family: Times-Roman">are those that contain the information that is used and transformed, and</span><em><span style="font-size: 12pt; font-family: Times-Italic"> <strong>connectors </strong></span></em><span style="font-size: 12pt; font-family: Times-Roman">are the glue that holds the different pieces of the architecture</span><span style="font-size: 12pt; font-family: Times-Roman">together.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">Software architecture includes architectural properties. Rationale explicates those properties, but the rationale itself is not part of the architecture.</span></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; color: red; font-family: Times-Roman">Rather than defining the software&#8217;s architecture as existing within the software, it is defining a description of the software&#8217;s architecture as if that were the architecture.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 13pt; font-family: Times-Bold">1.2.1</span></strong><strong><span style="font-size: 13pt; font-family: Times-Bold"> Components</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A </span><strong><span style="font-size: 12pt; font-family: Times-Bold">component </span></strong><span style="font-size: 12pt; font-family: Times-Roman">is an abstract unit of software instructions and internal state that provides a transformation of data via its interface.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 13pt; font-family: Times-Bold">1.2.2</span></strong><strong><span style="font-size: 13pt; font-family: Times-Bold"> Connectors</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A </span><strong><span style="font-size: 12pt; font-family: Times-Bold">connector </span></strong><span style="font-size: 12pt; font-family: Times-Roman">is an abstract mechanism that mediates communication, coordination, or cooperation among components.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 13pt; font-family: Times-Bold">1.2.3</span></strong><strong><span style="font-size: 13pt; font-family: Times-Bold"> Data</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A </span><strong><span style="font-size: 12pt; font-family: Times-Bold">datum </span></strong><span style="font-size: 12pt; font-family: Times-Roman">is an element of information that is transferred from a component, or received by a component, via a connector.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.3 Configurations</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A </span><strong><span style="font-size: 12pt; font-family: Times-Bold">configuration </span></strong><span style="font-size: 12pt; font-family: Times-Roman">is the structure of architectural relationships among components, connectors, and data during a period of system run-time.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.4 Properties</span></strong></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.5 Styles</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">An </span><strong><span style="font-size: 12pt; font-family: Times-Bold">architectural style </span></strong><span style="font-size: 12pt; font-family: Times-Roman">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.</span></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.6 Patterns and Pattern Languages</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">A design pattern is defined as an important and recurring system construct.</span></p>
<p style="text-align: left" align="left"><em><span style="font-size: 12pt; font-family: Times-Italic">The pattern is, in short, at the same time a thing, which happens in the</span></em></p>
<p style="text-align: left" align="left"><em><span style="font-size: 12pt; font-family: Times-Italic">world, and the rule which tells us how to create that thing, and when we must</span></em></p>
<p style="text-align: left" align="left"><em><span style="font-size: 12pt; font-family: Times-Italic">create it. It is both a process and a thing; both a description of a thing which is</span></em></p>
<p style="text-align: left" align="left"><em><span style="font-size: 12pt; font-family: Times-Italic">alive, and a description of the process which will generate that thing.</span></em></p>
<p style="text-align: left" align="left"><strong><span style="font-size: 15pt; font-family: Times-Bold">1.7 Views</span></strong></p>
<p style="text-align: left" align="left"><span style="font-size: 12pt; font-family: Times-Roman">three important views in software architecture: processing, data, and connection views. A process view emphasizes the data flow through the components and some aspects of the connections among the components with respect to the data. A data view emphasizes the processing flow, with less emphasis on the connectors. A connection view emphasizes the relationship between components and the state of &nbsp;&nbsp;communication.</span></p>
<img src ="http://www.blogjava.net/honeybee/aggbug/177583.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-01-24 21:43 <a href="http://www.blogjava.net/honeybee/articles/177583.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>rest架构</title><link>http://www.blogjava.net/honeybee/articles/177319.html</link><dc:creator>sun</dc:creator><author>sun</author><pubDate>Wed, 23 Jan 2008 08:56:00 GMT</pubDate><guid>http://www.blogjava.net/honeybee/articles/177319.html</guid><wfw:comment>http://www.blogjava.net/honeybee/comments/177319.html</wfw:comment><comments>http://www.blogjava.net/honeybee/articles/177319.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honeybee/comments/commentRss/177319.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honeybee/services/trackbacks/177319.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 最近看了点关于REST的文章，虽然看得很浅，但很喜欢这种架构style。作为一名立志今后从事Web开发的年轻IT人员来说，掌握一种架构方法，拥有这方面的技能其实很重要。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REST（Representational State ）架构最早由Roy T. Fielding于2000年提出。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REST软件架构是当今世界上最成功的互联网的超媒体分布式系统，实现这一软件架构最著名的就是HTTP协议。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REST软件架构当中最重要的两个理念：对于互联网资源进行唯一定位；理解对于该资源进行怎样运作。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REST遵循CRUD原则：（create , read , update , delete）。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; REST的&#8220;无状态服务器&#8221;约束：&#8220;客户机——无状态——服务器&#8221;。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 目前流行的的AJAX技术与Rails框架，遵循了REST的一些重要原则。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AJAX架构风格使开发人员可以将处理和状态需求分布到客户机，对于程序逻辑与表示部署到客户端，服务器端仅含有业务数据或个性化内容，与服务器端Web应用程序相比，它具有显著的可伸缩性优势。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AJAX技术还使得软件更好地实现分布性功能，在一个企业内只要一个人下载了AJAX引擎，其它企业内部的人员，就可以共享该资源了。<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AJAX和REST架构风格对于融入式Web应用程序也同样具有优势（程序员实战Web2.0 或http://www.ibm.com/developerworks/cn/web/wa-ajaxarch/）<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对于REST，目前处于初学阶段，在此，附上Roy Thomas Fielding博士论文摘要：<br />
　　　　　　ABSTRACT OF THE DISSERTATION<br />
Architectural Styles and the Design of Network-based Software Architectures　by　Roy Thomas Fielding<br />
　　　　　　Doctor of Philosophy in Information and Computer Science<br />
　　　　　　University of California, Irvine, 2000<br />
　　　　　　Professor Richard N. Taylor, Chair<br />
　　The World Wide Web has succeeded in large part because its software architecture has<br />
been designed to meet the needs of an Internet-scale distributed hypermedia system. The<br />
Web has been iteratively developed over the past ten years through a series of<br />
modifications to the standards that define its architecture. In order to identify those aspects<br />
of the Web that needed improvement and avoid undesirable modifications, a model for the<br />
modern Web architecture was needed to guide its design, definition, and deployment.<br />
　　Software architecture research investigates methods for determining how best to<br />
partition a system, how components identify and communicate with each other, how<br />
information is communicated, how elements of a system can evolve independently, and<br />
how all of the above can be described using formal and informal notations. My work is<br />
motivated by the desire to understand and evaluate the architectural design of networkbased<br />
application software through principled use of architectural constraints, thereby<br />
obtaining the functional, performance, and social properties desired of an architecture. An<br />
architectural style is a named, coordinated set of architectural constraints.<br />
　　This dissertation defines a framework for understanding software architecture via<br />
architectural styles and demonstrates how styles can be used to guide the architectural<br />
design of network-based application software. A survey of architectural styles for<br />
network-based applications is used to classify styles according to the architectural<br />
properties they induce on an architecture for distributed hypermedia. I then introduce the<br />
Representational State Transfer (REST) architectural style and describe how REST has<br />
been used to guide the design and development of the architecture for the modern Web.<br />
　　REST emphasizes scalability of component interactions, generality of interfaces,<br />
independent deployment of components, and intermediary components to reduce<br />
interaction latency, enforce security, and encapsulate legacy systems. I describe the<br />
software engineering principles guiding REST and the interaction constraints chosen to<br />
retain those principles, contrasting them to the constraints of other architectural styles.<br />
Finally, I describe the lessons learned from applying REST to the design of the Hypertext<br />
Transfer Protocol and Uniform Resource Identifier standards, and from their subsequent<br />
deployment in Web client and server software.<br />
<br />
Roy Thomas Fielding博士论文英文版本　<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm">http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm</a> 
<img src ="http://www.blogjava.net/honeybee/aggbug/177319.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honeybee/" target="_blank">sun</a> 2008-01-23 16:56 <a href="http://www.blogjava.net/honeybee/articles/177319.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>