Download presentation
Presentation is loading. Please wait.
Published byGervase Todd Modified over 9 years ago
1
1 Ph.D. student of EECS department, Syracuse University Research work is performed at Community Grids Lab, Indiana University xiqiu@syr.eduxiqiu@syr.edu, xqiu@indiana.edu xqiu@indiana.edu xiqiu@syr.eduxqiu@indiana.edu 501 Morton N. St, Suite 222, Bloomington IN 47404 Community Grids Lab, Indiana University by Xiaohong Qiu Building Desktop Applications with Web Services in a Message-based MVC Paradigm
2
2 Background CGL research – general area is technology support for Synchronous and Asynchronous Resource Sharing e-learning e-learning e-science e-scienceGrids manage and share (typically asynchronously) resources (people, computers, data, applications etc.) or distributed services in a centralized fashion. manage and share (typically asynchronously) resources (people, computers, data, applications etc.) or distributed services in a centralized fashion. Web Services Define loosely coupled software components across internet interacting with messages. Define loosely coupled software components across internet interacting with messages. Peer-to-peer Grids link services, resources and clients in dynamic decentralized fashion link services, resources and clients in dynamic decentralized fashion The system consists of a sea of message-based Services (e.g. shared SVG as a Web Service) Services linked by publish-subscribe messaging infrastructure (e.g. NaradaBrokering)
3
3 Current projects of CGL NSF Middleware Initiative (NMI) NSF Middleware Initiative (NMI) CGL, Extreme Lab of IU, University of Texas, University of Chicago, Argon National Lab, a suite of grid services including portlets interface for middleware environment CGL, Extreme Lab of IU, University of Texas, University of Chicago, Argon National Lab, a suite of grid services including portlets interface for middleware environment NaradaBrokering NaradaBrokering A open source messaging infrastructure/middleware for collaboration, peer-to-peer, and Grid applications A open source messaging infrastructure/middleware for collaboration, peer-to-peer, and Grid applications collaboration environments collaboration environments GlobalMMCS A open source multimedia collaboration system (multiple video conferencing technology that supports Java A/V, H323, real player clients; XGSP session control) GlobalMMCS A open source multimedia collaboration system (multiple video conferencing technology that supports Java A/V, H323, real player clients; XGSP session control) Collaborative SVG, PowerPoint, and OpenOffice etc. Collaborative SVG, PowerPoint, and OpenOffice etc.
4
4 Research on a generic model of building applications Applications: distributed, Web/Internet, desktop motivations CPU speed (Moore’s law) and network bandwidth (Gilder’s law) continue to improve bring fundamental changes CPU speed (Moore’s law) and network bandwidth (Gilder’s law) continue to improve bring fundamental changes Internet and Web technologies have evolved into a global information infrastructure for sharing of resources Internet and Web technologies have evolved into a global information infrastructure for sharing of resources Applications getting increasingly sophisticated, e.g. Applications getting increasingly sophisticated, e.g. Internet collaboration enabling virtual enterprises; large-scale distributed computing) Requires new application architecture that is adaptable to fast technology changes with properties Requires new application architecture that is adaptable to fast technology changes with propertiesscalabilityReusabilityInteroperabilityReliability High performance Low cost
5
5 Summarization of the situation The subsystem of Internet has evolved into stability TCP/IP network stack dominating the communication protocol domain; TCP/IP network stack dominating the communication protocol domain; IP forms the low-level sphere surrounding hardware network core IP forms the low-level sphere surrounding hardware network core Construction of distributed operating system over the Internet has not completed and keeps adding new functionalities to the general purpose platform One current effort focuses on building of messaging infrastructure tailored for disparate applications One current effort focuses on building of messaging infrastructure tailored for disparate applications Evolution of application architectures client-server model client-server model Multi-tier (e.g. three-tier) model Multi-tier (e.g. three-tier) model Peer-to-peer Peer-to-peer A variety of distributed model (e.g. Java RMI, CORBA, COM/DCOM, J2EE,.NET) A variety of distributed model (e.g. Java RMI, CORBA, COM/DCOM, J2EE,.NET) Grids Grids Web Services and SOA Web Services and SOA Web application deployment shows diverse directions but have common features User interfaces User interfaces Services for the sharing of information and resources (e.g. through unicast and multicast of group communication) Services for the sharing of information and resources (e.g. through unicast and multicast of group communication) In the most general sense, collaboration is the core problem and service of Web applications, although “collaboration” usually refers to system with real-time synchronous and compelling time constraints In the most general sense, collaboration is the core problem and service of Web applications, although “collaboration” usually refers to system with real-time synchronous and compelling time constraints Next generation of Web client should enable pervasive accessibility Ubiquitous availability to clients fro heterogeneous platforms (e.g. Windows, Linux, Unix, and PalmOS) Ubiquitous availability to clients fro heterogeneous platforms (e.g. Windows, Linux, Unix, and PalmOS) Uniform Web interface that provides a platform with aggregation of multiple services Uniform Web interface that provides a platform with aggregation of multiple services
6
6 Architecture of network system
7
7 Our approach Building applications centered on messages Separation of application architecture from messaging infrastructure Message-based MVC Paradigm for distributed, Web, and desktop applications MMVC and MVC MMVC and MVC MMVC and Web Services MMVC and Web Services MMVC and collaboration MMVC and collaboration MMVC and messaging infrastructure MMVC and messaging infrastructure
8
8 Related technologies Batik SVG browser (an open source project from Apache that supports SVG 1.0) A presentation style application is representative and complex in nature (we experiments with multiplayer-online game with high interactivity and compelling time constraints) A presentation style application is representative and complex in nature (we experiments with multiplayer-online game with high interactivity and compelling time constraints) Similar applications includes Microsoft PowerPoint, Adobe Illustrator, Macromedia Flash Similar applications includes Microsoft PowerPoint, Adobe Illustrator, Macromedia Flash SVG (W3C specifications for Scalable Vector Graphics) A language for describing 2D vector and mixed vector/raster graphics in XML. A language for describing 2D vector and mixed vector/raster graphics in XML. DOM (W3C specifications for Document Object Model) Programmatic interfaces for access and manipulate structured document object Programmatic interfaces for access and manipulate structured document object All modern browsers (approximately) support the W3C DOM All modern browsers (approximately) support the W3C DOM
9
9 Methodology Proposing an “ explicit Message-based MVC ” paradigm (MMVC) as the general architecture of Web applications Demonstrating an approach of building “collaboration as a Web service” through monolithic SVG experiments. As an example, we present architecture for three types of collaboration ─ monolithic, thin client, and interactive client. As an example, we present architecture for three types of collaboration ─ monolithic, thin client, and interactive client. Bridging the gap between desktop and Web application by leveraging the existing desktop application with a Web service interface through “ MMVC in a publish/subscribe scheme ”. As an experiment, we convert a desktop application into a distributed system by modifying the architecture from method-based MVC into message-based MVC. As an experiment, we convert a desktop application into a distributed system by modifying the architecture from method-based MVC into message-based MVC. Proposing Multiple Model Multiple View and Single Model Multiple View collaboration as the general architecture of “ collaboration as a Web service ” model. Identifying some of the key factors that influence the performance of message-based Web applications especially those with rich Web content and high client interactivity and complex rendering issues.
10
10 What is message-based MVC? Message-based Model-View-Controller (MMVC) is a general approach of building applications with a message-based paradigm emphasizes a universal modularized service model with messaging linkage emphasizes a universal modularized service model with messaging linkage Converges desktop application, Web application, and Internet collaboration Converges desktop application, Web application, and Internet collaboration MVC and Web Services are fundamental architecture from desktop to Web applications, MMVC has general importance as a uniform architecture MVC and Web Services are fundamental architecture from desktop to Web applications, MMVC has general importance as a uniform architecture MMVC allows automatic collaboration, which simplifies the architecture design MMVC allows automatic collaboration, which simplifies the architecture design
11
11 MVC paradigm
12
12 Message-based MVC model
13
13 SMMV vs. MMMV as MVC interactive patterns
14
14 Model View Controller a. MVC Model Controller View Display Model Messages contain control information Decomposition of SVG Browser b. Three-stage pipeline High Level UI Raw UI Display Rendering as messages Events as messages Semantic Events as messages Rendering as messages Figure 1 Reformulation of SVG to message based MVC in a Web Service Model Input port Output port A comparison of MVC and MMVC model in a case of SVG application
15
15 Monolithic SVG Experiments Collaborative SVG Browser Teacher-Students scenario Teacher-Students scenario Static Shared SVG contents Static Shared SVG contents Dynamic Share SVG contents Dynamic Share SVG contentsHyperlink Interactivity and animation (JavaScript binding) Collaborative SVG Chess game Two players-multiple observers scenario Two players-multiple observers scenario Complex interactivity with game intelligence Complex interactivity with game intelligence
16
16 Collaborative SVG Chess Game Players Observers
17
17 Figure 3 Architecture of collaborative SVG browser on PC XGSP Session control Server NaradaBrokering Event (Message) Service Infrastructure Master client SVG browser 1 F I R O Other client SVG browser 2 F I R O Other client SVG browser n F I R O Control to/from all SVG browsers in the collaborative session Data from master client Control to/from XGSP Data to other clients Control to/from XGSP Data from master client Control to/from XGSP Architecture of collaborative SVG browser on PC
18
18 Figure 4 Architecture of collaborative Web Services drawn for particular case of Internet multiplayer game with SVG NaradaBrokering Event (Message) Service Infrastructure XGSP Session control Server SVG WS 1 Internet Game SVG WS 2 SVG WS n SVG display 1 SVG display 2 SVG display n Control to/from SVG WS1,2, …, n Control to/from XGSP, SVG display 2 Rendering to SVG display 2 Control to/from SVG WS1,2, …, n Rendering from SVG WS 2 Control to/from SVG display 2 Architecture of multiplayer game with SVG
19
19 Figure 5 Collaborative SVG Event processing chart Raw UI events (e.g. Mouse and key events) High Level UI events (e.g. SVG/DOM events) Semantic events (e.g. Application events such as “capture” in chess game) Collaborative events (e.g. Master Events which has context information of collaboration and information from previous stages) Collaborative SVG Event processing chart
20
20 Method-based MVC vs. message-based MVC B Subscribe to event class A Broker Set up an event class (topic) publish an event class Send event message based A B register call back method invoke call back method with event method based
21
21 Decomposition of SVG browser into stages of pipeline
22
22 Important principals One should split at points where the original method based linkage involved serializable Java objects. Serialization is needed before the method arguments can be transported and this is familiar from Java RMI. Serialization is needed before the method arguments can be transported and this is familiar from Java RMI. “Spaghetti” classes implied that additional state information would need to be transmitted if we split at points where classes spanned interfaces from different modules. Batik often involved large classes that implemented many different interfaces. These interfaces often came from different parts of the program and crossed the possible stages mentioned above. Batik often involved large classes that implemented many different interfaces. These interfaces often came from different parts of the program and crossed the possible stages mentioned above. message-based paradigm tends to force a more restrictive programming model where all data is shared explicitly and not implicitly via interfaces crossing splitting lines.
23
23 Implicit State subscribe AB Broker publish send event Separated component/service model subscribe A View B Broker publish send event Conventional shared state model Shared state A
24
24 The changes bring up issues that cause a challenge to the system Timing becomes a compelling issue with the separation of client and Web Service server, original assumption and design principle break since time scope drastically increases from tens of microsecond level (e.g. a Java method call) to a few milliseconds level (network latency plus system overhead). with the separation of client and Web Service server, original assumption and design principle break since time scope drastically increases from tens of microsecond level (e.g. a Java method call) to a few milliseconds level (network latency plus system overhead). Object serialization is a must have toolkit messages, as a linkage vehicle, contains component information from both sides and keep context same. Synchronization is a factor to consider for context consistency. messages, as a linkage vehicle, contains component information from both sides and keep context same. Synchronization is a factor to consider for context consistency.
25
25 Performance Testing T1: A given user event such as a mouse click can generate multiple associated DOM change events transmitted from the Model to the View. T1 is the arrival time at the View of the first of these. T2: This is the arrival of the last of these events from the Model and the start of the processing of the set of events in the GVT tree T3: This is the start of the rendering stage T4: This is the end of the rendering stage
26
26 Performance Results Table 1 Timing of Stages in milliseconds First arrival from Model: T 1 -T 0 Start Process DOM T 2 -T 0 Start Rendering T 3 -T 0 End Rendering T 4 -T 0 mean ± error stddevmean ± error stddevmean ± error stddevmean ± error stddev Test 1 Solaris server 110 ± 5.0 95.0180 ± 10.0 184.0243 ± 11.0 204.0478 ± 13.0 238.0 Test 2 direct connect. Desktop server 108 ± 5.0 132.0180 ± 7.0 170.0234 ± 8.0 194.0485 ± 12.0 272.0 Test 3 wireless connect. Desktop server 113 ± 3.0 54.0212 ± 5.0 77.0225 ± 5.0 78.0510 ± 5.0 78.0 Test 4 IBM Linux cluster node 76 ± 2.0 76.0120± 2.0 136.0190 ± 3.0 174.0476 ± 3.0 194.0 Test 5 Solaris server 1490 ± 48.0 519.02213 ± 57.0 614.02275 ± 56.0 597.02556 ± 56.0 596.0
27
27 Shared SVG Browser on PDA b. Decomposed WS optimized for thin clients Rendering as messages Events as messages Messages contain control information Semantic High Level UI R F I O U F I O Web Service Event (Message) Service Raw UI Display Shared SVG Browser on PC a. Non-decomposed collaborative SVG requiring minimal changes to the original source code Messages contain control information Event (Message) Service R F I O SVG Browser Semantic High Level UI Raw UI Display Collaborative Events and Web Service messages Internet Game c. Decomposed WS optimized for performance Messages contain control information Semantic R F I O U F I O Web Service Event (Message) Service High Level UI Raw UI Display Figure 2 Three among the different ways of decomposing SVG between client and Web Service component Input port Output port Rendering as messages Events as messages Input port Output port Collaborative Events and Web Service messages Three among the different ways of decomposing SVG between client and Web Service component
28
28 Summary of message-based MVC Provision of a universal paradigm with a service model converging desktop applications, Web applications, and Internet collaboration Web applications built on messages can achieve important features such as scalability The message-based approach is an indispensable part of the big picture of system design with a separate intermediate messaging layer Reduce deployment overhead of applications Reduce deployment overhead of applications Increase portability of application by decoupling application architecture with underlying platforms Increase portability of application by decoupling application architecture with underlying platforms It conforms to service oriented architecture with loosely coupled messages linkage, which we expect to have an increasingly important role for reusability, interoperability, and scalability
29
29 Observations The overhead of the Web service decomposition is not directly measured in this table although the changes in T1-T0 in each row reflect the different network transit times as we move the server from local to organization locations. This client to server and back transit time is only 20% of the total processing time in the local examples. We separately measured the overhead in NaradaBrokering itself which consisting of forming message objects, serialization and network transit time with four hops (client to broker, broker to server, server to broker, broker to client). This overhead is 5-15 milliseconds depending on the operating mode of the Broker in simple stand-alone measurements. The contribution of NaradaBrokering to T1-T0 is larger than this (about 30 milliseconds in preliminary measurements) due to the extra thread scheduling inside the operating system and interfacing with complex SVG application. We expect the main impact to be the algorithmic effect of breaking the code into two, the network and broker overhead, thread scheduling from OS.
30
30 NaradaBrokering One can bind SOAP to NaradaBrokering and allow use of any of NaradaBrokering transport NaradaBrokering is placed in SOAP handler and controls transport, security and reliable messaging using WS- Security and WS-Reliable Messaging For a stream, one first uses port 80 and conventional SOAP over HTTP and then negotiates the transport and encoding to be used in messages of the stream
31
31 Future Work Performance analysis Performance optimization Apply the concept to other applications (e.g. OpenOffice)
32
32 References Community Grids Lab University Web site http://www.communitygrids.iu.edu/ University Web site http://www.communitygrids.iu.edu/ http://www.communitygrids.iu.edu/ CGL Web site http://www.infomall.org CGL Web site http://www.infomall.orghttp://www.infomall.org Additional Projects http://grids.ucs.indiana.edu/ptliupages/ http://grids.ucs.indiana.edu/ptliupages/ Publications http://grids.ucs.indiana.edu/ptliupages/publications/ http://grids.ucs.indiana.edu/ptliupages/publications/ CGL activities summary (2003-2004) http://grids.ucs.indiana.edu/ptliupages/publications/CGLHandout.pdf http://grids.ucs.indiana.edu/ptliupages/publications/CGLHandout.pdf Current major projects of CGL NSF Middleware Initiative (NMI) at www.OGCE.org www.OGCE.org NaradaBrokering at www.NaradaBrokering.org www.NaradaBrokering.org Collaboration environments GloblaMMCS at http://www.globalmmcs.org/ GloblaMMCS at http://www.globalmmcs.org/http://www.globalmmcs.org/ Commercial product: Anabas at www.anabas.com Commercial product: Anabas at www.anabas.comwww.anabas.com Collaborative SVG at www.svgarena.org Collaborative SVG at www.svgarena.orgwww.svgarena.org
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.