Free Essay

The Research on Atom Based Remote Object Exchange Mechanism

In:

Submitted By alancui
Words 2687
Pages 11
小 型 微 型 计 算 机 Journal of Chinese Computer 2007

系 统 Systems

2007 年

月 第 期 Vol.28 No.

基于 Atom 的远程对象交换机制的研究
崔 璨 1,陆桑璐 2
1 2(南京大学计算机软件新技术国家重点实验室,

南京大学计算机科学与技术系, 210093)

E-mail :alancui@gmail.com



要:随着互联网的发展,Web2.0 和 Mash-up 逐渐成为 Web 环境中的主要应用形式。针对现有远程对象交换机制的

局限性, 本文以 Atom 文档格式与 Atom 发布协议为基础建立了一种更易被 Web2.0 和 Mash-up 应用的远程对象交换机制。 在兼顾半结构化数据与强类型语言结构化要求的条件下,利用 Atom 文档格式解决了远程对象的封装问题;利用 Atom 发 布协议解决了远程对象的操作问题。在此基础上,通过性能评估和综合比较,说明该机制具有实现简单、适应半结构化数 据、在少量易变数据时性能好等优点。 关键词:Atom; REST; 对象交换; 半结构化数据; Web2.0; Mash-up 中 图 分 类 号 :TP 文献标识码:A 文章编号:1000-1220(2005)02--

The Research on Atom Based Remote Object Exchange Mechanism
CUI Can1,LU Sanglu2
12

(State Key Laboratory of Novel Software Technology, Department of Computer Science and Technology, Nanjing University, 210093)

Abstract:

Web2.0 and Mash-up applications are gradually turned into the primary form of the applications in the Internet by the fast

development of Internet. Concerning the limitation of the existing remote objects exchange mechanism, this paper proposes a new remote objects exchange mechanism which is based on Atom Syndication Format and Atom Publishing Protocol, and thus, can be easily adopted in Web2.0 or Mash-up systems. Firstly, considering the requirements from both semi-structure data and strong type languages, Atom Syndication Format is used to solve the encapsulation problem. Secondly, Atom Publishing Protocol are leveraged to implement object exchange. Finally, with the evaluations and comparison, we reached a conclusion that the Atom Based Remote Object Exchange Mechanism can be implemented with little effort, and it has good performance with small and volatile data. Key words: Atom, REST, Object Exchange, Semi-structured Data, Web2.0, Mash-up 前的 web 环境中很难实现。远程对象不能被 Feed Reader 或 Mash-up 系统直接应用。 (2) 数据内容:Web 环境中的数据偏向于半结构化数
[4] [1]

1

引言
随着互联网络的发展, 传统桌面应用逐渐向轻便易用的

Web 应用转化。 Ajax(Asynchronous JavaScript and XML) 而
[2] [3]

据, 缺乏固定的模式和数据形式 应灵活多变的 Web 环境。 (3)

。传统的交换机制中往

等技术推动的 Web2.0 、Mash-up 理念更使得 Web 应用得 到了日新月异的发展,用户友好性、内容的丰富性得到了极 大提高。在这种背景下,现有远程对象交换机制(如.Net、 Web Service)由于以下三个层面的局限性,使其很难得到 更好应用: (1) 技术实现:当前 Ajax 类型的 web 页面主要使用 Javascript 脚本语言结合 HTML 构建,原有的复杂机制在当

往是先有对象结构的描述,再有对象数据,因此它们很难适 应用方式:传统的交换机制主要面向数据密集型

的企业应用。而 Web2.0 和 Mash-up 环境中的数据交换,往 往数据量较小, 使用原有的交换方式存在性能和资源上的浪 费。 因此亟需一种实现简单、有效支持半结构化数据、适应

收稿日期:2005-基金项目:国家高技术研究发展计划 863 项目(编号:2006AA01Z199), 国家自然科学基金创新研究群体科学基金项目(编 号:60721002)资助 作者简介:崔璨,男,1982 年生,硕士研究生,研究方向为分布式计算、网格计算;陆桑璐,女,1970 年生,教授, 博士 生导师,研究方向为分布并行处理、高性能计算等。

2













机 • •





2007 年

小量多次数据环境,兼容现有 Web2.0 应用的远程对象交换 机制。 远程对象的交换主要涉及对象的封装、 对象的操作以及 相关的优化工作。在现有的 Web2.0 应用中,中间数据的主 要表现格式为 RSS
[5]

服务:发现或者描述集合。 编辑:创建、修改、删除 Web 资源。

当前,Atom 发布协议主要用于 Blog 的发布。

,Atom 和 JSON

[6]

三种。其中 RSS 缺

乏良好的扩展机制,不支持标准的命名空间,无法嵌入任意 的 XML 数 据 和 Base64 编 码 的 二 进 制 数 据 。 JSON 基 于 Javascript 技术,对强类型语言支持不够完善,也无法保 证 文 档 本 身 的 可 读 性 。 而 基 于 XML 并 支 持 命 名 空 间 (Namespace)的 Atom 数据格式提供了方便有效的扩展方 式, 并且能够在保证文档可读性的基础上有效地封装半结构 化 数 据 , 因 此 最 接 近 上 述 需 求 。 并 且 , 基 于 REST (Representational State Transfer) 架构
[7][8]

3
3.1

对象的封装
设计思路 对象的封装是指将对象按照一定规则串行化, 并且保证

其能在解封时还原成原先的对象。因此在封装的信息中,除 了要保留对象的值,还需要有信息来描述对象的结构和组 成。利用 Web Service 传输对象时,WSDL 描述文件中的 XSD-Schema 部分就担当着描述对象结构和类型的任务,而 SOAP 文档则包含着对象的结构和相对应的值。 然而 Web 环境中的数据大多为半结构化数据, 无法事先 确定对象的结构和类型。 因此对象的定义和对象的数据无法 独立开来。事实上,大多数据的结构是自我描述 (Self-Described)的
[14]

的 Atom

Publishing Protocol 更是适应以资源为中心的 Web 环境。 因此我们基于 Atom 文档格式、Atom 发布协议提出了一 种新的适应当前 Web 环境的远程对象交换机制。 2 节说明 第 了 Atom 文档格式和 Atom 发布协议中的一些基本概念;第 3 节利用 Atom 文档格式的扩展元素 (extension elements) 提出了一种有效封装远程对象的方法; 4 节阐述了如何利 第 用 Atom 发布协议对远程对象进行操作和对远程服务进行查 询,并提出了一些优化措施;第 5 节在比较相关技术的基础 上指出了该机制的优缺点;最后是工作总结和展望。

。 同时这些对象数据又可能来自良好

描述、规范定义的强类型语言(如 Java、C#等等) 。因此对 象的封装应考虑兼顾到半结构化数据和强类型语言。 对于半结构化数据的一种有效表述方式是使用 OEM 模 型(Object Exchange Model)来描述。OEM 是一个比较常 见的自描述嵌套对象模型, 可以简单地视作一个带标记的有 向图
[15]

2

Atom 简 介
从互联网诞生到现在, 互联网中的大部分内容都是提供

。以下是一个 OEM 模型的示例:
N’ O Container

给人们阅读的,而并非给计算机自动处理的。语义 Web (Semantic Web)
[9]

正是希望利用一些相对结构化的技术来
[10]

O1 Activity N1

Task

提高计算机自动处理的能力。相关的技术

包括一开始的
[11]

Task N2 O2

isOwner

RDF,后来的 RSS 等等。2003 年,IBM 的 Sam Ruby 提出“良 好格式的 Web 日志项” (Well Formed Weblog Entry) 期 望可以解决 RSS 中诸如扩展性、命名约束等问题。在此基础 subject Owe r
O3 O4 executor N4 O6 N6 O10 N10 “abc”

N3

su

bta

上开源社区,IBM、Google 等厂商,以及 IETF AtomPub Workgroup 经过努力, 最终在 2005 年和 2007 年确定了 Atom 的两项主要标准。其中 Atom Syndication Format 是一种基 于 XML 定义的数据交换格式。而 Atom Publishing Protocol (简称为 AtomPub) 是一种基于 HTTP 的简单协议,用于创建 和更新 Web 资源。 Atom Syndication Format
[12]

executor O7

sk

O8 N8 “yyy”

N7 “xxx”

r cuto e xe O5 N5 delegation su b j e ct subject O9 N9

subject

123

是一种基于 XML 的文档格 Figure 1

图 1 OEM 模型示例 An example of OEM model

式。可以用来描述一组相关的信息,这些信息被称之为“种 子” (Feeds) 。种子是由一系列被称之为“条目” (Entry) 的项组成。这些条目由一些可扩展的附加元数据组成。如每 个条目都有一个标题(Title) 。Atom 文档的根可以为 Feed 元素或者 Entry 元素,前者包含多个条目,后者只包含一个 条目。当前,Atom Syndication Format 的主要用途是将一 些诸如博客、 新闻等网页内容联合到其他的网站中或者直接 联合到用户终端。 Atom 发布协议
[13]

文献[14]分析得出,XML 的树结构模型与 OEM 的图结构 模型之间是可以相互映射的。 也就是说 XML 是可以很好地描 述这些半结构化的数据。 XML 描述结构化数据的能力是有 而 目共睹的,文献[16]以及 SOAP 封装也证明了这一点。 另一方面, 因为远程对象有可能直接在强类型语言间传 输。为了使得目标系统迅速而又准确地进行解包和映射,并 且适当地增加对于数据的约束性, 不仅仅需要将数据封装起 来,还需要在数据的描述中加入类型信息。 相对于其他 Web2.0 中常见的格式 (如 RSS、 JSON) Atom , 文档格式具有良好的扩展性,支持命名空间,因此可以在 Atom 文档中嵌入任意的 XML 数据,并且可以对现有标签的 属性进行扩展。同时,在对对象的串行化过程中,会涉及到

是一个利用 HTTP 协议和 XML 编码方式

来发布和修改 Web 资源的应用层协议。这个协议支持 Web 资源的创建,具体说提供以下三方面的机制: • 集合:集合是一组 Web 资源,这些资源可以同时 或者分批获取,每一项资源称之为这个集合的成员。

1 期

崔璨 3

等:基于 Atom 协议的远程对象交换机制的研究

二进制数据问题。Atom 文档格式支持 Base64 编码的二进制 数据的嵌入,可以有效地解决 Byte 数组等二进制数据的封 装。因此我们将使用 Atom 的简单扩展元素、结构化扩展元 素、LINK 标签等手段来对对象进行封装。 如图 2,可以利用 XML 节点的前缀 (prefix) 来表述类 型。 首先将类型名定义为 Namespace, 然后将类型名作为 XML 节点的前缀。这样既保证了在忽略 Namespace 的情况下,此 XML 片段仍然为自我描述的半结构化数据,可以被弱类型或 无类型语言使用, 又满足了强类型语言在进行解包时对类型 信息的需要。同时,相对与 Web Service 中类型定义与数据 分开的方式, 直接将类型和数据放在一起可以减少传输数据 量的大小,提高本机制在多类型小数据情况下的性能。
N espace am

以 C++语言为例,上述 entry 所封装的简单对象所对应 的 C++ 类型定义如下:
Class SimpleTestDataObject { public float floatVar; public int intVar; public string StrVar; }

3.3

复杂对象的封装 复杂对象是指该对象至少具有一个属性不为 XSD 定义

的基本类型,如简单对象或者复杂对象。这样的情况下可以 有两种方式进行封装,一种是采取扩展元素(Extension Element)的方式,一种为链接的方式。

Local par t

由于 Atom 文档格式提供两种方式来支持扩展元素:一 种为简单扩展元素(Simple Extension Element) ,一种为

C ent ont

结构化扩展元素(Structured Extension Element) 。在 3.2 中,前者被用来封装简单对象的属性。而利用后者可以在 Atom 文档中嵌入任意的 XML 文档,从而可以利用 3.1 介绍

图 2 对象与 Atom 文档中扩展节点 XML 片段的映射 Figure 2 The mapping between the Object and the XML segment in extension elements of Atom 任何数据对象都可以拆分为简单对象的组合和重复, 因 此对于数据对象的封装可以看成一个递归的过程(如图 2) 。 在研究利用 Atom 格式对一般对象进行封装的时候,可以将 封装的方式细化为三种:简单对象的封装、复杂对象的封装 以及数组对象的封装。 对任何对象的封装都是这三种方式的 组合应用。接下来的 3.2、3.3、3.4 节将详细介绍这三种封 装方式。 3.2 型
[17]

的封装方式来对成员对象进行封装。 首先需要在 XML 文档头 部将需要使用到的一些成员对象的类型定义成 Namespace。 在封装时,对于某一对象,将其成员对象的类型作为前缀, 成员对象名作为 Local part 组成一个结构化扩展元素,此 成员对象的属性按照 3.2 介绍的方式组织 XML 并作为结构化 扩展元素的子元素(Child Element) 。以下就是一个复杂对 象相对应的 Atom 文档内容, 其中 ComplexVar 为此复杂对象 的一个成员对象,其类型为 SimpleTestDataObject: 120212718762 1202012718762 0.5783456 24123493 What’s up < SimpleTestDataObject:ComplexVar> 9SDA546HG6GSD565 0.47801 2053060099 HelloWorld! 2007-12-23 23:42:32

简单对象的封装 简单对象是指对象所有的属性都为 XSD 定义的基本类 。Atom 文档中一个 entry 对应于一个完整的对象。利

用 Atom 的扩展节点可以在简单对象和 Atom 文档的扩展节点 之间进行如图 2 的映射。首先需要在 XML 头部将所有需要 的类型定义为 Namespace,这样可以将属性的类型作为该扩 展节点的前缀。其次,将属性的名称作为该扩展节点的 Local Part。 最后因为该属性的类型是 XSD 定义的基本类型, 可以按照 XSD 定义的方式串行化成字符串作为该节点的内 容 ( Content ) 以 下 就 是 一 个 包 含 三 个 变 量 , 类 型 为 。 SimpleTestDataObject 的对象: 1202 0.4780153 2053060099 Hello World! 1202 2007-12-23 23:32:22

其封装的 java 对象所对应的类型定义如下(其中 SimpleTestDataObject 见上文) :
Class ComplexTestDataObjec { public string StrVar; public SimpleTestDataObject ComplexVar;

4
}



















2007 年

在实际的算法中需要用一个哈希表(Hash Table) 来表征对 另外一种封装复杂对象的方式是采用链接对象, 这等同 象是否被处理过。这个哈希表以对象的 ID 为键(Key) ,以 布尔类型的数值作为值(value)来表示该 ID 对应的对象是 否已经处理过。如果处理过,那么以该对象的类型为前缀, 对象名称为 Local part 构建一个简单扩展节点,并且添加 一个 id 的属性,属性值为该对象对应的 ID。如:
< TestDataObject:TObj id=“ID9SDA546HG6GSD565”/>

于一些程序设计语言中指针的思想。 对于上述的 java 对象, 采取链接的方式封装如下: 1202012718762 1202012718762 0.5783456 24123493 What’s up ComplexVar 2007-12-23 23:43:34

3.6

封装算法 下面给出具体的封装算法。

算法 1:parseObject2Atom //封装算法 输入:原始对象 Oorg 输出:Atom 文档 Fatom (1) 分析对象 Oorg 得到 Oorg 的属性集合 PSorg={P ={T, N, V}| P 为

Oorg 的属性, T 为 P 的类型, N 为 P 的名称, V 为 P 的值}; (2) (3) For each Pi∈PSorg do; If Pi 为简单类型,then 以 Ti 作为 prefix,以 Ni 作为节

点名称,以 Vi 作为节点内容在 Fatom 中构建 Atom 简单扩展节点 Ei; (4) (5) (6) (7) Else If Pi 为复杂类型, then If NOT LINK 方式 If Pi 在哈希表 H 中 以 Ti 作为 prefix,以 Ni 作为节点名称在 Fatom

其中 LINK 元素中的 href 属性指向成员对象所对应的文 档,rel 属性指出成员对象的实际类型。该 LINK 元素指向 的文档内容如下: 9SDA546HG6GSD565 0.4780153 2053060099 Hello World! 9SDA546HG6GSD565

中构建 Atom 简单扩展节点 Ei; (8) (9) (10) 添加属性 id 至 Ei,其值为 Pi.id; Else 以 Ti 为 prefix, Ni 作为节点名称在 Fatom 中构 以

建 Atom 结构化扩展节点 Ei, 并在哈希表 H 中添加 Pi; (11) (12) (13) (14) (15) Goto (1), 将输入置为 Pi, 输出置为 Ei Else 生成 LINK 节点; Else if Pi 为数组类型, then If NOT LINK 方式 以 Ti 作为 prefix,以 Ni 作为节点名称在 Fatom

使用这种方式,需要向服务器请求多次。但是可以减少 不必要数据的传输。 在第 5 节中会提到建立在这种封装方式 上的延迟读写机制。 3.4 数组对象的封装 对于数组对象, 同样可以采用结构化扩展元素方式和链 接方式两种。 在采用类似 3.3 中介绍的结构化扩展元素方式 时,将数组变量所对应的类型作为结构化扩展元素的前缀, 将数组变量的名称作为结构化扩展元素的 Local Part,数 组成员的封装方式与复杂对象中成员对象的封装方式相同。 利用链接的方式来实现数组对象的封装与 3.3 中实现 复杂对象的封装是基本相似的。 不同的是, LINK 元素中 HREF 指向的是一个包含多个 Entry 的 Feed 文档,而不是只含有 一个 Entry 的 Entry 文档。 3.5 重复对象的处理 按照 3.2,3.3,3.4 方式进行递归,就可以基本上实现 Atom 文档和实际对象的映射。但还需要考虑到图中的环与 重复对象的处理问题。如图 1, 对于对象 O4 所对应的节点 N4 有 3 条入边,因此在递归的过程中,N4 至少被引用 3 次 并且可能存在无穷递归。如果我们不考虑重复对象的处理, 那么势必会造成资源的浪费并有可能造成死循环。 因此我们

中构建 Atom 结构化扩展节点 Ei; (16) (17) (18) (19) (20) (21) (22) ; (23) 合并所有片段; ; 得到 Pi 的成员对象集合 OSi; For each Oij (Tij, Nij, Vij)∈OSi do

Goto (1), 输入置为 Oij, 输出置为 Ei; ; Else 生成 LINK 节点;

第 (1) 步分析对象得到对象的基本信息; (2) (18) 第 步对 (1) 中得到的对象的属性进行一一遍历, 逐个生成 XML 片段;其中第(3)步处理简单类型,第(4)-(12)处理 复杂类型,第(13)-(20)处理数组类型。 算法 1 可以简单地认为是一个深度优先遍历生成树的 过程。如图 1,将一个对象 O1 按照 OEM 的方式展现成有向 图的形式,如果该图中有 n 个节点,深度优先遍历的时间复 杂度为 O(n2),由于需要保存节点是否访问的信息,因此空 间复杂度为 O(n)。

1 期

崔璨 5

等:基于 Atom 协议的远程对象交换机制的研究

4
4.1

对象的交换
对象的操作 在 REST 架构中,所有的资源都对应着唯一的 URL。对
[7]

的描述服务的内容。这样, Atom 服务的描述和自动发现相 对要更加直观、容易和快捷。

5

优化措施
我们也对延迟读写和缓存机制两方面进行了优化。 在 3.4,3.5 中,利用 Atom 数据格式提供的 LINK 标签

资源的操作,对应着利用 HTTP 协议对唯一 URL 的访问 。 在 Atom 发布协议中定义了对于 Web 资源在 CRUD(Create、 Request、Update、Delete)四个方面的操作。Atom 发布协 议利用 HTTP 协议中的 POST、GET、PUT、DELETE 四个方法 以 c 下是客户端与服务器端交互的示意图:
[18]

实现了复杂对象和数组对象的封装。在实际使用中,某一特 定对象和其成员对象或者数组成员是分别请求服务器进行 操作的。例如对于图 1 表述的对象,其中 Activity 有至少 4 个属性, 一个是 Owner 还有三个是 Activity 包含的 Task。 在显示 Activity 的概要时候,我们可能只需要获取到 Activity 的基本属性,三个 Task 的信息可以稍后获取。在 这种情况下,我们可以将三个 Task 成员对象以链接的方式 封装在 Activity 中。因此在实际的应用中,可以根据具体 的业务逻辑,对特定对象的特定部分实现延迟读或者延迟 写,提高网络的利用率,减少资源的浪费。 由于此远程对象交换机制是基于 HTTP 协议进行传输 的 , 而 HTTP 提 供 了 诸 如 must-revalidate、 max-age、 if-Modified、if-Modified-Since 这样的缓存控制机制
[18]

来对应 CRUD 的四个操作。以更新(Update)远程对象为例,

Client 1. HTTP P UT 成员UR L 以Atom格式封装的Entry文档

S erver

2. HTTP 2 00 OK



因此 利用 HTTP 的缓存控制可以实现一定程度上的缓存机 制。以 max-age、if-Modified-Since 为例,客户端向服务 图 3 利用 Atom 发布协议更新远程对象 Figure 3 Update remote object with Atom Publishing Protocol 客户端将需要更新的远程对象的属性以及其成员对象 按照 3 中的方式进行封装,并利用 HTTP 的 PUT 方法将封装 好的 Entry 文档传输到此对象对应的成员 URL。如果修改成 功,服务器端将返回 200(OK)的 HTTP 状态号。如果此对 象不存在,服务器端将返回 204(No Content)的 HTTP 状 态号,如果是其他错误,服务器端将返回 4xx 或者 5xx 的错 误号,并附上具体的错误信息。同样地,可以利用类似的方 法来创建、获取、删除对象。 4.2 远程服务的查询和自动发现 Atom 发布协议中定义的服务文档可以列举出远程服务 器当前提供的资源集合。在具体的应用中,每一个资源集合 对应着一个具体的业务逻辑,也就是代表着一个相关的服 务。利用这一点,可以将 Atom 的服务文档对应为具体业务 服务的定义。客户端通过向远程服务器的服务文档 URI (Service Document URI)提交一个 PUT 请求,可以获得这 个服务文档,文档中包含着支持服务的集合,从而实现对远 程服务的查询。 原先 Web Service 的服务查询和自动发现依赖于 UDDI 的实现。但是 2007 年 UDDI 的关闭也说明了 Web Service 原先的服务查询和自动发现的机制并不理想, 并不能得到一 致的认同。究其原因还是因为 UDDI 的方式并不能适应当前 的 Web 环境
[19]

器请求一个对象之后,将按照 HTTP 头部 max-age 设置的时 间长度在本地保留该对象,在 max-age 设置的时间长度之 内,客户端将使用本地对象,超过该时长后,客户端将再次 向服务器发出请求并附上 if-Modified-Since 的头部信息。 如果远程对象发生改变,则返回新的对象数据,如果远程对 象尚未发生改变,则返回的 304(Not Modified)HTTP 状态 号。

6
6.1

评估与比较
性能评估 该对象交换机制的性能可以使用查询远程对象的响应

时间来度量。影响响应时间的主要因素是网络带宽、机器速 度、Atom 数据格式封装与解包算法。我们选择了同样采取 HTTP 通信协议的基于 HTTP SOAP 的 Web Service 作为参照 对象。我们在两台 Pentium M 1.60GHz 的机器上分别运行客 户端和服务端程序。在软件环境上,服务器端利用 Apache

。 在文献[19]中, 提出了一种基于 Atom 的 Web

Service 的自动发现机制。因为 Atom 具有良好的描述能力, 并且可以利用 HTML 的 meta 信息和 HTML 页面无缝结合。利 用 HTML 的 meta 标签签入 Atom 资源的 URI,而 HTML 页面以 直观的方式描述服务,可以方便人获得该资源的信息,同时 利用文献[19]提出的方式,可以用 Atom 文档格式来格式化

6











算 6.2







2007 年

图 4 Atom 方式与 Web Service 方式性能比较 1 Figure 4 The comparison on performance between Atom and Web Service I Tomcat5.5 来提供 HTTP 服务,利用 Apache Axis 来实 现基于 HTTP SOAP 的 Web Service; 客户端为运行在 Sun Java 1.6 JVM 上的 Java 程序。 实验(1) :以读取远程对象为例,基于 Atom 的程序与 基于 Web Service 的程序分别从服务器端传送一定数量的相 同类型的对象到客户端并解析成 Java 对象。对象数量从 1 开始逐步递增到 200,相应的执行时间绘制如图 4。由于程 序及 Web 服务器运行在 Java 虚拟机(JVM)之上,JVM 的垃 圾回收机制造成了一些时间延迟, 因此在图中出现了几处峰 值。 从图 4 中,我们可以看出在传输少量(150)时,Atom 方式要稍劣于 Web Service 方式。因此 Atom 方式更适应数据量较小的 Web 环境。 实验(2) :同样以读取远程对象为例,基于 Atom 的程 序与基于 Web Service 的程序分别从服务器端传送 100 个不 同类型的对象到客户端并解析成 Java 对象。对象类型的数 目从 1 开始逐步递增到 100,相应的执行时间如图 5。

相关工作 此外,我们也将基于 Atom 的交换机制和其他常见的方

式进行了一个综合比较。比较的方面包括支撑平台、实现方 式以及适应的领域等。 表 1 Atom 方式与其他方式的综合比较 Table 1 The comprehensive comparison between Atom and other approaches Atom 方法 平台无关 语言无关 JavaScript 实现 表述包含语义 半结构化数据 动态支持未知类 型对象的交换 需应用服务器 支持延迟读写 支持自动发现 适应环境 不需 要 是 部分 Web/ 互联 网 否 UDDI 广域网 需应用服 务器支持 否 局域网 否 局域网 否 不需要 需要 不需要 是 是 可以 是 支持 支持 Web Service 是 是 较难 部分 不支持 较难 .Net RMI 部分 部分 否 否 不支持 不支持 否 部分 否 否 不支持 不支持 / COM+

7

结束语
本文以 Atom 文档格式与 Atom 发布协议为基础建立了一

种更易被 Web2.0 和 Mash-up 系统应用的远程对象交换机制。 在兼顾 Web 环境中常见的半结构化数据与强类型语言结构 化要求的条件下,利用 Atom 文档格式的扩展功能解决了远 程对象的封装问题。并且利用 Atom 发布协议定义的资源操 作解决了在基于 HTTP 的 Web 环境中如何实现远程对象操作 的问题。在此基础上,对此机制的性能进行了评估,并综合 比较了相关的技术。从而得出基于 Atom 协议的远程对象交 换机制据有实现简单、适应半结构化数据、在少量易变数据 时性能好等优点,更容易被现有的 Web2.0 和 Mash-up 程序 图 5 Atom 方式与 Web Service 方式性能比较 2 Figure 5 The comparison on performance between Atom and Web Service II 从图 5 我们可以看出, 随着对象类型数目的增加, Atom 方式执行时间增幅相对较小。这是因为 Atom 方式对象的结 构和数据是在同一文档中描述的,而 Web Service 方式对象 的结构和数据是分开描述的。因而 Web Service 需要静态的 对于每一个不同类型的对象定义从 SOAP 包到 Java 对象的 proxy。而 Atom 中这一切是动态进行的。因此 Atom 方式对 于多变的数据具有更好的支持,更容易适应 Web 环境中半 结构化、多类型的数据形式。 References: [ 1 ] Linda Dailey Paulson. Building Rich Web Applications with Ajax[J].Computer,2005,38(10):14-17. [ 2 ] O'reilly, What is Web2.0. 2005. http://www.oreillynet. com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html. [ 3 ] Miguel A. Canas, Juan J. Hierro, Volker Hoyer et al, Enterprise Mashup: Putting a face on the next generation global SOA [C]. The 8th International Conference on Web 应用。进一步,我们还将在大数据环境下的性能优化、集群 环境下的对象交换等方面做深入的研究。

1 期

崔璨 7

等:基于 Atom 协议的远程对象交换机制的研究

Information Systems Engineering,2007:12-18. [ 4 ] Buneman P. Semistructured Data[C]. Proc of the ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS). Tucson, Arisona, 1997. 117-121 [ 5 ] RSS 2.0 Specification. 2003. [ 6 ] Introducing JSON. http://www.json.org/. [ 7 ] Fielding Thomas Roy. Architectural Styles and the Design of Network-based Software Architectures[D]. University of California, Irvine, 2000. [ 8 ] Michael zur Muehlen, Jeffrey V. Nickerson and Keith D. Swenson, Developing web services choreography standards--the case of REST vs. SOAP[J], Decision Support Systems, 2005, 40(1) 9-29. [ 9 ] Berners-Lee,T., Hendler, J., and Lassila, O. The Sematic Web[J]. Scientific American, 284(5) 2001: 34-43. [10] Decker, S. Melnik, S. van Harmelen, et al. The Semantic Web: the roles of XML and RDF[J]. Internet Computing, IEEE, 2000, 4(5):63-73. [11] Sam Ruby, Anatomy of a Well Formed Log Entry: http://intertwingly.net/blog/2003/06/16/Anatomy-of-a-Well-For med-Log-Entry. 2003. [12] RFC4287. The Atom Syndication Format. 2005. [13] RFC5023: The Atom Publishing Protocol. 2007. [14] Wang Jing, Meng Xiaofeng. Schema of Semi-Structured Data, A Survey[J]. Computer Science, 2001, 28(2):6-10 [15] Papakonstantinou Y, Monlina H G, Widon J. Object Exchange Across Heterogeneous Information Sources. IEEE International Conference on Data Engineering[C].1995.03: 251-260. [16] Jayavel S, Eugene S, Rimon B, et al. Efficiently publishing relational data as XML documents[J], The VLDB Journal The International Journal on Very Large Data Bases, 2004, 10(2-3) 133-154. [17] Paul V. Biron, Ashok Malhotra; XML Schema; W3C Recommendation, http://www.w3.org/TR/xmlschema-2/ [18] RFC2616. Hypertext Transfer Protocol, HTTP1.1 [19] Chen Wu, Elizabeth Chang. Aligning with the Web: an atom-based architecture for Web services discovery[J], Service Oriented Computing and Applications,2007 1(2): 97-116 附中文参考文献: [14] 王静, 孟小峰. 半结构化数据的模式研究综述[J]. 计算 机科学, 2001, 28(2):6-10

Similar Documents

Free Essay

Inc1 C451 Comprehensive Study Notes

...capable of being proven wrong. Fact: A phenomenon about which competent observers can agree. Theory: A synthesis of a large body of information that encompasses well-tested hypotheses about certain aspects of the natural world. Law: A general hypothesis or statement about the relationship of natural quantities that has been tested over and over again and has not been contradicted. Also known as a principle. Evidence: which serves to either support or counter a scientific theory or hypothesis. Experiment: is a test carried out in order to discover whether a theory is correct or what the results of a particular course of action would be . What did Galileo do to challenge Aristotle?s belief that heavy objects fall faster than lighter objects? Galileo very carefully examined Aristotle?s hypothesis. Then he...

Words: 33649 - Pages: 135

Free Essay

Internet of Things

...| Internet of Things | 2014| Pragya Vaishwanar | Aricent Marketing Research Report | Summary It’s fair to say that more people have heard of the “internet of things” than have experienced it. More objects are becoming embedded with sensors and gaining the ability to communicate. The resulting information networks promise to create new business models, improve business processes, and reduce costs and risks. There is breathless press coverage of the phenomenon—always patiently re-explained by tech pundits as the trend by which all of one’s most mundane possessions will become internet-connected. These are invariably coupled with estimates that the internet of things will be a multi-trillion dollar business. 2014 is really, finally the year that the “internet of things”—that effort to remotely control every object on earth —becomes visible in one’s everyday lives. In a sense the internet of things is already with us. For one thing, anyone with a smartphone has already joined the club. The average smartphone is brimming with sensors—an accelerometer, a compass, GPS, light, sound, altimeter. It’s the prototypical internet-connected listening station, equally adept at monitoring our health, the velocity of our car, the magnitude of earthquakes and countless other things that its creators never envisioned. Yet despite repeated declarations one of the most successful sellers of baubles that help make your home “smart,” Smart-things, has only shipped 10,000 or so units since...

Words: 13930 - Pages: 56

Premium Essay

Inc1 Modules 3-9

...Module 3 Waves and the Electromagnetic Spectrum  Topic: Waves    1. What is a wave?  A wave is vibration that travels and all waves are created by something vibrating. Waves transport energy  but do not transport mass.     2. Describe the following terms associated with waves:   a. amplitude­ height of wave  b. wavelength­ length of a wave  c. frequency­ number of waves per second (Hz)  d. period­ how long a wave lasts when it arrives at a fixed point (measured in seconds)      3. What are radio waves?  An electromagnetic wave of a frequency used for long­ distant communication.     4. Explain the difference between a transverse wave and a longitudinal wave, and give examples of  each.  In a longitudinal wave, the vibration travels in the same direction that wave travels. Examples of longitudinal  waves include: Sound, p­-waves (earthquakes)     In a transverse wave, the vibration direction is perpendicular to direction that wave travels. Examples  include: Light/electromagnetic, (radio, microwave, x­ray, etc.), water waves, s­waves (earthquakes).     The major difference between longitudinal and transverse waves is their direction. Longitudinal waves move  left to right while transverse waves move up and down.       5. Compare and contrast: light waves vs. sound waves   Light waves are transverse and sound waves are longitudinal. Light waves can travel through a vacuum but  sound waves cannot. Speed of light is nearly 300 million m/s while sound has a speed of about 340 m/s...

Words: 11922 - Pages: 48

Premium Essay

Reearch

...HIST Y AN PHILO PHY TORY ND P OSOP Y OF S ENCE SCIE E COMM MON CO OURSE IN ENG E GLISH BBA (I Seme A ester) BA/BS (IV Se Sc emester)     2011 A dmission onwards o UNIV VERSI ITY OF CAL F LICUT SC CHOOL OF DI L ISTANC EDU CE UCATIO ON Calicut Universi P.O. M ity Malappur ram, Kera India 673 635 ala, a 106 School of Distance Education   UNIVERSITY OF CALICUT  SCHOOL OF DISTANCE EDUCATION  BBA (I Semester)  BA/BSc (IV Semester) Common Course in English 2011 Admission onwards HISTORY AND PHILOSOPHY OF SCIENCE MODULE  I & II    Prepared by :  House No. 21   “Pranaam”  Keltron Nagar, Kolazhi,  Thrissur  Ms. GAYATHRI MENON .K  MODULE III  & IV Prepared  by: Ms. SWAPNA M.S.  Department of English  K. K. T. M. Govt. College  Pullut, Thrissur  Dr. Anitha Ramesh K  Associate Professor  Department of English  ZG College, Calicut  © Reserved  2  Scrutinised by :     Layout:   Computer Section, SDE  History and Philosophy of Science  School of Distance Education   Contents MODULE I ANCIENT HISTORY OF SCIENCE 1. Introduction 2. Origins of Scientific Enquiry 3. European Origins of Science 4. Contributions of Early India 5. Science in China 6. The role of Arabs in the History of Science MODULE 2 7. Science in the Middle Ages MODULE 3 MODERN SCIENCE 8. Newton and After 9. The Advancing Frontiers: Modern Medicine to Nanotechnology MODULE 4 PHILOSOPHY OF SCIENCE 10. Basic concepts in the Philosophy of Science 11. Some Issues in the Philosophy...

Words: 34637 - Pages: 139

Free Essay

La Singularidad

...NOTE: This PDF document has a handy set of “bookmarks” for it, which are accessible by pressing the Bookmarks tab on the left side of this window. ***************************************************** We are the last. The last generation to be unaugmented. The last generation to be intellectually alone. The last generation to be limited by our bodies. We are the first. The first generation to be augmented. The first generation to be intellectually together. The first generation to be limited only by our imaginations. We stand both before and after, balancing on the razor edge of the Event Horizon of the Singularity. That this sublime juxtapositional tautology has gone unnoticed until now is itself remarkable. We're so exquisitely privileged to be living in this time, to be born right on the precipice of the greatest paradigm shift in human history, the only thing that approaches the importance of that reality is finding like minds that realize the same, and being able to make some connection with them. If these books have influenced you the same way that they have us, we invite your contact at the email addresses listed below. Enjoy, Michael Beight, piman_314@yahoo.com Steven Reddell, cronyx@gmail.com Here are some new links that we’ve found interesting: KurzweilAI.net News articles, essays, and discussion on the latest topics in technology and accelerating intelligence. SingInst.org The Singularity Institute for Artificial Intelligence: think tank devoted to increasing...

Words: 237133 - Pages: 949

Premium Essay

Proposal

...“The Master Key System” written by Charles F. Haanel in 1912 and first published in 1916 by Psychology Publishing, St. Louis and the Master Key Institute, NY The original text is now in public domain. However, this free e-book edition is not in public domain. It cannot be shared, distributed or reproduced in whole or in part. If you would like to share this e-book with others please direct them to our website www.thesecret.tv where a legitimate copy can be downloaded for free. 2 A note from Rhonda Byrne, creator and executive producer of ‘The Secret’. Another landmark text in success literature, dating from the same era as Wallace Wattles’ extraordinary manuscript “The Science of Getting Rich”. “The Master Key System” was a phenomenon of its time, skyrocketing author Charles F. Haanel to fame, as well as to a considerable fortune! “The Master Key System” documents minutely not only the methods, but the science behind the methods which propelled Haanel himself to extraordinary levels of success, as businessman, author and personal mentor to some of his era’s most successful businessmen. Internalise this remarkable book and you too will learn The Secret, the secret of thought as creative energy, as power, as the Master Key to your own development. Haanel’s “Master Key” virtually opens the door to cosmic intelligence, allowing you to attract everything you need to achieve your dreams. Originally written as a correspondence course, the book is divided...

Words: 61732 - Pages: 247

Premium Essay

Hmi Controlled Classroom

...Chapter 1 INTRODUCTION Background of the study Living in this modern society, technology is very much involved. Every person is recognized with the device or gadget, he carries; that is the result of a technologically inclined society. Eventually, living without technology is like a soldier without gun; that is how people are so much dependent with technology today. Nowadays, some customers such as hospitals, manufacturing, industries, commercial establishments, schools, buildings and homes are dependent on electrical devices and equipment. These devices are controlled by modern technology for their operations, controls and processes. This includes remote sensing, SCADA, HMI, micro controller sensors and PLC. They are used for automatic control of lights and switches, and for remotely controlled operation of equipment or machine. These modern technologies save time, costs, and labor. The researcher conceptualized this study about the modern technology using HMI in the school specifically the laboratory room. Laboratory should be conducive to learning so that students are encouraged to study. It is a room where the students have the basic knowledge in theoretical aspects before they ought to gain knowledge outside. So, the study is focus on the development of a modernized laboratory equipped with automatic controls. Before laboratory is just a room with equipment, many lights, and switches. They are using manual switching of the facilities inside a laboratory room which is done...

Words: 15414 - Pages: 62

Premium Essay

Mike

...The Master Key System ! Kallisti Publishing • Charles F. Haanel’s Complete Master Key Course" Charles F. Haanel 1 The Master Key System ! Charles F. Haanel Copyright © 2011 by Kallisti Publishing All rights reserved. No part of this book may be reproduced in any form or by any electronic or mechanical means including information storage and retrieval systems, without permission in writing from the author. The only exception is by a reviewer, who may quote short excerpts in a review. Published by Kallisti Publishing 332 Center Street, Wilkes-Barre, PA 18702 Phone (877) 444-6188 • Fax (419) 781-1907 info@kallistipublishing.com www.KallistiPublishing.com Kallisti Publishing • Charles F. Haanel’s Complete Master Key Course" 2 The Master Key System ! Charles F. Haanel Table of Contents A Few Notes About This Edition of The Master Key System! 5 Additional Material! 6 About Charles F. Haanel! 7 Introduction! 9 Week One: An Introduction to the Master Key System! 12 Week Two: The Basics of Your Mind! 20 Week Three: Realizing Your Mental Resources! 28 Week Four: Reversing the Process — From Cause to Effect! 36 Week Five: The Creative Mind! 44 Week Six: The Brain of Man! 53 Week Seven: Utilizing the Omnipotent Power! 62 Week Eight: Thought and Its Results! 71 Week Nine: Affirmations and Your Mind! 81 Week Ten: A Certain Definite Cause! 92 Week Eleven: Inductive...

Words: 69048 - Pages: 277

Premium Essay

Asp.Net and Ajax

...Microsoft ® ASP.NET and AJAX: Architecting Web Applications www.zshareall.com Dino Esposito PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2009 by Dino Esposito All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Control Number: 2008940527 Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWT 4 3 2 1 0 9 Distributed in Canada by H.B. Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further infor mation about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to msinput@microsoft.com. Microsoft, Microsoft Press, ActiveX, Expression, IntelliSense, Internet Explorer, MS, MSDN, Natural, Silverlight, SQL Server, Visual Basic, Visual C#, Visual InterDev, Visual Studio, Windows, Windows Media, Windows Server and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. The example companies...

Words: 91822 - Pages: 368

Free Essay

Psychology

...NATURE OF MAN HISTORY AND PHILOSOPHY OF SCIENCE IN 10 MODULES E. Kolawole Ogundowole, Ph.D., D.Sc. Professor & Head of Philosophy Department University of Lagos. Akoka, Lagos. Nigeria Correct Counsels Limited Research. Counselling. Publishing. Book Supply First published 2003 Correct Counsels Ltd. P. O. Box 53 Akoka, Lagos. C E. Kolawole Ogundowole, 2003 ISBN: 978 -37004 - 0 – 5 This book is copyright. All rights reserved under the Copyright La Enquiries should be addressed to the Publishers. Printed in Nigeria by: Mustard Press Enterprises 16, Ogundola Street Sungas-BAriga. PREFACE A few words about the overall objectives of the course is appropriate as a starting point. Historically, philosophy was the first form of theoretical knowledge. As a rational theoretical tool of comprehending the world, philosophy arose in ancient Greece in stiff battle with mythology and religious consciousness. It came out to lay the foundation for the evolvement of scientific consciousness and the emergence and development of the sciences - Mathematics, Astronomy, Physics, Chemistry, Biology, etc. In an environment rife with various and varying superstitions and myths, the study of the History of Science and Philosophy of Science becomes crucial, lest science itself falls within the ambit of mythology and superstition and becomes another form of myth even in the hands of the tutored. The study of the History of Science...

Words: 54229 - Pages: 217

Premium Essay

Simply Wooo

...UNDERGRADUATE CURRICULA AND FACULTY 2007 – 2011 Proposed 2009 – 2013 2 Requirements for the BBA degree: Foundation Courses 40-41 Credits Core Courses 45 Credits Departmental Requirement 24 Credits Minor 15 Credits Total variable requirement for Graduation 124-125 Credits Foundation Courses Communication Skills ENG 101 ENG 102 ENG 105* ENG 106 ENG 202 Listening and Speaking Skills English Reading Skills Business English Advanced English Skills Introduction to English Literature 40-41 Credits 9 3 3 3 3 3 * Prerequisite ENG 101 & 102 Note: students not exempted from ENG 101 and ENG 102 will have to take ENG 101, ENG 102 and ENG 105. Note: students exempted from ENG 101 and ENG 102 will have to take ENG 105, ENG 106, ENG 202 Computer Skills CIS 101* CSC 101** Fundamentals of Computer System Introduction to Computer Science 3 3 3 * For students without basic knowledge of computer **For students with basic knowledge of computer & mandatory for students with Major in subjects offered from the SECS Numeracy MAT 100* MAT 210* Basic University Mathematics 1 Basic University Mathematics 2 6 3 3 3 *MAT 100 and MAT 210 mandatory for SLAS majors(English, Media & Communication, Anthropology) other than Sociology MAT 101* MAT 211* MAT 102* MAT 212* Intermediate University Mathematics II Probability and Statistics Introduction to Linear Algebra & Calculus Probability & Statistics for Sc. & Engr. 3 3 3 3 **MAT 101and MAT 211 mandatory for...

Words: 16148 - Pages: 65

Free Essay

Applied Soa

...Applied SOA Service-Oriented Architecture and Design Strategies Mike Rosen Boris Lublinsky Kevin T. Smith Marc J. Balcer Wiley Publishing, Inc. Applied SOA Applied SOA Service-Oriented Architecture and Design Strategies Mike Rosen Boris Lublinsky Kevin T. Smith Marc J. Balcer Wiley Publishing, Inc. Applied SOA: Service-Oriented Architecture and Design Strategies Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright  2008 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-22365-9 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and...

Words: 218699 - Pages: 875

Premium Essay

Business Information System Assignment

...industry lead illustrates which business objective? a. b. c. d. Improved flexibility Improved business practices Competitive advantage Survival Difficulty: Hard Reference: p. 8 Answer: c 4. The use of information systems because of necessity is: a. b. c. d. survival improved business practices competitive advantage improved flexibility Difficulty: Medium Reference: p. 9 Answer: a 5. (Analysis) Which of the following choices may lead to competitive advantage (1) new products, services, and business models; (2) charging less for superior products; (3) responding to customers in real-time? a. b. c. d. 1 only 1 and 2 2 and 3 1, 2, and 3 Difficulty: Hard Reference: p. 8 Answer: d Analysis in terms of compare 6. Verizon's implementation of a Web-based digital dashboard to provide managers with realtime information such as customer complaints is an example of: a. b. c. d. improved flexibility. improved decision-making. improved efficiency. customer and supplier intimacy. Difficulty: Medium Reference: p. 8...

Words: 34754 - Pages: 140

Premium Essay

Computer

...This page intentionally left blank Copyright © 2008, New Age International (P) Ltd., Publishers Published by New Age International (P) Ltd., Publishers All rights reserved. No part of this ebook may be reproduced in any form, by photostat, microfilm, xerography, or any other means, or incorporated into any information retrieval system, electronic or mechanical, without the written permission of the publisher. All inquiries should be emailed to rights@newagepublishers.com ISBN (13) : 978-81-224-2631-1 PUBLISHING FOR ONE WORLD NEW AGE INTERNATIONAL (P) LIMITED, PUBLISHERS 4835/24, Ansari Road, Daryaganj, New Delhi - 110002 Visit us at www.newagepublishers.com This page intentionally left blank Table Of Contents PART I (Computer Application Theory) 1 Introduction To Computer .........................................................1 History Of Computer .................................................................................................. 1 Generations Of Computer ........................................................................................... 7 First Generation Computers........................................................................... 7 Second Generation Computers ...................................................................... 7 Third Generation Computers ......................................................................... 8 Fourth Generation Computers .......................................................

Words: 60713 - Pages: 243

Premium Essay

Databasse Management

...Fundamentals of Database Systems Preface....................................................................................................................................................12 Contents of This Edition.....................................................................................................................13 Guidelines for Using This Book.........................................................................................................14 Acknowledgments ..............................................................................................................................15 Contents of This Edition.........................................................................................................................17 Guidelines for Using This Book.............................................................................................................19 Acknowledgments ..................................................................................................................................21 About the Authors ..................................................................................................................................22 Part 1: Basic Concepts............................................................................................................................23 Chapter 1: Databases and Database Users..........................................................................................23 ...

Words: 229471 - Pages: 918