Object and component “wiring” standards

Download Report

Transcript Object and component “wiring” standards

Object and component
“wiring” standards
This presentation reviews the features of
software component wiring and the
emerging world of XML-based standards.
By Michiel Pouw
Interproces communication
 Wide variety of mechanisms for IPC




Files
Pipes
Sockect
Shared Memory
Disadvantage / Advantage
 None of these mechanisms is portable across
platforms
 They can easily be extended to work across
networks
 But implementing complex interactions is
painfull and error-prone
Remote procedure calls
Disadvantage / Advantage
 Mapping all levels of communication on to a
single abstraction



In-process
Interprocess
Intermachine
 But also hides the significant cost difference
between calls
From procedures to objects
 A remote machine can be seen as an object
and RPC entry points are its methods
 To be generally useful, an object-oriented
library must thus be distributed in source
form
 Not popular for component “wiring”
Back to basic:
Compound documents
 The components and compositition are
intuitively meaningfull for the user



The Xerox Star System
Apple’s Hypercard
Microsoft Visual Basic
 Later, web pages with embedded objects,
such as Java applets and ActiveX controls
added a new dimension
The rise of XML
 Useful for representing any structured and
semi-structured data



Prefers tree-shaped data
Can handle relational schemas
Even binary data using a standard encoding
 New applications of XML arise by the day
The rise of XML (2)
 Browsers directly support displaying and exploring
XML documents
 Wide range of tools for generic support
 XML can be used as common language among
applications of independent origin and operation
 XML takes the notion of “wiring” standards from
the level of protocols and wire formats to the level
of durable data representation
Structure of XML
 Three important catagories



XML elements
XML attributes
Unstructured text
 Elements and attributes like HTML
<tag attr1=“val1” attr2=“val2”>
Structure of XML (2)




Strict nesting is required
Unstructured text is properly quoted
A single unique root element
Elements:




<tag …> Scope of tag </tag>
<tag …/>
<? … ?> Meta-information
<!-- … --!> Comments
Structure of XML (3)
 Within an element’s scope nested elements or
unstructured text can be placed
 Multiple nested elements can have the same
tag
 Ordering of nested elements matters
 Attributes of an element form a set


Different names
Ordering is irrelevant
Document type descriptors
 DTDs were originally used before XML
 Cryptic, limited but compact
XML versus DTD
 XML Schema itself is extensible
 Much richer and expressive then DTD
 Part of XML Schema is a flexible and
expressive data type description system
 Use XML to define a standard metaschema
for other XML documents
XML support standards
 Xpath

Tag separation by slashes (“/”)
 Xpointer

Extends the set of idenifible locations in XML
 Xlink

Focuses on the links among XML documents
 XML stylesheet language

Transform an XML document into another form
XML document object and
streaming model
 XML document object model presents XML
documents as


Abstract data structures
or as objects
 For large documents this requires


Random acces
or streaming reading and writing
Simple object acces protocol
 XML documents can be used as self-describing
messages
 Can be used for remote object invocation
 The SOAP standard provides standard ways to



Describe the addressee of an invocation
Encode a wide range of typical programming data types
into invocation messages
Define what parts of a message must be understood or
can be ignored
XML web services
 With SOAP web services can be established
 These services offer computational services
to other systems
 Similar to deployed components from a
client point of view


Standard interfaces
Implementation is not revealed
XML web services (2)
 Not addressed at the level of SOAP



Authentication of communication parties
Encryption of exchange information
Compensation agreements
Subscription
 Billing

 Another standard is needed for these issues
Web services
description language
 WSDL documents are based on XML
 Defines an extensible framework to describe
web services.
 Input and output messages are defined by
WSDL ports
 WSDL ports are grouped into WSDL
services
Web services
and programming models
 Ports on services are similar to methods on
interfaces
 Tempting to model web service invocations
as synchronous remote method calls
 Also tempting to think of web service
implementations as classes that implement
the ports of a service as methods
Web services
and programming models (2)
 Special nature of web-distributed services



Unpredictable latencies
Flexible host selection due load balancing
Failures can occur at any time
 A better model should use asynchronous call
models against web services, similar to those
found in message queuing systems
Conclusion
Many other issues need to be addressed in
the world of web services that have
previously been addressed in remote
procedure, distributed object, and messaging
approaches