280 likes | 427 Views
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
E N D
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 • Partitioning versus Replication • Conclusion and Future Research
Server-centric Distributed Dumb clients Smart clients Hardware-driven Software-driven User to app User to app; app to app Information access Information action One-way Two-way Monolithic islands peer-to-peer Integration an afterthought Integration by design Challenge: scale Challenge: value A Shift in Computing Internet 1985-2000 1999+
Future Vision • In the future, any two IT components will automatically integrate and “communicate” with one another, even though they were not specifically designed to interoperate. • How? • Semantics • Standards • Concept of “software and data” as a service, web service, e.g., • Google as a web service • Microsoft Teraserver web services • Experian (TRW) credit report web services • Etc.
XML • A standard for data interoperability among web services • Language independent • Sun’s Java, Microsoft’s C# • Device and software platform independent • Compaq iPAQ • Windows CE • StrongARM • Motorola i85s • J2ME • .NET • SQL 2000 • Commerce server • Windows XP/2000 • Tomcat • PERL • Apache 2.0 • MySQL • Linux
eXtensible Markup Language (XML) • XML: • A World-Wide-Web Consortium (W3C) standard. • Enables you to create your own tags. • Emerging as a standard for interoperability among applications that wish to exchange data. • Separates content (document) from presentation (style sheet).
XML Terminology • An XML element is made up of a start tag, an end tag, and data in between: • <class>csci485</class> • Tags without text can contain the end marker at the end of the start tag, I.e., <class></class> is equivalent to: <class /> • An element may contain one or more attributes: • <class type=“UGAdvanced”>csci485</class> • An attribute is a name-value pair separated by ‘=‘ • Attribute values must be enclosed in quotation marks. • Document Type Definition (DTD): defines the tags contained in your document, what tags contain other tags, number and sequence of tags, the attributes your tags may have, and optionally, the values those attributes may have. Describes data within the tags! “class” is a tag!
XML Name Space (xmlns) • Collection of names used as element or attribute names in an XML document. • Qualifies element names on the Web to avoid conflicts between elements with the same name. • A name space is identified by a globally unique URI (across the Internet). • Name spaces are declared in 2 ways: • Explicit • Implicit
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS>
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> Declares “bk” and “money” to be shorthand for the full names of their respective namespaces. Bk and money are name spaces.
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> This is the namespace value for “bk” variable!
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> All elements/attributes beginning with “bk:” or “money:” are considered to be from the namespace “urn:BookLovers.org:BookInfo” or “urn:Finance:Money”
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> This is the bk namespace prefix qualifying the TITLE tag!
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> What is this?
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> Price tag value!
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> What is this?
Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> Currency Attribute value!
Implicit xmlns • A namespace without a prefix becomes the default namespace <BOOKS> <BOOK xmlns=“urn:BookLovers.org:BookInfo”> <TITLE>Web Services</TITLE> <PRICE currency=“US DOLLAR”>22.95</PRICE> </BOOK> </BOOKS>
XML Formatters • SOAP formatted messages are larger than their binary counter-part, e.g., Query 10 of TPC-H benchmark:
Query10 Result Query10 Result 5MB 5MB SOAP message SOAP message 25MB 25MB Internet MICROSOFT .NET Server Client
Performance • A system must exhibit high performance. Key metrics are: • Response time • Throughput
Performance • A system must exhibit high performance. Key metrics are: • Response time: delay from when a request is issued until return results are returned. • Throughput: number of requests per seconds.
Performance • A system must exhibit high performance. Key metrics are: • Response time: delay from when a request is issued until return results are returned. • Throughput: number of requests per seconds. • How to provide high performance?
Performance • A system must exhibit high performance. Key metrics are: • Response time: delay from when a request is issued until return results are returned. • Throughput: number of requests per seconds. • How to provide high performance? • 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 request every 3 seconds; Google limits the total number of requests a client may make during a 24 hour period. • Replicate those WS with a read-only workload across many nodes. • Partition those WS with workloads dominated by updates.
REPLICATION OF A WS • One approach to distribute a WS is to replicate it across M nodes. • Hypotheses: The workload of the WS will be distributed across M nodes • Limitation: The database must be maintained up to date. The rate of updates will increase quadraticly as a function of M2 • To explain the limitation, assume that the WS observes T updates per second. • With M nodes, the system scales if each node continues to perform T updates per second.
REPLICATION OF A WS • With replication, copies of the database must be kept up to date: • The rate of updates per second observed by the system increased from T to 9T! • With M nodes, the update rate increases by M2 T. • If updates dominate the system workload then replication will hurt system performance. T T T 2T 2T 2T 3T 3T 3T
REPLICATION OF A WS • If the workload is 100% updates and T updates per second results in 100% system utilization, then 3 nodes can perform at most 3T updates per second! • The performance of 3 nodes is identical to the performance provided by one node! • In general, the 3 node configuration will observe a performance lower than T updates per second because it is difficult to distribute the workload evenly. • System performance becomes worse as M increases in value. 0.33 T 0.33 T 0.33 T 0.66 T 0.66 T 0.66 T T T T
References • S. Ghandeharizadeh, et. al., “Proteus: A System for Dynamically Composing and Intelligently Executing Web Services,” In ICWS, Las Vegas, Nevada, June 2003. • S. Ghandeharizadeh, et. al., “NAM: A Network Adaptable Middleware to Enhance Response Time of Web Services,” Journal of Web Services Research, Volume 2, Issue 4, October 2005. • J. Gray, et. al., “The Dangers of Replication and a Solution,” SIGMOD Conference, Montreal, Canada, June 1996. • M. Saxena, et. al., “Sangam: A Data Integration Framework for Studies of Stimulus-Circuitry-Gene Coupling in the Brain,” Society of Neuroscience, Neuroscience 2005, Washington D.C., Nov 12-16, 2005.