Distributed Object Computing using XML-SOAP - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Distributed Object Computing using XML-SOAP

Description:

DCOM for Windows applications. CORBA for cross platform applications ... DCOM provides the ability to use and reuse components dynamically, without ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 33
Provided by: Ale7
Category:

less

Transcript and Presenter's Notes

Title: Distributed Object Computing using XML-SOAP


1
Distributed Object Computing using XML-SOAP
  • Kevin White
  • James Kebinger
  • Fall 2000

2
Introduction to XML
  • XML it s a text-based markup language that is
    becoming a standard to store data
  • XML tags tell you what the data means, rather
    than how to display it.
  • Elements are the holding blocks for data in an
    XML object.

3
XML Example
  • The following is a XML example of a pizza item
  • ltpizzagt
  • ltnamegtThe Texanlt/namegt
  • lttoppingsgt
  • lttoppinggtbarbeque brisketlt/toppinggt
  • lttoppinggtdill pickleslt/toppinggt
  • lttoppinggtonionslt/toppinggt
  • lttoppinggtmozzarella cheeselt/toppinggt
  • lttoppinggttomato saucelt/toppinggt
  • lt/toppingsgt
  • ltdescriptiongtPut the lone in lone star
    state!lt/descriptiongt
  • lt/pizzagt

4
What is XML?
  • XML objects can also consist of the following
    items
  • Elements holding blocks for data
  • Attributes Name-value pairs that occur inside
    start-tags after the element name.
  • Entity references Created to allow entity to be
    created and used in places where multiple
    instances of the same text will be use in many
    places.
  • Processing instructions used to provide
    information specific to applications.
  • Comments User comments
  • CDATA A section of character data that will not
    be interpreted by the XML parser.

5
Why is XML important?
  • Plain Text
  • XML is it stored as plain ASCII text
  • Allows for viewing and editing the XML data with
    any text editor
  • Data Identification
  • Tag names relate to the data it holds
  • Produces easily parable data with reference to
    tag names

6
Why is XML important?
  • Display styles
  • XML is only a way to store data. A separate file
    can be created to display this data
  • XSL
  • Hierarchical
  • XML documents benefit from their hierarchical
    structure
  • Like stepping through a table of contents

7
Present Distributed Object Models
  • Java RMI for Java applications
  • DCOM for Windows applications
  • CORBA for cross platform applications
  • Each have overhead and large scale
    interoperability issues
  • Answer SOAP Simple Object Access Protocol

8
Java RMI
  • Design goal for the RMI architecture was to
    create a Java distributed object model
  • RMI works in 3 layers
  • The first layer intercepts method calls made by
    the client and redirects these calls to a remote
    RMI service.
  • This second layer understands how to interpret
    and manage references made from clients to the
    remote service objects.
  • The final layer is the transport layer and is
    based on TCP/IP connections between machines in a
    network.
  • Java RMI works for Java applications only

9
DCOM
  • DCOM Distributed Component Object Model
  • Microsofts solution for distributed computing
  • Allows one client application to remotely start a
    DCOM server object on another machine and invoke
    its methods
  • DCOM provides the ability to use and reuse
    components dynamically, without recompiling, on
    any platform, from any language, at any time

10
CORBA
  • CORBA Common Object Request Broker Architecture
  • CORBA is platform and language independents
  • CORBA Object Request Broker (ORB) provides a way
    to connect a client application with an object
    that it needs
  • When creating CORBA applications, two main
    classes, a stub and a skeleton, are created along
    with several helper classes
  • The ORB is the glue that connects the stubs and
    skeletons.

11
The SOAP Protocol
  • SOAP stands for Simple Object Access Protocol
  • SOAP doesn't care what operating system,
    programming language, or object model is being
    used on either the server side or the client side
  • SOAP is a cross-platform way to make remote
    method calls, serialize and de-serialize objects
    using XML

12
The SOAP Protocol
  • For a protocol it commonly uses HTTP, which is
    simple to implement and used universally
  • SOAP works over many protocols, not limited to
    HTTP
  • Using HTTP for transport gives SOAP an advantage
    over other previous middleware solutions because
    it does not require changes be made to network
    routers and proxy servers
  • An inherent advantage of SOAP being able to use
    HTTP is that it is a universally deployed
    protocol

13
SOAP Process
  • SOAP request would be processed in the following
    steps
  • 1. Get a request on the listen port.
  • 2. Parse the request for the method id to call.
  • 3. Consult a configuration file for what
    class/function to call to handle the request.
  • 4. De-serialize the parameters for the method
    call.
  • 5. Call the function with the given de-serialized
    parameters
  • 6. Serialize the return value from the function
    and send it back to the requestor
  • SOAP is not rocket-science. SOAP is simple to
    understand, implement and deploy.

14
Basic SOAP Sample
  • Here is a SOAP request
  • POST /StockQuote HTTP/1.1Host
    www.stockquoteserver.comContent-Type text/xml
    charset"utf-8"Content-Length nnnnSOAPAction
    "Some-URI"ltSOAP-ENVEnvelope  xmlnsSOAP-ENV"h
    ttp//schemas.xmlsoap.org/soap/envelope/"  SOAP-E
    NVencodingStyle"http//schemas.xmlsoap.org/soap/
    encoding/"gt   ltSOAP-ENVBodygt       ltmGetLastTr
    adePrice xmlnsm"Some-URI"gt           ltsymbolgtDI
    Slt/symbolgt       lt/mGetLastTradePricegt   lt/SOAP
    -ENVBodygtlt/SOAP-ENVEnvelopegt

15
Basic SOAP Sample
  • And the matching response is
  • HTTP/1.1 200 OKContent-Type text/xml
    charset"utf-8"Content-Length
    nnnnltSOAP-ENVEnvelope  xmlnsSOAP-ENV"http//
    schemas.xmlsoap.org/soap/envelope/"  SOAP-ENVenc
    odingStyle"http//schemas.xmlsoap.org/soap/encodi
    ng/"/gt   ltSOAP-ENVBodygt       ltmGetLastTradePr
    iceResponse xmlnsm"Some-URI"gt           ltPricegt
    34.5lt/Pricegt       lt/mGetLastTradePriceResponsegt
       lt/SOAP-ENVBodygtlt/SOAP-ENVEnvelopegt

16
Apache SOAP
  • Used Apache SOAP v 2.0 for implementation.
  • Java library for both client and server
  • Application need not parse nor create XML
  • Server implemented as a servlet
  • Server application programmed without regard to
    SOAP
  • Client SOAP calls easy to construct using API

17
SOAP National Bank
  • Prototype client-server application
  • Supports basic banking tasks
  • Balance inquiries
  • Deposits/withdrawals
  • Transfers
  • View transaction history

18
Use Cases
19
Class Diagram
20
System Architecture
21
System Implementation
  • Client and Server written in Java v 1.22
  • Client GUI uses Java Swing API
  • Server uses JDBC to connect to MS Access DB
  • Client and Server communicate using Apaches Java
    SOAP library

22
Screenshot
23
Bank System Conclusions
  • System successful, all functions work
  • Implementation fairly painless once we learned
    SOAP API
  • Only major snag was learning how to configure the
    SOAP servlet
  • Application rather slow what causes slowness?
  • MS Access calls
  • SOAP itself

24
SOAP Benchmarking
  • Compare RMI to SOAP
  • Build a small client-server system to exchange
    the current data and time
  • As a java.util.Date object
  • As a java.lang.String object
  • Different objects will compare efficiency and
    scalability of serialization

25
SOAP Serialization Example
  • String
  • ltreturn xsitype"xsdstring"gtThu Nov 23 172446
    EST 2000
  • lt/returngt
  • Date
  • ltreturn xsitype"ns1date"gt
  • lttime xsitype"xsdlong"gt975013920065lt/timegt
  • ltminutes xsitype"xsdint"gt12lt/minutesgt
  • ltseconds xsitype"xsdint"gt0lt/secondsgt
  • ltdate xsitype"xsdint"gt23lt/dategt
  • ltday xsitype"xsdint"gt4lt/daygt
  • lthours xsitype"xsdint"gt16lt/hoursgt
  • ltyear xsitype"xsdint"gt100lt/yeargt
  • lttimezoneOffset xsitype"xsdint"gt300lt/timezoneOf
    fsetgt
  • ltmonth xsitype"xsdint"gt10lt/monthgt
  • lt/returngt

26
Benchmark Setup
  • 250 Remote Calls per trial
  • Took average of 3 trials for final results
  • Tests run on Pentium 2 266 Laptop with 288 Megs
    of RAM
  • Tests run locally, therefore do not reflect cost
    of network time.

27
SOAP Serialization
28
RMI Serialization
29
RMI v. SOAP
30
Benchmark Conclusions
  • RMI about ten times faster than SOAP
  • Agrees with published results from Indiana
    University
  • RMI Serialization may scale better than SOAP
  • SOAP using possibly inefficient generic
    serializer in test

31
SOAP Conclusions
  • SOAP could use an automatic stub generator like
    RMI
  • Would have sped up development greatly
  • Lots of people using SOAP
  • IBM, Microsoft, Compaq etc.
  • SOAP not a standard yet
  • Could change a lot before settling down

32
SOAP Conclusions
  • SOAP very usable today
  • Some questions concerning interoperability
    between SOAP implementation
  • SLOW
  • May be OK for some web apps
  • Not for high performance computing
  • Would recommend use for small systems
Write a Comment
User Comments (0)
About PowerShow.com