REST式Web服务的互操作性研究

VIP免费
3.0 侯斌 2024-11-19 5 4 928.86KB 66 页 15积分
侵权投诉
摘 要
随着 Internet 迅猛发展,人们对 Web 服务的关注也与日俱增。用来搭建 Web
服务的相关协议和标准(如 WS-Security、WSDL 及 SOAP 等)也很多,其中大部分
是基于 HTTP 的。目前,多数的 Web 服务采用 RPC(Remote Procedure Call)
架构,即利用 SOAP + WSDL 所构建的。在 2000 年 Roy Thomas Fielding 在其博士
论 文
Architectural Style and the Design of Network-Based Software
Architectures
中 提 出 了 一 种 架 构 风 格 即 REST ( Representational State
Transfer)在随后的几年中,采用 REST 原则设计的网站、Web 应用及 Web 服务才
逐渐出现:邮件列表,WIKI 及博客等。然而,REST 作为一种新兴的 Web 服务设计
风格在互操作性方面还存在着一些问题,如操作的安全性,服务查询优化及异步
操作等问题,这也是本文研究的三个重点。
本文首先介绍了课题的研究背景和国内外研究现状,指出 REST 式 Web 服务在
互操作性方面所涉及到的一些关键技术。其次,分析了互操作性所涉及的操作安
全性、服务的查询优化及异步操作之间的关系。最后,分别对互操作性所涉及的
三个问题进行重点研究,具体研究内容如下:
1. 对 REST 式 Web 服务的安全性进行了研究,在分析了目前常用的 HTTP 基本
认证和摘要认证的基础上,提出了一种 Extended-UsernameToken 认证方案,提高
了 Web 服务的安全性和灵活性。
2. 从 REST 式 Web 服务查询优化角度出发,提出一种基于自适应技术(Adapte
Query Processing,AQP)和贪婪算法的 A-Greedy 查询优化方法来改善服务的
询效率。
3. 在 REST 式 Web 服务异步操作方面,由于服务采用的 HTTP 协议是同步的,
因而不能很好的处理异步操作的问题,本文给出了一种基于客户/服务器轮询的模
式来实现其异步处理。
关键词: Web 服务 REST 用户令WSPRC A-Greedy 异步
ABSTRACT
With the rapid development of Internet, Web services are getting more and more
concerned. There are many protocols and standards (such as WS-Security, WSDL and
SOAP, etc.) for buildding Web services, but most of which are HTTP-based. At present,
the majority of Web services use RPC-type (Remote Procedure Call) structure which is
constructed by using SOAP and WSDL. In 2000, Roy Thomas Fielding proposed an
Architectural Style and the Design of Network-Based Software Architectures. In his
paper which presents an architectural style that is REST (Representational State
Transfer). In subsequent years, using REST principles designed website, Web
applications and Web services began to appear: the mailing list, WIKI, blog and so on.
However, REST, as a new kind of Web service design style in interoperability, there are
still some problems, such as security, query optimization and asynchronous operations,
which are the focus of this paper.
This paper introduced the topic of the research background and pointed out a
number of keys which REST-style Web services interoperability involved. Second, the
paper analyzed the relationship between interoperability with the security, query
optimization and asynchronous operations. Finally, it respectively discussed the three
keys which interoperability issues involved. The specific studies are as follows:
1. After analyzing the two existing authentications of REST-style Web services,
Basic HTTP Authentication and HTTP Digest Authentication, we propose an extended
UsernameToken-based approach for REST-style Web service to improve the Web
services security and flexibility.
2. From the perspective of query optimization of REST-style Web services, based
on adaptive technology (Adapte Query Processing, AQP) and greed algorithm, we
proposed A-Greedy query optimization approach to improve the efficiency of querying
optimization over REST-style Web services.
3. REST-style Web services, based on the HTTP protocol, is synchronous and
therefore can not deal with asynchronous operations effectively, the paper gives a client
/ server polling mode to achieve the asynchronous process.
Keywords: Web Service REST UsernameToken WSPRC A-Greedy
Asynchronous
目 录
摘 要
ABSTRACT
第一章 绪论 .......................................................... 1
§1.1 研究背景 .................................................. 1
§1.2 国内外研究现状 ............................................ 2
§1.3 本文的研究思路 ............................................ 3
§1.3.1 互操作性 ............................................. 3
§1.3.2 互操作性与本文研究内容的关系 ......................... 3
§1.3.3 研究思路 ............................................. 4
§1.4 论文结构 .................................................. 5
第二章 REST 相关概念及关键技术分析 ................................... 6
§2.1 Web 标准化 ................................................. 6
§2.2 REST ...................................................... 7
§2.2.1 REST 概念 .............................................7
§2.2.2 REST 式 Web 服务 .......................................8
§2.2.3 面向资源的架构(ROA) ............................... 11
§2.3 关键技术 ................................................. 13
§2.3.1 HTTP ................................................ 13
§2.3.2 URI ................................................. 15
§2.3.3 Web Service ......................................... 16
§2.3.4 XML/JOSN ............................................ 16
§2.3.5 WADL ................................................ 17
§2.5 本章小结 ................................................. 17
第三章 REST 式 Web 服务的安全认证机制 ................................ 19
§3.1 Web 服务的安全性 .......................................... 19
§3.1.1 Web 服务的安全性问题 .................................19
§3.1.2 Web 服务安全性规范 ...................................20
§3.2 HTTP 认证模式 ............................................. 20
§3.2.1 HTTP 基本认证 ........................................20
§3.2.2 HTTP 摘要认证 ........................................21
§3.3 Extended-UsernameToken 安全认证方案 ....................... 23
§3.3.1 思想来源 ............................................ 23
§3.3.2 基本思想 ............................................ 23
§3.3.3 认证流程 ............................................ 24
§3.4 Extended-UsernameToken 认证机制的分析 ..................... 27
§3.4.1 安全性 .............................................. 27
§3.4.2 认证代价 ............................................ 28
§3.4.3 讨论 ................................................ 29
§3.5 本章小结 ................................................. 29
第四章 REST 式 Web 服务的查询优化机制 ................................ 30
§4.1 Web 服务的查询优化 ........................................ 30
§4.2 自适应技术 ............................................... 31
§4.3 自适应与 REST 式 Web 服务 .................................. 31
§4.4 基于 REST 的 WSPRC 模型 .................................... 31
§4.4.1 WSPRC 模型 ...........................................32
§4.4.2 WSPRC 模型处理流程 ...................................32
§4.4.3 WSPRC 模型分析 .......................................34
§4.5 影响 Web 服务查询的相关因素 ............................... 35
§4.5.1 Precedence Constraints .............................. 35
§4.5.2 Linear 与 Parallel ................................... 35
§4.5.3 过滤性 .............................................. 36
§4.5.4 元组处理时间 ........................................ 36
§4.6 A-Greedy 查询优化算法 ..................................... 37
§4.6.1 Pipelined Filters 问题 ...............................37
§4.6.2 自适应循环框架 ...................................... 37
§4.6.3 A-Greedy 的主要思想 ..................................38
§4.6.4 A-Greedy 的优化过程 ..................................39
§4.7 A-Greedy 算法的性能评估 ................................... 41
§4.7.1 初建 Web 服务查询优化方案 ............................ 42
§4.7.2 输入 Web 服务的信息源发生改变 ........................ 44
§4.7.3 Web 服务本身发生改变 .................................45
§4.8 本章小结 ................................................. 47
第五章 REST 式 Web 服务的异步操作 .................................... 48
§5.1 同步与异步 ............................................... 48
§5.2 REST 异步操作的问题 ....................................... 49
§5.3 传统的资源模式 ........................................... 49
§5.4 客户/服务器模式 .......................................... 51
§5.4.1 思想来源 ............................................ 51
§5.4.2 基本思想 ............................................ 51
§5.4.3 异步处理的实现 ...................................... 52
§5.5 本章小结 ................................................. 55
第六章 总结与展望 .................................................. 56
参考文献 ............................................................ 58
作者在读期间科研成果简介 ............................................ 62
............................................................. 63
第一章 绪论
1
第一章 绪论
§1.1 研究背景
在过去的数十年中,网络和信息等相关技术日新月异,万维网几乎已经遍布
全球,目前全球的网站总量目已超过 2.3 亿个。企业也纷纷开始利用网络来向客
户提供自己的产品和服务,而 Web 服务的出现则在很大程度的实现和推动了这种
商业模式的发展,为企业带来了巨大利润。Web 服务作为 Internet 技术发展的重
大产物,在网络上广泛传播和使用,如今 Web 站点其简易性不仅能够为普通用户
提供一个信息化的界面,其可编程的特性性也可以将企业、应用程序、服务和
备彼此链接。Web 服务作为一种新的商业服务方式,它极大的降低了企业的生产
成本,缩减了安装和调试系统所需要的时间,提高了企业抗御市场风险的能力。
W3C Web 服务给出了这样的定义:“Web 服务是由 URI 标识的一个软件系统,
并且使用 XML 对它的公共接口和绑定进行定义和描述。其他软件系统可以发现它
的定义。然后,这些系统就可以按照 Web 服务预先确定的方式与它进行交互,并
使用通过 Internet 协议传输的基于 XML 的消息。[1]Web 服务的平台是分布式的,
运行在这种平台上的 Web 服务对操作系统、设备配置、编程语言及为其提供开发
工具的第三方厂商是否相同并无要求,Web 服务这种新型的 Web 应用程序,具有许
多优秀的特点:强自治、松耦合、粗粒度、开放性及可集成。发布后的 Web 服务
可以被方便的查找和调用。从另一个角度来说,Web 服务就是一种新型的 Internet
组件,只需要发布一次,就可以处处使用。所以,Web 服务对于提高网络软件编制
效率和软件质量方面具有重要的意义。
传统的 Web 服务主要采用 RPC 式架构,利用 SOAP、WSDL 和 WS-*等相关技术。
目前,在商业与政府应用中这种 Web 服务较为盛行。本文所提的 REST
(Representational State Transfer)[2] Web 服务是遵从 REST 设计原则并使
用 ROA(Resource-Oriented Architectures)构建的 Web 服务。在 2000 年, Roy
Thomas Fielding 的论文中首次提出,他指出 REST 不是一种架构,而是一种体系
结构风格,他将 REST 作为目前 Web 体系结构的一种基础概念进行了详细介绍。
目前 REST 已被用做网络应用的设计和开发方式,采用 REST 风格构建的 Web 服务
也开始出现,并逐渐受到人们的关注。
摘要:

摘要随着Internet迅猛发展,人们对Web服务的关注也与日俱增。用来搭建Web服务的相关协议和标准(如WS-Security、WSDL及SOAP等)也很多,其中大部分是基于HTTP的。目前,多数的Web服务采用RPC(RemoteProcedureCall)式架构,即利用SOAP+WSDL所构建的。在2000年RoyThomasFielding在其博士论文ArchitecturalStyleandtheDesignofNetwork-BasedSoftwareArchitectures中提出了一种架构风格即REST(RepresentationalStateTransfer)。在随后的几年...

展开>> 收起<<
REST式Web服务的互操作性研究.pdf

共66页,预览7页

还剩页未读, 继续阅读

作者:侯斌 分类:高等教育资料 价格:15积分 属性:66 页 大小:928.86KB 格式:PDF 时间:2024-11-19

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 66
客服
关注