260 likes | 517 Views
Outline. IntroductionMiddleware providing IntegrationTypes of XML Based MiddlewareMessaging ServicesRelational DatabasesXML Based Middleware ProductsHealth Care SystemsSmart HomeConclusion. Introduction. "Integration is located at the heart of a Middleware" says Jim Price, COO of Eskye.com
E N D
1. XML Based Middleware
Nilmax Moura
CompSci234/NetSys210
Advanced Topics in Networking
University of California, Irvine
2. Outline Introduction
Middleware providing Integration
Types of XML Based Middleware
Messaging Services
Relational Databases
XML Based Middleware Products
Health Care Systems
Smart Home
Conclusion
There is no survey on XML based Middlewares There is no survey on XML based Middlewares
3. Introduction "Integration is located at the heart of a Middlewaresays Jim Price, COO of Eskye.com
Applications need to share data among themselves regardless of their underlying programming languages or platforms
This integration requires a framework of standards that allow applications to
talk to each other
describe what functions they can perform
advertise themselves
4. Integration Basically there are 2 ways how applications can talk to each other:
Connecting point-to-point (Internet sockets)
Sending messages
Before XML emerge, the favorite way of communication was by exchanging objects - CORBA, RMI (Java only), COM/DCOM (Windows).
This method was more difficult in programming and maintenance
because it usually requires that both sides have the same version of software for binary compatibility. A different approach is necessary.
This middlewares employ highly efficient binary encodings to marshal data structures and method calls in a distributed system. Unfortunately, these dense encodings are not easily amenable to adaptation.A different approach is necessary.
This middlewares employ highly efficient binary encodings to marshal data structures and method calls in a distributed system. Unfortunately, these dense encodings are not easily amenable to adaptation.
5. Integration In order to ease integration of data and applications, vendors need to agree to uniform standards
XML emerged as a way to store and transport data
It is vendor independent and system independent
Now it is the most common tool for data transmissions between all sorts of applications
6. XML: Extensible Markup Language XML has emerged as the standard in general purpose, platform-independent data exchange
Complex relationships like trees and inheritance can be communicated
FORMAT - differences from HTML
XML is an extendable language, meaning that you can create the markup language in terms of your specific problem set
Searching is extremely difficult in HTML, and the correlation of field does not exist. it could be a very tedious process to find information by navigating the HTML data.
All these previous arguments make XML a good candidate to connect components and host adaptations. The first benefit of XML is that because you are writing your own markup language, you are not restricted to a limited set of tags defined by proprietary vendorsThe first benefit of XML is that because you are writing your own markup language, you are not restricted to a limited set of tags defined by proprietary vendors
7. Types of XML Based Middleware Messaging Services
XML-RPC, .NET, and SOAP
Relational databases
Hibernate
8. Messaging services Messaging services have advantage of de-coupling parts of the system, thus making it more robust and easy to program and maintain.
Examples
XML-RPC
SOAP
.NET Today's favorite approach is to use XML messages to pass data and for remote procedure calls (RPC) and callbacks. Notable implementation of this philosophy - .NET from Microsoft, SOAP.
Today's favorite approach is to use XML messages to pass data and for remote procedure calls (RPC) and callbacks. Notable implementation of this philosophy - .NET from Microsoft, SOAP.
9. XML-RPC XML-RPC is a Remote Procedure Calling protocol that works over the Internet. It seeks to be a simple and effective means to request and receive information
Allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.
Use HTTP as the transport and XML as the encoding.
It is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.
Avoid firewall issues (everyone allows HTTP traffic)
For the communication amongst objects, for example, this boils down to represent a method invocation with name and parameters in a simple XML documentFor the communication amongst objects, for example, this boils down to represent a method invocation with name and parameters in a simple XML document
10. XML-RPC Architecture 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.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.
11. XML-RPC request and response Use XML to encode requests
procedure name
parameter values
Response is also an XML document
return value(s)
Multiple input parameters can be passed to the remote method, one return value is returned.
The parameter types allow nesting of parameters into maps and lists, thus larger structures can be transported.
Therefore XML-RPC can be used to transport objects or structures both as input and as output parameters. Use XML to encode requests
procedure name
parameter values
Response is also an XML document
return value(s)
Multiple input parameters can be passed to the remote method, one return value is returned.
The parameter types allow nesting of parameters into maps and lists, thus larger structures can be transported.
Therefore XML-RPC can be used to transport objects or structures both as input and as output parameters.
12. SOAP SOAP provide a basic messaging framework upon which web services can be built
It is based on Web Services Description Language (WSDL) and Universal Description Discovery and Integration (UDDI)
It relies on XML for message negotiation and transmission
This XML based protocol consists of three parts:
An envelope, which defines what is in the message and how to process it
A set of encoding rules for expressing instances of application-defined data types
A convention for representing procedure calls and responses.
SOAP makes it easier to exchange more complex documents.
SOAP runs over many protocols:
HTTP, SMTP, FTP, WSDL is a web services denition language, which widely peruses XML Schema. It may be used to encapsulate schema definitions when calling via SOAP.
UDDI: Applications will be able to dynamically discover new Web services and automatically call them. Organizations register their Web services in a global directory so clients can find them
XML Documents are more complex
use namespaces
formal "envelope"
Soap Header
Soap Body
WSDL is a web services denition language, which widely peruses XML Schema. It may be used to encapsulate schema definitions when calling via SOAP.
UDDI: Applications will be able to dynamically discover new Web services and automatically call them. Organizations register their Web services in a global directory so clients can find them
XML Documents are more complex
use namespaces
formal "envelope"
Soap Header
Soap Body
13. .NET .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment
Essentially, they are applications that expose their features and capabilities over the network using XML
Platform independent
Permit secure transmission (HTTPS, SSL)
14. ASP.NET Web Service Managed code that can be invoked remotely over HTTP requests
Replacement of DCOM
Can be called from a browser-based client, console client, or Windows-based client
Invocation protocol HTTP GET, HTTP POST, SOAP
Description service XML schema used to descibe the web service (WSDL Web Services Description Language)
Discovery service XML-based files that allow a client to discover the web services exposed (*.vsdisco)
Commonly uses ADO to interact with databases
15. Relational Databases - Hibernate As weve seen, JDBC allows connectivity, but developer owns some hard problems
Hibernate is middleware that provides object-relational persistence of Java objects
It allows relational data to be mapped to XML
Hibernate works with XML documents as dom4j trees. That is, when data is extracted from the database, Hibernate creates a dom4j tree.
Hibernate not only takes care of the mapping from Java classes to database, but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC
(In fact, a single map can specify the mapping from both a Java class and an XML schema to the database.)
Hibernate is an open source object/relational mapping tool for Java that lets you develop persistent classes and persistent logic without caring how to handle the data. facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC
(In fact, a single map can specify the mapping from both a Java class and an XML schema to the database.)
Hibernate is an open source object/relational mapping tool for Java that lets you develop persistent classes and persistent logic without caring how to handle the data.
16. - you only need to write a simple POJO (Plain Old Java Object),
- create an XML mapping file that describes relationship between the database and the class attributes
- call few Hibernate APIs to load/store the persistent objects.- you only need to write a simple POJO (Plain Old Java Object),
- create an XML mapping file that describes relationship between the database and the class attributes
- call few Hibernate APIs to load/store the persistent objects.
17. Hibernate Mapping The process of specifying the bindings between an object model and a database schema
Principal mechanism is via XML mapping files
Defacto file name extension: is .hbm.xml
Multiple ways to set this up: a single file, one file per class. Best practice is is to use one file per class, with each file placed next to its corresponding class file in the package hierarchy, and loaded as a resource
18. Hibernate Mapping Entities
Basic Properties
Components
Associations
Many-To-One
One-To-Many
Many-To-Many
Inheritance Mapping
Modeling with Interfaces
19. Hibernate Example
20. XML Based Middleware Products Health Care Systems
Electrocardiogram Format Conversion
Smart Home
Middleware Service on Set-Top Box
21. Electrocardiogram Format Conversion The medical images as well as the mono-dimension medical signals are two major forms of medical information that are stored and manipulated within an electronic medical environment
A variety of industrial and international standards such as DICOM and HL7 have been proposed, however many proprietary formats are still pervasively used by many Hospital Information System
Thus there is an imperative need to solve the medical data integration problem
22. Electrocardiogram Format Conversion Middleware to facilitate medical system integration
Xuchen Li et al proposed an XML based middleware which acts as a translation engine to seamlessly integrate clinical ECG data from a variety of proprietary data formats.
Philips and GE are famous ECG device suppliers and their ECG devices are widely used all over the world. However GE and Philips, unlike other medical device suppliers, store ECG files in their own formats.
An XML based middleware was designed to convert a variety of ECG formats into HL7 message formats and to integrate with an existing PACS (Picture Archiving and Communication Systems) which can be seen more as storage facilities than as true processing environments In medical imaging, "electronic picture archiving and communication systems (PACS) have been developed in an attempt to provide economical storage, rapid retrieval of images, access to images acquired with multiple modalities, and simultaneous access at multiple sites
The universal format for PACS image storage and transfer is DICOM
Patient Identification and Orders for examination. These data are sent from HIS to RIS via integration interface, in most of hospital, via HL7 protocol.In medical imaging, "electronic picture archiving and communication systems (PACS) have been developed in an attempt to provide economical storage, rapid retrieval of images, access to images acquired with multiple modalities, and simultaneous access at multiple sites
The universal format for PACS image storage and transfer is DICOM
Patient Identification and Orders for examination. These data are sent from HIS to RIS via integration interface, in most of hospital, via HL7 protocol.
23. Electrocardiogram Format Conversion HL7 Message InterfaceHL7 Message Interface
24. Middleware Service on Set-Top Box In this paper we present an implementation of services on a Set-Top Box to exemplify how XML can be used as a middleware between the user and the services.
The two services are a CD Player service and a Lego Controller.
These services reside on the set-top box so the user can access various controls defined in these service using web-based interaction.
25. Middleware Service on Set-Top Box At any point of time, the clients triggering a request to the CD drive causes communication to takes place. The request is encapsulated in the form an XML message whose format is completely unknown to
the client and it is sent to the driver program.
Messaging takes place between the user interface and the driver program through these XML messages that are passed over the network
The service was implemented using VC++ 7.0 in the .NET platformAt any point of time, the clients triggering a request to the CD drive causes communication to takes place. The request is encapsulated in the form an XML message whose format is completely unknown to
the client and it is sent to the driver program.
Messaging takes place between the user interface and the driver program through these XML messages that are passed over the network
The service was implemented using VC++ 7.0 in the .NET platform
26. Software Engineering Example Provide traceability between different software engineering activities
Modeling
Requirements
Activity and Flow diagrams
Model Checking
Test Case Generation
Code generator
Eclipse UML2
An EMF-based implementation of the UML 2.0
27. Conclusion XML messaging is defined as a collection of data fields sent or received together between software applications.
These messages can contain the format required according to the application.
XML is a standard through which any type of data can be defined in the way the user wants it.
XML can be looked upon as a standard data exchange format. In a scenario of distributed systems, the XML model works as a standard for end-to-end data delivery.