Collaborative SVG as a Web Service

Keywords: collaborative, MVC, SVG, event, Web Service

Xiaohong Qiu,
Ph.D student
EECS Department, Syracuse University.
Research work performed at Community Grids Lab, Indiana University
Bloomington, Indiana
USA

http://communitygrids.iu.edu

Biography

Xiaohong Qiu is a Ph.D. student of Syracuse University. She is currently finishing her dissertation at Indiana Unviersity. Publications:

  1. Xiaohong Qiu, Bryan Carpenter and Geoffrey C. Fox, Internet Collaboration using the W3C Document Object Model , Proceedings of International Conference on Internet Computing, Las Vegas June 2003 http://grids.ucs.indiana.edu/ptliupages/publications/collaborative_dom_conference_2003_Int_IC_font10_without_title_page.pdf
  2. Sangmi Lee, Xiaohong Qiu et al., Ubiquitous Access for Collaborative Information System using SVG, Proceedings of SVGopen conference July 2002, Zurich, Switzerland. http://www.svgopen.org/papers/2002/lee__garnet_collaborative_info_system/
  3. Xiaohong Qiu et al., Grid Services for Earthquake Science, Concurrency and Computation: Practice and Experience in ACES Special Issue, 14, 371-393, 2002. http://aspen.ucs.indiana.edu/gemmauisummer2001/resources/gemandit7.doc
  4. Xiaohong Qiu et al., Collaborative Web Services and Peer-to-Peer Grids, Proceedings of 2003 Collaborative Technologies Symposium Orlando January 20 2003 http://grids.ucs.indiana.edu/ptliupages/publications/foxwmc03keynote.pdf
  5. Xiaohong Qiu et al., Peer-to-Peer Grids, Chapter 18 of Grid Computing: Making the Global Infrastructure a Reality, book edited by Fran Berman, Geoffrey Fox and Tony Hey, John Wiley and Sons, Chicester, England, ISBN 0-470-85319-0, March 2003.

Bryan Carpenter,
Researcher
Community Grids Lab, Indiana University
Bloomington
Indiana
USA

http://communitygrids.iu.edu

Biography

http://www.hpjava.org/

Geoffrey Fox,
Professor of Computer Science, Physics and Informatics, Director of Community Grids Lab, Indiana University
Community Grids Lab, Indiana University
Bloomington
Indiana
USA

http://communitygrids.iu.edu

Biography

http://communitygrids.iu.edu/cglpeople.html


Abstract


Grids and Peer-to-Peer networks provide infrastructure for global collaboration of people and shared resources. These observations suggest that applications be built as Web services with clearly defined message based inputs and outputs. We present an approach to make SVG a Web Service and to build synchronous collaborative SVG applications as Web services with a message-based event model. By integrating with the messaging environment NaradaBrokering and the collaborative session control service XGSP, we show a general way of building W3C DOM based applications as collaborative Web Services. We have prototyped a shared SVG browser and a collaborative chess game with SVG to demonstrate our design concepts.


Table of Contents


1. Introduction
2. Structure of SVG Web Service
     2.1 Decomposition of SVG Browser
     2.2 Collaborative SVG as a Web Service Model
3. Collaborative SVG Applications
     3.1 Architecture of shared SVG browser with no SVG decomposition
     3.2 Architecture of multiplayer Internet Game with SVG
4. Structure of Collaborative W3C DOM/SVG Events
     4.1 Event Categories
     4.2 Master events vs. non-master events
     4.3 Major events vs. minor events
     4.4 Collaboration as a Web Service (XGSP) Events
     4.5 Structure of Collaborative Events
5. Conclusions
Bibliography

1. Introduction

We present a formulation of SVG in a Web service structure exploiting a message-based MVC (Model View Controller) paradigm. This work has two major goals; firstly it allows us to make a very flexible collaborative SVG browser exploiting our general approach for collaborative Web Services [FOX 2003] . Secondly it shows how applications and in particular W3C DOM based applications can be built as Web Services in our case utilizing Batik SVG Browser [BATIK] , which has a well written open source code [QCF 2003] . Building applications as Web Services has several important features; it allows automatic generation of collaborative applications; it unifies distributed and local services; finally it allows easier customization of the user interface to support the needs of clients or users. We discussed the latter point in SVG OPEN 2002 [LFKWQ 2002] , which described PDA interfaces to SVG. In this paper we focus on the Web Service SVG architecture and the structure of the associated event model. We believe that our analysis could suggest architectures for future office and visualization systems, which are built around object models similar to the W3C DOM [DOM2 CORE] [DOM1 CORE] [DOM2 EVENTS] .

In our lab, we have separately developed two useful technology components to support this approach to collaborative applications.

  1. A Collaboration Control Web Service [WEB SERVICES] that supports collaboration by providing the Web service equivalent of H323, SIP and JXTA control functions – these include establishing sessions, clients, profiles and a collection of shared resources. There is a new XML protocol XGSP [FOX 2002] introduced to capture the information needed to implement this capability, which we term “Collaboration as a Web Service”. For H 323 our Web Service provides the MCU (Multipoint Control Unit) functionality.
  2. An event and messaging infrastructure NaradaBrokering [NARADABROKERING] that can manage the unicast and multicast delivery of messages between the different processes. NaradaBrokering copes with multiple protocols (both TCP/IP and UDP based) and tunnels through firewalls and network bottlenecks. It uses XML-based publish/subscribe semantics generalizing that familiar from JMS (Java Message Service) [JMS] and we have shown this conveniently supports collaboration. Each shared object corresponds to a topic and NaradaBrokering manages the associated topic-labeled event streams with high performance.

We make the critical observation that Web services are built around messaging – their state is determined by control messages from the user or other services and their “meaning” (in particular their output display) is defined by messages sent from other Web services. This message-based structure allows both the universal implementation of collaboration and the convenient model for universal access. WSRP (Web Services for Remote Portlets) is being developed by OASIS [OASIS] to specify the form of user-facing ports for Web services and WSIA (Web Services for Interactive Applications) and our approach unifies these.

2. Structure of SVG Web Service

2.1 Decomposition of SVG Browser

Key features of the architecture of SVG [SVG] and related applications can be derived from the MVC [SMALLTALK 80] [LEE 1994] [MVC MS WINDOWS] picture (Fig. 1). We take the Model component and this essentially becomes the Web Service while the View becomes the user interface. They are linked by the NaradaBrokering publish/subscribe messaging system; the combination of this with the preparation and interpretation of messages corresponds to the Controller MVC component.

figure1.svg

When we look at the process of interaction and rendering of a SVG application, we can find that data typically flows through pipelines from one end (Model) to the other (View) and vice versa. There are many ways of decomposing the pipelines and currently we adopt three-stage pipeline architecture as shown in Fig. 1(b). We can assume that each stage of the pipeline is an object that can be used independently or combined with others to provide a Web Service. Each stage also provides a natural synchronization point for a collaboration system.

We analyze all possible events of the SVG browser and divide them into three types corresponding to the three stages of the pipeline in Fig. 1(b). The event types are Raw Events (low level events including mouse and keyboard events), High Level UI Events (DOM/SVG events) and Semantic Events (application events such as shared SVG browser “Open file” events). Raw events are generated in the View and are converted into messages for the Model. One can design different View modules (with trade-offs in complexity and performance) through choice of which High Level UI events and semantic events to process in the Model and which in the View component.

2.2 Collaborative SVG as a Web Service Model

We take the approach that every resource (a data file, a video/audio stream, or even a piece of software like a SVG browser) is an object. A Web Service defines a message based interface for sharing of those distributed objects. In our case here, we share SVG synchronously and make it has a Web Service interacting with clients and other applications or Web Services. We define RFIO (Facing Input and Output ) ports and UFIO (User Facing Input and Output ) ports to distinguish distributed and local service interfaces that surround the Web Service.

The three-stage pipeline model with event-driven message passing mechanism presents a powerful architecture for collaborative SVG applications as Web Services with flexibility and scalability.

We use three collaborative SVG applications to illustrate how we build systems based on different ways of decomposing SVG in the model (Fig. 2). These are not the only possibilities and in particular one could package SVG as three separate modules as shown in Fig. 1(b); we only discuss cases here with one or two independent modules. For a shared SVG browser application, we assume a master and participating client scenario. At any time in a collaborative session, there’s only one client assigned the “master role” (such as a teacher or player to move in a game of chess) and the others are participating clients (such as students or observers and the player who has just moved in chess).

In the case of Fig. 2(a), we aim at making original client side application collaborative with minimal changes to the source code structure. Master events are generated and replicated to participating clients through the NaradaBrokering Message Service. In the case of Fig. 2(b), the heavyweight part of the computation is packaged as a Web Service that runs on a server thus make the client very thin. This design is optimized for ubiquitous access for SVG document over variety of hand held devices like PDA and cellular phone with bitmaps generated at server side and shared among clients [LKF 2003] [LKFKO 2003] . In the case of Fig. 2(c), we have a high performance lightweight version particularly designed for interactivity with the compelling time demands of an Internet game.

figure2.svg

Note that we can support collaboration in two extremes ─ firstly the shared input port model where one replicates Web services and delivers events generated on a master View client to all instances of the Model. These service their associated View component. This has maximal flexibility for customization of each collaborative client. In the shared output port of collaboration service, a single Model instance uses NaradaBrokering to multicast rendering information to all collaborating View modules.

3. Collaborative SVG Applications

3.1 Architecture of shared SVG browser with no SVG decomposition

This example shows the way to make a client side SVG browser collaborative in a synchronous fashion and how to integrate it into the collaborative environment (Fig. 3). We assume that all clients have the same version of the SVG application so the interpretation and process of semantic events generate consistent results. We can of course use the messaging framework to either check this for running clients or to instantiate the correct version from an SVG “factory” service as for example defined in the OGSI (Open Grid Service Infrastructure) standard [GRID SERVICES] . However we did not implement this yet. At any time, only one client is assigned a master role. The XGSP session control server establishes a collaborative session allowing clients to join and responds to requests (such as changing role from participating client to master or vice versa) from the clients. The NaradaBrokering system provides the publish/subscribe mechanism for the clients to be integrated together under the same topic session. It provides the infrastructure for all messages ─ master events are captured and sent to NaradaBrokering and multicast to other participating clients; control messages (request and response) are delivered between clients and XGSP. In our architecture all messages (low bandwidth control, high bandwidth TCP/IP data exchange and high bandwidth UDP audio-video conferencing) are handled by NaradaBrokering. This allows a uniform approach to transport optimization (such as firewalls), session management (through topics) and fault-tolerance (through agents monitoring publish-subscribe session). We have shown this approach has excellent performance [UPF 2003] [PALLICKARA 2003] .

figure3.svg

3.2 Architecture of multiplayer Internet Game with SVG

The JavaScript binding with SVG provides powerful capabilities such as interactivity, linking, scripting and animation. We present a chess game as an example of multiplayer Internet game with SVG architecture (Fig. 4). We use this as a test case to evaluate the key features of our synchronous collaborative SVG system. This application has the following components:

figure4.svg

4. Structure of Collaborative W3C DOM/SVG Events

We define a collaborative event as an object that wraps original SVG events with additional context information needed by the collaboration and Web service model. The context information helps guide the events through the NaradaBrokering system to reach other clients (subscribers in the same session). The receiving clients un-wrap the collaborative event and get an SVG event that defines detailed actions on the SVG DOM. The Model part of Web service application analyses the SVG event based on its type and then delivers the resultant rendering information to the associated View(s). We will describe several types of events and give their structure. We distinguish change events and those that define the full application state; both are fully supported.

4.1 Event Categories

As already discussed, we classify SVG events into three categories – Raw UI events, High Level events and Semantic events. Raw events are low level events that are directly generated by user input ─ for example, mouse and keyboard events; High Level events are generated by SVG from Raw events and W3C SVG/DOM events are of this category. Semantic events represent functionality of the SVG application or service. “Zoom” in an SVG browser and “I Resign” in chess are examples of such semantic events.

4.2 Master events vs. non-master events

In our collaborative session, all participating clients subscribe to a session (shared application) topic through NaradaBrokering system. Note NaradaBrokering supports traditional (in publish/subscribe systems) hierarchial topic labels and this is used to conveniently label related event streams. Among the clients in a given shared application, only one client holds the “master” token and generates master events that trigger collaborative behavior in the collaboration group. We term events that come from other participating clients as non-master events. The master token can be changed dynamically. Non-master clients can – as in all such collaborative architectures – choose whether or not to follow precisely the master’s state.

4.3 Major events vs. minor events

To build a robust system, we have to take into consideration that the following scenarios will occur in the real world: clients will join and leave a collaborative session asynchronously; a client system will crash and reboot; the replay service (recording of the collaborative session so far) is requested, and so forth. For the purpose of synchronization and replay functions, we design a mechanism that marks the possible synchronization point with major events. Major events are selected semantic events (such as load a SVG file and open a new window), which fully specify the application state. Chess game major events correspond to the completion of each move. Minor events are events like “mouse move” specifying “small” system changes. Note NaradaBrokering can save all published events (simply by subscribing a persistent store to the session) and so replay can always be supported.

Collaboration involves sharing state between collaborating applications and we define state in terms of a stream of time-stamped change (minor) events applied to a given initial state, which is a major event. We commit this sequence of changes “every now and then” to form new major events that fully specify the application but keep both the major events and the minor events that led up to them. A change (minor) event based application specification is most powerful as one can dynamically choose which events to accept and which events to discard; further each collaborative client can inject their own events. A state (major) event is the most efficient way of specifying the instantaneous state of an application. By keeping both major and minor events we can trade off performance and flexibility. Note both the full state and change specifications are thought of as “just events”. We have shown [UPF 2003] [PALLICKARA 2003] that NaradaBrokering can efficiently both full state and change events; for example, the Anabas commercial web conferencing system can use NaradaBrokering to handle multi-megabyte shared display events with excellent performance [ANABAS] .

4.4 Collaboration as a Web Service (XGSP) Events

All information in our approach is carried by events transported by NaradaBrokering. The nature of the collaboration (e.g. who is in the session and what applications are shared?) is specified by XGSP and generated by the Collaboration Web Service. This service initiates collaborative applications such as SVG discussed here and for example generates the “master token”. Thus the SVG MVC Controller event handler must process both events specialized to the application and such overall control events.

4.5 Structure of Collaborative Events

A collaborative DOM/SVG event contains information such as the following:

The collaborative SVG event processing chart is show in Fig. 5. Note that we serialize SVG events using a natural XPATH syntax to specify DOM node position and its properties.

figure5.svg

5. Conclusions

We believe our prototype shows how a message-based MVC (three-stage pipeline) model can generate a powerful application paradigm suitable for SVG and other presentation style applications. As SVG is an application of DOM, we can generalize the approach for DOM based applications. Our approach suggests that one need not develop special “collaborative” applications. Rather any application developed as a Web service can be made collaborative using the tools and architectural principles discussed in this paper.

Bibliography

[FOX 2003]
Geoffrey Fox, Hasan Bulut, Kangseok Kim, Sung-Hoon Ko, Sangmi Lee, Sangyoon Oh, Shrideep Pallickara, Xiaohong Qiu, Ahmet Uyar, Minjun Wang, Wenjun Wu Collaborative Web Services and Peer-to-Peer Grids presented at 2003 Collaborative Technologies Symposium Orlando January 20 2003 http://grids.ucs.indiana.edu/ptliupages/publications/foxwmc03keynote.pdf
[BATIK]
Apache Batik project at http://xml.apache.org/batik
[QCF 2003]
Xiaohong Qiu, Bryan Carpenter and Geoffrey C. Fox Internet Collaboration using the W3C Document Object Model in Proceedings of the 2003 International Conference on Internet Computing, Las Vegas June 2003 http://grids.ucs.indiana.edu/ptliupages/publications/collaborative_dom_conference_2003_Int_IC_font10_without_title_page.pdf
[LFKWQ 2002]
Sangmi Lee, Geoffrey Fox, Sunghoon Ko, Minjun Wang, Xiaohong Qiu Ubiquitous Access for Collaborative Information System Using SVG in Proceedings of SVG Open / Carto.net Developers Conference, Zurich, Switzerland, July 15-17, 2002 http://www.svgopen.org/papers/2002/lee__garnet_collaborative_info_system/
[DOM2 CORE]
W3C Document Object Model (DOM) Level 2 Core Specification at http://www.w3.org/TR/DOM-Level-2-Core/
[DOM1 CORE]
W3C Document Object Model (DOM) Level 1 Specification at http://www.w3.org/TR/REC-DOM-Level-1/
[DOM2 EVENTS]
W3C Document Object Model (DOM) Level 2 Events Specification at http://www.w3.org/TR/DOM-Level-2-Events/
[WEB SERVICES]
W3C Web Services at http://www.w3.org/2002/ws/
[FOX 2002]
Geoffrey Fox, Wenjun Wu, Ahmet Uyar, Hasan Bulut A Web Services Framework for Collaboration and Audio/Videoconferencing proceedings of 2002 International Conference on Internet Computing IC'02: Las Vegas, USA, June 24-27, 2002. http://grids.ucs.indiana.edu/ptliupages/publications/intl-sub03.pdf
[NARADABROKERING]
Community Grids Lab NaradaBrokering system at http://www.naradabrokering.org
[JMS]
Sun Microsystems Java Message Service at http://www.hostj2ee.com/specs/jms1_0_2-spec.pdf
[OASIS]
OASIS Web Services for Remote Portals (WSRP) and Web Services for Interactive Applications (WSIA)http://www.oasis-open.org/committees/
[SVG]
W3C Scalable Vector Graphics (SVG) version 1.0 Specification at http://www.w3.org/TR/SVG/
[SMALLTALK 80]
A Goldberg, Smalltalk-80: The Interactive Programming Environment , Addison Wesley, 1984.
[LEE 1994]
G. Lee, Object oriented GUI application development, Prentice Hall, 1994. ISBN: 0-13-363086-2.
[MVC MS WINDOWS]
The MVC framework and Microsoft Windows at http://infolab.kub.nl/pub/theses/w3thesis/Prototype/mvc.html
[LKF 2003]
Sangmi Lee, Sunghoon Ko, Geoffrey Fox, Adapting Content for Mobile Devices in Heterogeneous Collaboration Environments , in Proceedings of the 2003 International Conference on Wireless Networks Las Vegas June 2003 http://grids.ucs.indiana.edu/ptliupages/publications/icws03.pdf
[LKFKO 2003]
Sangmi Lee, Sunghoon Ko, Geoffrey Fox, Kangseok Kim, Sangyoon Oh A Web Service Approach to Universal Accessibility in Collaboration Services in Proceedings of 1st International Conference on Web Services Las Vegas June 2003 http://grids.ucs.indiana.edu/ptliupages/publications/icws03.pdf
[GRID SERVICES]
Open Grid Services Infrastructure Working Group at http://www.gridforum.org/ogsi-wg/
[UPF 2003]
Ahmet Uyar, Shrideep Pallickara and Geoffrey Fox Audio Video Conferencing in Distributed Brokering Systems in Proceedings of the 2003 International Conference on Communications in Computing, Las Vegas June 2003 http://grids.ucs.indiana.edu/ptliupages/publications/NB-AudioVideo.pdf
[PALLICKARA 2003]
Shrideep Pallickara and Geoffrey Fox NaradaBrokering: A Distributed Middleware Framework and Architecture for Enabling Durable Peer-to-Peer Grids in Proceedings of ACM/IFIP/USENIX International Middleware Conference Middleware-2003, Rio Janeiro, Brazil June 2003 http://grids.ucs.indiana.edu/ptliupages/publications/NB-Framework.pdf
[ANABAS]
Anabas Conferencing system at http://www.anabas.com

XHTML rendition created by gcapaper Web Publisher v2.0, © 2001-3 Schema Software Inc.