XMLRPC Presentation - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

XMLRPC Presentation

Description:

A remote procedure call (RPC) is a protocol that allows a computer program ... It was first created by Dave Winer of UserLand Software in 1995 with Microsoft. ... – PowerPoint PPT presentation

Number of Views:96
Avg rating:3.0/5.0
Slides: 15
Provided by: gkh
Category:

less

Transcript and Presenter's Notes

Title: XMLRPC Presentation


1
XML-RPC Presentation
  • Gökhan Önis
  • 10276035

2
RPC (remote procedure calls)
  • A remote procedure call (RPC) is a protocol that
    allows a computer program running on one host to
    cause code to be executed on another host without
    the programmer needing to explicitly code for
    this. When the code in question is written using
    object-oriented principles, RPC is sometimes
    referred to as remote invocation or remote method
    invocation.

3
RPC (remote procedure calls)
  • RPC is an easy and popular paradigm for
    implementing the client-server model of
    distributed computing. An RPC is initiated by the
    caller (client) sending a request message to a
    remote system (the server) to execute a certain
    procedure using arguments supplied. A result
    message is returned to the caller. There are many
    variations and subtleties in various
    implementations, resulting in a variety of
    different (incompatible) RPC protocols.

4
RPC (remote procedure calls)
  • In order to allow servers to be accessed by
    differing clients, a number of standardized RPC
    systems have been created. Most of these use an
    interface description language (IDL) to allow
    various platforms to call the RPC. Examples of
    such systems include Sun RPC (sometimes called
    ONC RPC), the Distributed computing environment
    (DCE), Microsoft's DCOM (and ActiveX), which is
    based in part on DCE, and CORBA.
  • Recently a number of vendors have started using
    XML as the IDL, and HTTP as the network protocol.
    The advantage of this system, known as web
    services, is simplicity and standardization, the
    IDL is a text file that is widely understood, and
    HTTP is built into almost all modern operating
    systems. An example of such an RPC system is
    SOAP, developed in turn from XML-RPC

5
Breif History of XML-RPC
  • It was first created by Dave Winer of UserLand
    Software in 1995 with Microsoft. However
    Microsoft considered it too simple, and started
    adding functionality. After several rounds of
    this, the standard was no longer so simple, and
    became what is now SOAP.

6
What is XML-RPC?
  • XML-RPC is a remote procedure call protocol
    encoded in XML. It is a very simple protocol,
    defining only a handful of data types and
    commands require considerable software support in
    order to be used. It satisfies the needs for
    language independent implementation.

7
More Complex Explanation
  • What is XML-RPC? 
  • Specifications Implementations Services Blogging
    APIs Communities Tutorials/PressIt's a spec and a
    set of implementations that allow software
    running on disparate operating systems, running
    in different environments to make procedure calls
    over the Internet. It's remote procedure
    calling using HTTP as the transport and XML as
    the encoding. XML-RPC is designed to be as simple
    as possible, while allowing complex data
    structures to be transmitted, processed and
    returned.

8
Usage Paradigm
  • XML-RPC is a Remote Procedure Calling protocol
    that works over the Internet.
  • An XML-RPC message is an HTTP-POST request. The
    body of the request is in XML. A procedure
    executes on the server and the value it returns
    is also formatted in XML.
  • Procedure parameters can be scalars, numbers,
    strings, dates, etc. and can also be complex
    record and list structures.

9
What happens on the server after request arrives?
  • Server checks the xmls length.( it must be
    correct)
  • If the RPC path speciefied by the client in the
    header server routes it to the part of the server
    which understands xml and then decodes the
    variable names and method names invoke the
    corresponding method in the program and the
    decoded variables as an input.
  • If the above part is accomplised than it returns
    the what the program returns in an xml to the
    client.
  • If the above part can not be completed in success
    by the server it just returns a fault to the
    client again in xml encoded fault response.

10
Examples
  • Request example
  • Here's an example of an XML-RPC request
  • POST /RPC2 HTTP/1.0
  • User-Agent Frontier/5.1.2 (WinNT)
  • Host betty.userland.com
  • Content-Type text/xml
  • Content-length 181lt?xml version"1.0"?gt
  • ltmethodCallgt
  • ltmethodNamegtexamples.getStateNamelt/methodNam
    egt
  • ltparamsgt
  • ltparamgt ltvaluegtlti4gt41lt/i4gtlt/valuegt lt/paramgt
  • lt/paramsgt
  • lt/methodCallgt

11
Header requirements
  • The format of the URL in the first line which is
    POST /RPC2 HTTP/1.0 of the header is not
    specified. For example, it could be empty, a
    single slash, if the server is only handling
    XML-RPC calls. However, if the server is handling
    a mix of incoming HTTP requests, we allow the URI
    to help route the request to the code that
    handles XML-RPC requests. (In the example, the
    URI is /RPC2, telling the server to route the
    request to the "RPC2" responder.)
  • A User-Agent and Host must be specified.
  • The Content-Type is text/xml.
  • The Content-Length must be specified and must be
    correct.

12
Fault Example
  • lt?xml version"1.0"?gt
  • ltmethodResponsegt
  • ltfaultgt
  • ltvaluegt
  • ltstructgt
  • ltmembergt
  • ltnamegtfaultCodelt/namegt
  • ltvaluegtltintgt4lt/intgtlt/valuegt
  • lt/membergt
  • ltmembergt
  • ltnamegtfaultStringlt/namegt ltvaluegt ltstring
    gtToo many parameters.lt/stringgt
  • lt/valuegt
  • lt/membergt
  • lt/structgt lt/valuegt lt/faultgt
  • lt/methodResponsegt

13
Conclusion
  • XML-RPC is a simple method invokation model and
    it is fast for simple needs like short procedures
    as an example learning weather forecasts from the
    server and broadcasting it in your homepage from
    a diffrent platform which the server has. But if
    you need more bandwidth like peer to peer
    networks xml structure is something very
    expensive on networks because for only variable
    it generates almost 15 lines of code. If you are
    saying this is good than than write your own
    binary platform for your applications.

14
References
  • http//davenet.scripting.com/1998/07/14/xmlRpcForN
    ewbies
  • http//xmlrpc.org
  • www.wikipedia.org
  • Course book
Write a Comment
User Comments (0)
About PowerShow.com