以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Web Services & Semantic Web Services 』  (http://bbs.xml.org.cn/list.asp?boardid=10)
----  REST的起源——Fielding博士的学位论文的中文版发布了  (http://bbs.xml.org.cn/dispbbs.asp?boardid=10&rootid=&id=49226)


--  作者:zhaonix
--  发布时间:6/29/2007 11:07:00 PM

--  REST的起源——Fielding博士的学位论文的中文版发布了
“关于WEB开发,具有里程碑意义的Fielding关于REST的博士论文的中文版已经正式发布了。” 见 http://blog.csdn.net/bvbook/archive/2007/06/28/1670244.aspx , 有全文。


背景: Amazon等公司把他们按照HTTP URL进行直接调用的API称作 REST形式的Web Service(V.S. SOAP形式的WS)。使得REST似乎与Web Services也扯上了关系。孟岩的一篇博客文章中谈到了他自己对于web集成的未来的看法:REST胜过SOAP。

但REST一词最初出现时的含义却不是这样。曾参与HTTP1.1起草工作的Thomas Fielding 2000年在UC Irvine提交的博士论文中,将REST定义成一种web设计风格,强调可缓存、无状态、统一接口等。 w3c近两年中有人做的PPT中指出:两者并不对立,SOAP也可以按照REST风格来使用。

当然,这些都是产业界的事情,研究界的paper中似乎还很少涉及REST。

附:自己看Fielding的博士论文英文版时所做的笔记。

REST: REpresentational State Transfer  

目标:定义一个model of how the World Wide Web (被看作一种Internet-scale distributed hypermedia system) should work.. 在90s中期提出后,作者把它应用于自己制定HTTP/1.1和URI两个RFC的过程中,以及在libwww-perl, Apache httpd等商业级项目的开发中。

其目标是使得延时最小,而同时能保持 组件 的独立性和可扩展性。描述方式是:应用一组体系结构上的约束(来自于对5种Network-based Architectural Styles的分析)。REST的内容有:

l       强调connector,而不是component,的语义;    即It does constrain the interface between components, and hence the scope of interaction and implementation assumptions that might otherwise be made between components.

l       重视caching, intermediary的作用;   --> layering of transformation,即在C/S结构中使用cache,proxy等

l       使用合适的资源表示方式;    <-- REST components perform actions on a resource by using a representation to capture the current or intended state of that resource and transferring that representation between components. A representation is a sequence of bytes, plus representation metadata to describe those bytes. 其它一些不大准确的名称有:document, file, and HTTP message entity, instance, or variant.

l       server不维护会话状态,(处理消息时只需要考虑当前请求的URI及消息内容)。

l       REST constrains messages between components to be self-descriptive in order to support intermediate processing of interactions.

所分析的5种Style是:

l         Data-flow Style
l         Replication Style
l         Hierarchical Style
l         Mobile code Style
l         Peer-to-Peer Style


the characteristics of REST(by Roger L. Costello, http://www.xfront.com/REST-Web-Services.html):
*    Client-Server: a pull-based interaction style: consuming components pull representations.
*    Stateless: each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server.
*    Cache: to improve network efficiency responses must be capable of being labeled as cacheable or non-cacheable.
*    Uniform interface: all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE).
*    Named resources - the system is comprised of resources which are named using a URL.
*    Interconnected resource representations - the representations of the resources are interconnected using URLs, thereby enabling a client to progress from one state to another.
*    Layered components - intermediaries, such as proxy servers, cache servers, gateways, etc, can be inserted between clients and resources to support performance, security, etc.


--  作者:admin
--  发布时间:7/1/2007 12:23:00 AM

--  
赞!不错!
--  作者:MerryZhang
--  发布时间:7/2/2007 10:19:00 AM

--  
不错,看后基本上知道REST是个什么了,概括得很好。谢谢LZ
--  作者:dreaminworld
--  发布时间:9/11/2007 9:57:00 AM

--  
不错~
--  作者:kelvincheng
--  发布时间:10/17/2007 3:59:00 AM

--  
REST绝对是轻量级的Web service的方向。
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms