Download presentation
Presentation is loading. Please wait.
Published byBrett Heath Modified over 9 years ago
1
1 Applications as Web (Grid) Services and Related Issues PTLIU Laboratory for Community Grids Geoffrey Fox Computer Science, Informatics, Physics Indiana University, Bloomington IN 47404 http://grids.ucs.indiana.edu/ptliupages gcf@indiana.edu Argonne 10 November 2003
2
2 Reporting work of Minjun Wang PowerPoint/OpenOffice as a WS Xiaohong Qiu SVG as a WS Bryan Carpenter SVG Javascript games Sangmi Lee, Sunghoon Ko PDA and WS Shrideep Pallickara NaradaBrokering messaging Gurhan Gunduz Messaging performance module Wenjun Wu and Ahmet Uyar Global-MMCS A/V And other students not graduating in next 3 to 9 months
3
3 Client Applications and O/S I Consider applications like Word, Illustrator, Internet Explorer These haven’t dramatically changed over the last 3 or perhaps more years Some complain that such products are in fact getting worse as they increase in size and complexity and correspondingly decrease in usability Microsoft has an obvious dominance in both O/S and associated applications Sun is trying to compete directly with StarOffice/OpenOffice which are competitive with but not clearly better than Microsoft products To be compatible with Microsoft Office requires reproducing its bugs? Mozilla is very competitive with Internet Explorer but not clearly better
4
4 Client Applications and O/S II Asia – led by China – is aiming at escaping Windows noose by developing their own (Linux) client For cost and desire to develop their software industry Palm O/S and Java are doing rather well in PDA/Cell- phone industry Doesn’t seem one wants to run same applications on PDA’s and desktops At least don’t want same user interface? Macintosh is doing quite well broadly as a client with a UNIX based client Linux (Unix?) has rather specialized CLIENT user base
5
5 Lessons from Web Services Web services are an attractive way of building service side (Middle-tier) applications with a component model Expressed by using WSDL and meta-data All remarks here valid for Grid and Web services! WSRP, JSR168, Portlets, Jetspeed have taught us to distinguish user-facing and service (resource) ports on Web services and build a corresponding component model for user interfaces Jetspeed is primitive and standards WSRP, JSR168, portlets are incomplete But this will surely rapidly improve as relatively obvious what to do So Web service based applications are significantly different from classic desktop products like Word Light weight client which is relatively easily ported between client O/S Very easy to make collaborative using shared input port (MIMD) or shared output port (SIMD) Perhaps hopelessly slow due to service-client interaction (the rule of the millisecond?)
6
6 Applications as Web Services? Build “all” classic applications in Web service style with user interface and “real application” interacting by (WSDL/SOAP) messages and NOT by O/S controlled interrupts This is “just” MVC (Model View Control) paradigm done very explicitly Quite hard because MVC not actually used very systematically Perhaps the advantages of this architecture could be enough to shake the Microsoft hegemony in both O/S and “productivity” applications Current challenges of Microsoft applications are trying to do as well and not easy to see how they can do better Immediately make a lot easier to support cross O/S applications Form the “Next Generation Client Consortium”? There is quite a lot of open source (but not web service based) software with which to begin
7
7 Classic MVC Paradigm
8
8 Web Service Model for Application Development User Interface Raw (UI) Events Logic of Application Semantic Events Data User Facing Ports Resource Facing Ports Events as Messages Rendering as Messages View Control Model Messaging System Interrupts in traditional monolithic applications become “real messages” not directly method calls Natural for collaboration and universal access
9
9 Next Generation Client? Access Grid (GlobalMMCS), JXTA, Mozilla (or Firebird for browser and Thunderbird for mail), Batik SVG, OpenOffice, Better Jetspeed ….. Support Linux, Windows, Palm, Java cellphone Use W3C DOM and “better portlets” What are the principles Split at “user interface” events (mouse clicks) or at “semantic” events (slide change) What part of rendering on client (AWT, Java2D or …) could be different for different clients with server-side adaptors mapping What general support (tools) do we need? Event to message mapping and serialization When is there a performance problem? How “far” can server be from client?
10
10 Web Service Model for Application Development Data User Facing Ports Resource Facing Ports Events as Messages Rendering as Messages Another View Control Another version of Model Messaging System User Interface (framebuffer) Raw (UI) Events Some Semantic Events Logic of Application Other Semantic Events
11
11 What have we done in this Area? Most of this is work in progress …. PowerPoint only partially as a Web Service SVG as a Web Service and Collaborative SVG Example of W3C Document Object Model (DOM) PDA Interfaces and Collaboration using this architecture Universal Access Publish-subscribe Messaging to link clients and Web services Global-MMCS: Collaboration as a Web Service Looking at OpenOffice but not perfect Not Java and not W3C DOM compliant
12
12 Handling Events (Control in MVC) Typically events (Mouse click or change node in DOM) are handled by setting listeners for produced events This is publish/subscribe intra-application Collaboration whether audio-video, text-chat or shared display can be handled by collaborators subscribing to change events published by master Publish/subscribe inter-clients Java takes about 0.75 millisecond to handle this on a Linux server Can handle with uniform publish/subscribe environment http://www.naradabrokering.org
13
13 Role of Portal and User Facing Ports Application or Content source WSDL Web Service F I U O F I R O Portal Aggregate WS-User Facing Fragments Render Other WS User Facing Ports Possible Filter Other WS User Facing Ports
14
14 User Profile Application or Content source WSDL Web Service F I U O F I R O Render Jetspeed Portal Selector Filter Control Channel Customized View Selection View Control Channel Customized View Customized User-Facing Ports Universal Access With Jetspeed Web Services, MVC Model for applications Asynchronous Messaging (NaradaBrokering) Event Service
15
15 WS Display WS Viewer WS Display WS Viewer Event (Message) Service Master WS Display WS Viewer Collaboration as a WS Set up Session with XGSP Web Servic e F I U O F I R O Shared Input Port (Replicated WS) Collaboration Other Participants Web Servic e F I U O F I R O F I U O F I R O
16
16 WS Display WS Viewer WS Display WS Viewer Event (Message) Service Master WS Display WS Viewer Web Service Message Interceptor Collaboration as a WS Set up Session with XGSP Application or Content source WSDL Web Service F I U O F I R O Shared Output Port Collaboration Other Participants Text Chat Whiteboard Multiple masters
17
17 Collaborative SVG Web Service SVG is W3C 2D Vector Graphics standard and is interesting for visualization and as a simple PowerPoint like application Further SVG is built on W3C DOM and one can generalize results to all W3C DOM-based applications (“all” applications in future?) Apache Batik SVG is Java and open source and so it is practical to modify it to explore Real Applications as a Web Service Collaboration as a Web Service MVC model and web services with implications for portlets We use NaradaBrokering and Global-MMCS to control collaboration; support PDA Cell-phone and desktop clients; are restructuring Batik as MVC Web Service Good progress in all areas see http://www.svgarena.org for SVG Gameshttp://www.svgarena.org http://grids.ucs.indiana.edu/ptliupages/projects/carousel/ for PDAhttp://grids.ucs.indiana.edu/ptliupages/projects/carousel/
18
18 Document Object Model DOM (Document Object Model) defines how documents to be accessed as distributed objects – especially as a Web service DOM has a particular tree-like specification of the Object structure of a document It defines An application programming interface (API) for documents (e.g. HTML, XML documents) for Java, CORBA, Javascript …. Including how to change DOM The logical structure of documents The way a document is accessed and manipulated DOM has a generic event model defining uniform interface for mouse and keyboard actions Also defines events signifying change in DOM W3C DOM builds on earlier ad-hoc DOM’s of Internet Explorer and Netscape Surprisingly unsuccessful so far but critical for this project as allows general approach to user interfaces
19
19 Example of HTML DOM Here is an example of a fragment of HTML and how it can be thought of as a tree This is called a “document fragment” in DOM (lightweight tree)
20
20 The Node Interface in CORBA IDL Constants Properties Methods
21
21 Collaborative SVG As A Web Service NaradaBrokering
22
22 Collaborative SVG Chess Game in Batik Browser Players Observers
23
23 Lessons from SVG Web Service This keeps DOM and Javascript Event Handlers on the Server; keeps the Graphics version of DOM that interfaces with Java2D on client; client captures raw user interface events inside SVG frame; client captures some semantic events (zoom, change URL) in menu-bar We identified SIMD and MIMD model of collaboration Program is JavaScript implementing in our case chess or card game SIMD collaboration is shared output port in Web Services model MIMD collaboration becomes shared input port model Internally there are pipelines AWT/Swing GVT DOM JavaScript new DOM for user input new DOM GVT Java2D Framebuffer for rendering The Graphic Vector Toolkit (GVT) module represents a view of the DOM tree in terms of Java objects that is more suitable for rendering and event handling purposes. Can share at different points of pipeline based on software engineering issues – where is current software easiest to split
24
24 From the Battle Lines Why not easy to convert legacy applications to WS Although many modern applications adopt MVC (Model-View-Control) paradigm, they may not strictly follow the principles in implementation. Not faithfully following modularized design principle the applications does not have a clear "control" design which plays the role as the only communication channel between "model" and "view". there exits direct linkage (not through "control") between Model and View in the MVC paradigm. For example, some functional modules involve information from many stages across the pipeline rather than just provide the linkage between the two modules Are instantiated in GUI/"view" but execute functions in the backend "model" through direct methods calls Not providing "Object Serialization" Object Serialization (the process of reading and writing objects) has many uses, including remote method invocation (RMI) In addition to the object streams, java.io has other classes and interfaces that define the API to help classes perform serialization for its instances. lacking of serializable feature of the modularized components makes it hard to split the application into a Web service
25
25 SVG Browser Identical Programs receiving identical events Token determines if browser is moving, waiting for opponent or an observer SIMD Collaboration SVG Viewer SVG Model (DOM) NaradaBrokering Shared Output port SIMD Collaborative Web Service Non Web Service Implementation NaradaBrokering
26
26 MIMD Collaboration SVG Viewer NaradaBrokering Shared Input port MIMD Collaborative Web Service SVG Model NaradaBrokering
27
27 PowerPoint as a Sort of Web Service Master Client Connectable Object Sink NaradaBrokering Message Service User 1 User 2 User n PPT as a Web Service As in Access Grid Collaborative Client Holds meta-data (sample of high level semantic events) like slide number and title
28
28 Semantic Events in PPT Web Service One can capture slide and animation semantic events such as WindowSelectionChange WindowBeforeRightClick, WindowBeforeDoubleClick, PresentationClose, PresentationSave, PresentationOpen, NewPresentation, PresentationNewSlide, WindowActivate, WindowDeactivate, SlideShowBegin, SlideShowNextBuild, SlideShowNextSlide, SlideShowEnd, PresentationPrint, SlideSelectionChanged, ColorSchemeChanged, PresentationBeforeSave, SlideShowNextClick We don’t know how to capture Raw UI events such as MouseOver, MouseClicked, MouseDoubleClicked, KeyDown, KeyUp, KeyStroke, etc. Sound events such as SoundClipPlayed, SoundFilePlayed, etc. Some animation events such as AnimationClipPlayed, MoviesPlayed, AnimationFilePlayed
29
29 Integration of PDA, Cell phone and Desktop Grid Access
30
30 Real-time Community Collaboration Desktop PC, local wireless (802.11b) and the rest of the world (Sprint PCSVision as glimpse of next generation cell phones) Reconcile different protocols, different display areas, different O/S and different network bandwidths Text Chat
31
31 Real-time Community Collaboration PowerPoint via “Shared Pixels”
32
32 Real-time Community Collaboration Scalable Vector Graphics (SVG) via “Shared Web Service”
33
33 Performance of PDA Client Treo 300 Sprint PCS Vision Java MIDP on Palm O/S 50 Kbit/sec bandwidth both directions Developing optimized protocol (HHMP) to be built into NaradaBrokering for fault-tolerance and latency hiding (pre-start HTTP connection) Publishing Event from PDA to Server Subscribing to Event from PDA Latency over successive iterations
34
34 Application Web Services and Universal Access NaradaBrokering can link lightweight clients (V in MVC) to Web Services holding as a Web service the “guts of an application” (M in MVC) This allows customizable user interfaces gotten by mapping between client profile protocols at NB Supports collaboration between diverse clients Client1 Client2 M Agent1 Agent2 Profiles NB P1 P2 P Map P to P1 Map P to P2 Web Service
35
35 NB HHMP RTP SVG Web Service A Topic set A (needs content adapting) Collaboration Personal Server Topic set C Subscribe/Publish to Topic set B,C Web Service B Topic set B (does not need content adaption) Subscribe/Publish to Topic set A,B ( Subscribe to Topic set A instead of mobile devices and adapt the content to give Topic Set C) Subscribe /Publish to Topic set A,C Subscribe/Publish to Topic set A Subscribe/Publish to Topic set B Collaboration Personal Server and EventFlow NB JMS HTTP HTTP/HHMP Interface (for current 3G phone service)
36
Page. 36 Web Service to Client Pipeline DAT (Data) stage: Data source (facing remote resources) M&L (Model and Logic) stage: Semantic processing of the data DTX (Data Transformer) stage: Process of filtering the object for heterogeneous devices PCL (Presentation client) stage: Generating abstract presentation for each client MCL (Minimal client) stage: Actual drawing onto user device PDA would “ just ” have MCL Desktop might have PDA and MCL Such diagrams can be analysed formally using Petri nets Universal user devices real time multimedia IBM computation unit DATM&LDTXPCLMCL Database Generating user presentation User event transmit
37
Page. 37 Event Processing in Web Service to Client Pipeline Events allow Client and service to interact –Transformations in each module MUST be invertible Two directions of dataflow –Event transmission –Presentation Generation DATM&LDTXPCLMCL <?xml vers <!DOCTYPE <!--local DT <svg width= This User Event Transmission SVG document with the original size of 1200 x 2000 DOM tree of SVG document Rendered Image with CSS for PDAs (resolution of 160 x 160) SVG browser for PDAs Actual Display on PDA Generating Presentation View
38
38 Some Simple Principles One must use invertible transformations so that can propagate information to AND from the client Don’t ever send a position (x,y) for say a mouse click – rather send position and coordinate system specified by some transformation (as in affine transformations used in graphics) Or send semantic meaning of click – e.g. open URL Accumulate mouse-move events into arrays or cumulative events to avoid too many messages Choose “cutting point” between M and V to support interactivity and performance Jetspeed is just aggregating lots of different “Views” All messages MUST go through messaging system – it must support all needed protocols such as those needed to minimize latency for cellphones Messaging system has routing optimization/firewalls built in
39
39 NaradaBrokering Brokers ONLY process messages
40
40 “GridMPI” v. NaradaBrokering In parallel computing, MPI and PVM provided “all the features one needed’ for inter-node messaging NB aims to play same role for the Grid but the requirements and constraints are very different NB is not MPI ported to a Grid/Globus environment Typically MPI aiming at microsecond latency but for Grid, time scales are different 100 millisecond quite normal network latency 30 millisecond typical packet time sensitivity (this is one audio or video frame) but even here can buffer 10-100 frames on client (conferencing to streaming) <1 millisecond is time for a Java server to “think” Jitter in latency (transit time through broker) due to routing, processing (in NB) or packet loss recovery is important property Grids need and can use software supported message functions and trade-offs between hardware and software routing different from parallel computing
41
41 NaradaBrokering Based on a network of cooperating broker nodes Cluster based architecture allows system to scale in size Grid routing topologies are open research issue? Originally designed to provide uniform software multicast to support real-time collaboration linked to publish-subscribe for asynchronous systems. Perhaps better thought of as stream not message handler Now has several core functions Reliable order-preserving “Optimized” Message transport (based on performance measurement) in heterogeneous multi- link fashion with TCP, UDP, SSL, HTTP, and will add GridFTP General publish-subscribe including JMS & JXTA and support for RTP-based audio/video conferencing General software routing to avoid network problem Distributed XML event selection using XPATH metaphor QoS, Security profiles for sent and received messages Interface with reliable storage for persistent events
42
42 Grid Messaging Substrate ConsumerService SOAP+HTTP GridFTP RTP …. Messaging Substrate Consumer Service Standard client-server style communication. Substrate mediated communication removes transport protocol dependence. SOAP+HTTP GridFTP RTP …. Any Protocols satisfying QoS Messaging Substrate has “intelligence” “any desired fault tolerance” “logging” etc. Hope to demonstrate with multicast fault tolerant GridFTP
43
43 Laudable Features of NaradaBrokering Is open source http://www.naradabrokering.org available now; major new release for SC03http://www.naradabrokering.org Will have end-point “plug-in” as well as standalone brokers end-point is service or user-interface machine Will have a discovery service to find nearest brokers Does tunnel through most firewalls without requiring ports to be opened Links to NWS (Network Weather Service) style performance estimation systems Supports JXTA (peer-to-peer network), JMS (Java Message Service) and more powerful native mode Transit time < 1 millisecond per broker Will have setup and broker network administration module
44
44 NaradaBrokering Naturally Supports Filtering of events (streams) to support different end-point requirements (e.g,. PDA versus desktop, slow lines, different A/V codecs) Virtualization of addressing, routing, interfaces (OGSI versus pure Web services for example) Federation and Mediation of multiple instances of Grid services as illustrated by Composition of Gridlets into full Grids (Gridlets are single computers in P2P case) JXTA with peer-group forming a Gridlet Monitoring of messages for Service management and general autonomic functions Fault tolerant data transport Virtual Private Grid with fine-grain Security model
45
45 Virtualizing Communication Communication specified in terms of user goal and Quality of Service – not in choice of port number and protocol Protocols have become overloaded e.g. MUST use UDP for A/V latency requirements but CAN’t use UDP as firewall will not support ……… A given communication can involve multiple transport protocols and multiple destinations – the latter possibly determined dynamically Dial-up Filter Satellite UDP Firewall HTTP A B1B1 Hand-Held Protocol Fast Link Software Multicast B2B2 B3B3 NB Broker Client Filtering NB Brokers
46
46 Performance Monitoring Every broker incorporates a Monitoring service that monitors links originating from the node. Every link measures and exposes a set of metrics Average delays, jitters, loss rates, throughput. Individual links can disable measurements for individual or the entire set of metrics. Measurement intervals can also be varied Monitoring Service, returns measured metrics to Performance Aggregator.
47
47 Pentium-3, 1GHz, 256 MB RAM 100 Mbps LAN JRE 1.3 Linux hop-3 0 1 2 3 4 5 6 7 8 9 1001000 Transit Delay (Milliseconds) Message Payload Size (Bytes) Mean transit delay for message samples in NaradaBrokering: Different communication hops hop-2 hop-5 hop-7
48
48
49
49
50
50
51
51 Architecture of Message Layer Need to optimize not only routing of particular messages but classic publish/subscribe problem of integrating different requests with related topics (subscribe to sports/basketball/lakers and sports) Related to Akamai, AOL … caching and Server optimization problem 1-> N Grid Clients Hypercube of NB Brokers (logical not physical) N≈100 clients per leaf node for A/V conferencing Scale using NB broker network
52
52 Global-MMCS 2.0 XGSP based MCU We are building an open source protocol independent Web Service “MCU” which will scale to an arbitrary number of users and provide integrated thousands of simultaneous users collaboration services. We will deploy it globally and hope to test with later this year. The function of A/V media server will be distributed using NaradaBrokering architecture. Media Servers mix and convert A/V streams and are built as Web Services Open Global-MMCS MCU based on the following open source projects openh323 is basis of H323 Gateway NIST SIP stack is basis of SIP Gateway NaradaBrokering is open source messaging from Indiana Java Media Framework basis of Media Servers
53
53 XGSP Web Service MCU Architecture SIPH323 Access GridNative XGSP Admire Gateways convert to uniform XGSP Messaging High Performance (RTP) and XML/SOAP and.. Media Servers Filters Session Server XGSP-based Control NaradaBrokering All Messaging Use Multiple Media servers to scale to many codecs and many versions of audio/video mixing NB Scales as distributed Web Services NaradaBrokering
54
54 Polycom, Access Grid and RealVideo views of multiple streams using A/V Web Service integrating SIP and H323
55
55 Performance Test : GlobalMMCS1.0 We conducted extensive performance tests on audio and video servers. Video: The test shows that our video server is capable of supporting 100-300 clients if there is only one video sender. Video Server Machine : 1.2GHz Intel Pentium III dual CPU, 1GB MEM, RedHat Linux 7.3 Audio: Our tests show that audio server can support 5 concurrent sessions (250 participants in total) without any packet droppings. Audio Server Machine: 2.5GHz Pentium 4 CPU, 512MB memory, Windows XP machine Scale with logarithmic Broker network
56
56 0 10 20 30 40 50 60 0200400600800100012001400160018002000 Delay (Milliseconds) Packet Number Average delays per packet for 50 video-clients NaradaBrokering Avg=2.23 ms, JMF Avg=3.08 ms NaradaBrokering-RTP JMF-RTP
57
57 0 1 2 3 4 5 6 7 8 0200400600800100012001400160018002000 Jitter (Milliseconds) Packet Number Average jitter (std. dev) for 50 video clients. NaradaBrokering Avg=0.95 ms, JMF Avg=1.10 ms NaradaBrokering-RTP JMF-RTP
58
58
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.