1 / 58

Applications as Web (Grid) Services and Related Issues

Argonne 10 November 2003. 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. Reporting work of.

wind
Télécharger la présentation

Applications as Web (Grid) Services and Related Issues

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Argonne 10 November 2003 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

  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. 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. 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. 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. 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. Classic MVC Paradigm

  8. Raw (UI) Events User Interface Web Service Model for Application Development Resource Facing Ports Data Logic of Application Semantic Events Model Messaging System User FacingPorts Events as Messages Rendering as Messages Control View Interrupts in traditional monolithic applications become“real messages” not directly method calls Natural for collaboration and universal access

  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. Logic of Application Other Semantic Events Events as Messages Rendering as Messages Some Semantic Events Raw (UI) Events User Interface (framebuffer) Web Service Model for Application Development Resource Facing Ports Data Another versionof Model Messaging System User FacingPorts Control Another View

  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. 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. WSDL R U Application orContent source F F I I O O Web Service Role of Portal and User Facing Ports Other WSUser FacingPorts PortalAggregateWS-User Facing Fragments Other WSUser FacingPorts Render PossibleFilter

  14. SelectionView WSDL R U Customized View Application orContent source F F Filter I I O Control Channel O Selector Web Service Jetspeed Portal Customized View UserProfile Control Channel Render CustomizedUser-FacingPorts (NaradaBrokering)Event Service Universal Access With JetspeedWeb Services,MVC Model for applications Asynchronous Messaging

  15. R R R U U U WSViewer WSDisplay F F F F F F I I I I I I WebService WebService WebService O O O O O O WS Viewer WS Display WS Viewer WSDisplay Shared Input Port (Replicated WS) Collaboration Collaboration as a WSSet up Session with XGSP Master Event(Message)Service OtherParticipants

  16. Shared Output Port Collaboration WSDL R U Application orContent source F F WSViewer WSDisplay I I O O Web Service Collaboration as a WSSet up Session with XGSP Web Service Message Interceptor Master WS Viewer WS Display Text Chat Whiteboard Multiple masters Event(Message)Service OtherParticipants WS Viewer WSDisplay

  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 Games • http://grids.ucs.indiana.edu/ptliupages/projects/carousel/ for PDA

  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. 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. The Node Interface in CORBA IDL Constants Properties Methods

  21. Collaborative SVG As A Web Service NaradaBrokering

  22. Collaborative SVG Chess Game in Batik Browser Players Observers

  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 pipelinesAWT/Swing  GVT  DOM  JavaScript  new DOM for user inputnewDOM  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. 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. NaradaBrokering SVGBrowser SVGBrowser SVGBrowser SVGBrowser SVG Model (DOM) SVGViewer SVGViewer SVGViewer SVGViewer NaradaBrokering SIMD Collaboration Non Web Service Implementation Identical Programs receiving identical eventsToken determines if browser is moving, waiting for opponent or an observer Shared Output portSIMD CollaborativeWeb Service

  26. NaradaBrokering SVG Model SVG Model SVG Model SVG Model SVGViewer SVGViewer SVGViewer SVGViewer MIMD Collaboration Shared Input portMIMD CollaborativeWeb Service NaradaBrokering

  27. NaradaBrokering Message Service Event Messages Event Messages User 1 1 User 2 User n Master Client IUnknown Outgoing interface Connectable Object Sink Connection Point PowerPoint as a Sort of Web Service As in Access Grid CollaborativeClient PPT as a Web Service Holds meta-data(sample of high level semanticevents) like slide number and title

  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. Integration of PDA, Cell phone and Desktop Grid Access

  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. Real-time Community Collaboration PowerPoint via “Shared Pixels”

  32. Real-time Community Collaboration Scalable Vector Graphics (SVG) via “Shared Web Service”

  33. Publishing Event from PDA to Server Subscribing to Event from PDA Performance of PDA Client Latency over successive iterations • 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)

  34. Agent1 P1 Map P to P1 Client1 M Profiles P NB Client2 P2 Map P to P2 Agent2 Application Web Servicesand 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 Web Service

  35. Collaboration Personal Server and EventFlow Web Service B Topic set B (does not need content adaption) SVG Web Service A Topic set A (needs content adapting) Subscribe/Publish to Topic set B Subscribe/Publish to Topic set A NB RTP Collaboration Personal Server Topic set C Subscribe /Publish to Topic set A,C NB HTTP JMS HTTP/HHMP Interface (for current 3G phone service) HHMP ( Subscribe to Topic set A instead of mobile devices and adapt the content to give Topic Set C) Subscribe/Publish to Topic set A,B Subscribe/Publish to Topic set B,C

  36. I B M computation unit Generating user presentation real time DAT M&L DTX PCL MCL multimedia User event transmit Database Universal user devices 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

  37. User Event Transmission DAT M&L DTX PCL MCL <?xml vers <!DOCTYPE <!--local DT <svg width= <desc>This Rendered Image SVG document DOM tree of SVG browser with CSS for PDAs Actual Display with the original SVG for PDAs (resolution of on PDA size of 1200 x 2000 document 160 x 160) Generating Presentation View 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

  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. NaradaBrokering BrokersONLY process messages

  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. 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. Grid Messaging Substrate SOAP+HTTPGridFTPRTP …. Standard client-server style communication. Consumer Service Service Consumer SOAP+HTTPGridFTPRTP …. Substrate mediated communication removes transport protocol dependence. Messaging Substrate Any Protocols satisfying QoS Messaging Substrate has “intelligence” “any desired fault tolerance” “logging” etc.Hope to demonstrate with multicast fault tolerant GridFTP

  43. Laudable Features of NaradaBrokering • Is open sourcehttp://www.naradabrokering.org available now; major new release for SC03 • 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. 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. 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 NB Brokers FastLink FirewallHTTP B1 SatelliteUDP A Hand-HeldProtocol B2 Software Multicast Dial-upFilter NB Broker B3 Client Filtering

  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. Mean transit delay for message samples in NaradaBrokering: Different communication hops 9 hop-2 hop-3 8 hop-5 7 hop-7 6 5 Transit Delay (Milliseconds) 4 3 2 1 0 100 1000 Message Payload Size (Bytes) Pentium-3, 1GHz, 256 MB RAM 100 Mbps LAN JRE 1.3 Linux

More Related