an introduction to web services and proteus’ rti
DESCRIPTION
An Introduction to Web Services and Proteus’ RTI. S. Ghandeharizadeh, E. Alwagait, S. Manjunat Database Lab., CS Department http://dblab.usc.edu/Sangam University of Southern California. Outline. Introduction What is a Web Service (WS)? XML Performance Metrics - PowerPoint PPT PresentationTRANSCRIPT
An Introduction to Web An Introduction to Web Services and Proteus’ RTIServices and Proteus’ RTI
S. Ghandeharizadeh, E. Alwagait, S. ManjunatS. Ghandeharizadeh, E. Alwagait, S. ManjunatDatabase Lab., CS DepartmentDatabase Lab., CS Departmenthttp://dblab.usc.edu/Sangamhttp://dblab.usc.edu/SangamUniversity of Southern CaliforniaUniversity of Southern California
OutlineOutline
IntroductionIntroduction What is a Web Service (WS)?What is a Web Service (WS)? XMLXML Performance MetricsPerformance Metrics Partitioning versus ReplicationPartitioning versus Replication Conclusion and Future ResearchConclusion and Future Research
A Shift in ComputingA Shift in Computing
1985-20001985-2000 1999+1999+Server-centricServer-centric DistributedDistributedDumb clientsDumb clients Smart clientsSmart clientsHardware-drivenHardware-driven Software-drivenSoftware-drivenUser to appUser to app User to app; app to appUser to app; app to appInformation accessInformation access Information actionInformation actionOne-wayOne-way Two-wayTwo-wayMonolithic islandsMonolithic islands peer-to-peerpeer-to-peerIntegration an afterthoughtIntegration an afterthought Integration by designIntegration by designChallenge: scaleChallenge: scale Challenge: valueChallenge: value
InternetInternet
Future VisionFuture Vision In the future, any two IT components will In the future, any two IT components will
automatically integrate and “communicate” with automatically integrate and “communicate” with one another, one another, eveneven though they were not though they were not specifically designed to interoperate.specifically designed to interoperate.
How?How? SemanticsSemantics StandardsStandards Concept of “software and data” as a service, web Concept of “software and data” as a service, web
service, e.g.,service, e.g., Google as a web serviceGoogle as a web service Microsoft Teraserver web servicesMicrosoft Teraserver web services Experian (TRW) credit report web servicesExperian (TRW) credit report web services Etc.Etc.
XMLXML A standard for data interoperability among web A standard for data interoperability among web
servicesservices Language independentLanguage independent
Sun’s Java, Microsoft’s C#Sun’s Java, Microsoft’s C#
Device and software platform independentDevice and software platform independent
Motorola i85sMotorola i85s J2MEJ2ME
Compaq iPAQCompaq iPAQ Windows CEWindows CE StrongARMStrongARM
TomcatTomcat PERLPERL Apache 2.0Apache 2.0 MySQLMySQL LinuxLinux
.NET.NET SQL 2000SQL 2000 Commerce serverCommerce server Windows XP/2000Windows XP/2000
eXtensible Markup Language (XML)eXtensible Markup Language (XML)
XML:XML: A World-Wide-Web Consortium (W3C) A World-Wide-Web Consortium (W3C)
standard.standard. Enables you to create your own tags.Enables you to create your own tags. Emerging as a standard for Emerging as a standard for
interoperability among applications that interoperability among applications that wish to exchange data.wish to exchange data.
Separates content (document) from Separates content (document) from presentation (style sheet).presentation (style sheet).
XML TerminologyXML Terminology An XML element is made up of a start tag, an end An XML element is made up of a start tag, an end
tag, and data in between:tag, and data in between: <<classclass>csci485<>csci485</class/class>> Tags without text can contain the end marker at the end of Tags without text can contain the end marker at the end of
the start tag, I.e., <class></class> is equivalent to: the start tag, I.e., <class></class> is equivalent to: <class /><class />
An element may contain one or more attributes:An element may contain one or more attributes: <class <class type=“UGAdvanced”>type=“UGAdvanced”>csci485</class>csci485</class> An attribute is a name-value pair separated by ‘=‘An attribute is a name-value pair separated by ‘=‘ Attribute values must be enclosed in quotation marks.Attribute values must be enclosed in quotation marks.
Document Type Definition (DTD): defines the tags Document Type Definition (DTD): defines the tags contained in your document, what tags contain contained in your document, what tags contain other tags, number and sequence of tags, the other tags, number and sequence of tags, the attributes your tags may have, and optionally, the attributes your tags may have, and optionally, the values those attributes may have.values those attributes may have.
Describes data within the tags! “class” is Describes data within the tags! “class” is a tag!a tag!
XML Name Space (xmlns)XML Name Space (xmlns) Collection of names used as element Collection of names used as element
or attribute names in an XML or attribute names in an XML document.document.
Qualifies element names on the Web to Qualifies element names on the Web to avoid conflicts between elements with avoid conflicts between elements with the same name.the same name.
A name space is identified by a A name space is identified by a globally unique URI (across the globally unique URI (across the Internet).Internet).
Name spaces are declared in 2 ways:Name spaces are declared in 2 ways:1.1. ExplicitExplicit2.2. ImplicitImplicit
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”>xmlns:money=“urn:Finance.Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE>DOLLAR”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”xmlns:money=“urn:Finance.Money”>>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE>DOLLAR”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
Declares “bk” and “money” to be shorthand for the full names Declares “bk” and “money” to be shorthand for the full names
of their respective namespacesof their respective namespaces. . Bk and money are name Bk and money are name
spaces.spaces.
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfourn:BookLovers.org:BookInfo” ” xmlns:money=“urn:Finance.Money”>xmlns:money=“urn:Finance.Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE>DOLLAR”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
This is the namespace value for “bk” variable!This is the namespace value for “bk” variable!
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfourn:BookLovers.org:BookInfo” ” xmlns:money=“urn:Finance:Money”>xmlns:money=“urn:Finance:Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE>DOLLAR”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
All elements/attributes beginning with “bk:” or “money:” are All elements/attributes beginning with “bk:” or “money:” are considered to be from the namespace considered to be from the namespace “urn:BookLovers.org:BookInfo” or “urn:Finance:Money”“urn:BookLovers.org:BookInfo” or “urn:Finance:Money”
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”>xmlns:money=“urn:Finance:Money”>
<<bk:TITLEbk:TITLE>Web Services</bk:TITLE>>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE>DOLLAR”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
This is the bk namespace prefix qualifying the TITLE tag!This is the bk namespace prefix qualifying the TITLE tag!
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”>xmlns:money=“urn:Finance:Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>DOLLAR”>22.9522.95</bk:PRICE></bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
What is this?What is this?
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”>xmlns:money=“urn:Finance:Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“US <bk:PRICE money:currency=“US DOLLAR”>DOLLAR”>22.9522.95</bk:PRICE></bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
Price tag value!Price tag value!
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”>xmlns:money=“urn:Finance:Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“<bk:PRICE money:currency=“US US DOLLARDOLLAR”>22.95</bk:PRICE>”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
What is this?What is this?
Explicit xmlnsExplicit xmlns<BOOKS><BOOKS>
<bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”>xmlns:money=“urn:Finance:Money”>
<bk:TITLE>Web Services</bk:TITLE><bk:TITLE>Web Services</bk:TITLE>
<bk:PRICE money:currency=“<bk:PRICE money:currency=“US US DOLLARDOLLAR”>22.95</bk:PRICE>”>22.95</bk:PRICE>
</bk:BOOK></bk:BOOK>
</BOOKS></BOOKS>
Currency Attribute value!Currency Attribute value!
Implicit xmlnsImplicit xmlns A namespace without a prefix becomes the default namespaceA namespace without a prefix becomes the default namespace
<BOOKS><BOOKS>
<BOOK xmlns=“urn:BookLovers.org:BookInfo”><BOOK xmlns=“urn:BookLovers.org:BookInfo”>
<TITLE>Web Services</TITLE><TITLE>Web Services</TITLE>
<PRICE currency=“<PRICE currency=“US DOLLARUS DOLLAR”>22.95</PRICE>”>22.95</PRICE>
</BOOK></BOOK>
</BOOKS></BOOKS>
XML FormattersXML Formatters
SOAP formatted messages are larger SOAP formatted messages are larger than their binary counter-part, e.g., than their binary counter-part, e.g., Query 10 of TPC-H benchmark:Query 10 of TPC-H benchmark:
BinaryBinary 9.47 MB9.47 MB
SOAPSOAP 25.57 MB25.57 MB
Query10 Result5MB
Query10 Result5MB
SOAP message
25MB
SOAP message
25MBServer Client
Internet
ProducerProducer
..NETNET
ConsumerConsumer
..NETNET
MICROSOFT .NETMICROSOFT .NET
Performance Performance A system must exhibit high performance. Key metrics are:A system must exhibit high performance. Key metrics are:
Response timeResponse time
ThroughputThroughput
Performance Performance A system must exhibit high performance. Key metrics are:A system must exhibit high performance. Key metrics are:
Response time: delay from when a request is issued until return Response time: delay from when a request is issued until return results are returned.results are returned.
Throughput: number of requests per seconds.Throughput: number of requests per seconds.
Performance Performance A system must exhibit high performance. Key metrics are:A system must exhibit high performance. Key metrics are:
Response time: delay from when a request is issued until return Response time: delay from when a request is issued until return results are returned.results are returned.
Throughput: number of requests per seconds.Throughput: number of requests per seconds. How to provide high performance?How to provide high performance?
Performance Performance A system must exhibit high performance. Key metrics are:A system must exhibit high performance. Key metrics are:
Response time: delay from when a request is issued until return Response time: delay from when a request is issued until return results are returned.results are returned.
Throughput: number of requests per seconds.Throughput: number of requests per seconds. How to provide high performance?How to provide high performance?
Limit the number of accesses a client may make to a popular WS, Limit the number of accesses a client may make to a popular WS, e.g., NCBI’s policy is for a client to issue no more than one e.g., NCBI’s policy is for a client to issue no more than one request every 3 seconds; Google limits the total number of request every 3 seconds; Google limits the total number of requests a client may make during a 24 hour period.requests a client may make during a 24 hour period.
Replicate those WS with a read-only workload across many Replicate those WS with a read-only workload across many nodes.nodes.
Partition those WS with workloads dominated by updates.Partition those WS with workloads dominated by updates.
REPLICATION OF A WSREPLICATION OF A WS
One approach to distribute a WS is to One approach to distribute a WS is to replicate it across M nodes.replicate it across M nodes. Hypotheses: The workload of the WS will be Hypotheses: The workload of the WS will be
distributed across M nodesdistributed across M nodes Limitation: The database must be maintained up Limitation: The database must be maintained up
to date. The rate of updates will increase to date. The rate of updates will increase quadraticly as a function of Mquadraticly as a function of M22
To explain the limitation, assume that the To explain the limitation, assume that the WS observes T updates per second.WS observes T updates per second.
With M nodes, the system scales if each With M nodes, the system scales if each node continues to perform T updates per node continues to perform T updates per second.second.
REPLICATION OF A WSREPLICATION OF A WS With replication, copies of the database must be kept up to With replication, copies of the database must be kept up to
date:date:
The rate of updates per second observed by the system The rate of updates per second observed by the system increased from T to 9T!increased from T to 9T!
With M nodes, the update rate increases by MWith M nodes, the update rate increases by M22 T. T. If updates dominate the system workload then replication will If updates dominate the system workload then replication will
hurt system performance.hurt system performance.
T T T
2T2T2T
3T3T3T
REPLICATION OF A WSREPLICATION OF A WS If the workload is 100% updates and T updates per second If the workload is 100% updates and T updates per second
results in 100% system utilization, then 3 nodes can perform at results in 100% system utilization, then 3 nodes can perform at most 3T updates per second!most 3T updates per second!
The performance of 3 nodes is identical to the performance The performance of 3 nodes is identical to the performance provided by one node!provided by one node!
In general, the 3 node configuration will observe a In general, the 3 node configuration will observe a performance lower than T updates per second because it is performance lower than T updates per second because it is difficult to distribute the workload evenly.difficult to distribute the workload evenly.
System performance becomes worse as M increases in value.System performance becomes worse as M increases in value.
0.33 T
TTT
0.33 T 0.33 T
0.66 T0.66 T0.66 T
ReferencesReferences S. Ghandeharizadeh, et. al., “Proteus: A System for Dynamically S. Ghandeharizadeh, et. al., “Proteus: A System for Dynamically
Composing and Intelligently Executing Web Services,” In ICWS, Composing and Intelligently Executing Web Services,” In ICWS, Las Vegas, Nevada, June 2003.Las Vegas, Nevada, June 2003.
S. Ghandeharizadeh, et. al., “NAM: A Network Adaptable S. Ghandeharizadeh, et. al., “NAM: A Network Adaptable Middleware to Enhance Response Time of Web Services,” Journal Middleware to Enhance Response Time of Web Services,” Journal of Web Services Research, Volume 2, Issue 4, October 2005.of Web Services Research, Volume 2, Issue 4, October 2005.
J. Gray, et. al., “The Dangers of Replication and a Solution,” J. Gray, et. al., “The Dangers of Replication and a Solution,” SIGMOD Conference, Montreal, Canada, June 1996.SIGMOD Conference, Montreal, Canada, June 1996.
M. Saxena, et. al., “Sangam: A Data Integration Framework for M. Saxena, et. al., “Sangam: A Data Integration Framework for Studies of Stimulus-Circuitry-Gene Coupling in the Brain,” Society Studies of Stimulus-Circuitry-Gene Coupling in the Brain,” Society of Neuroscience, Neuroscience 2005, Washington D.C., Nov 12-16, of Neuroscience, Neuroscience 2005, Washington D.C., Nov 12-16, 2005.2005.