What is a web service?


Published on

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

What is a web service?

  1. 1. What is a Web Service (for) Developing Applications for Real-time Environmental Data Bryan Lawrence Head, NCAS British Atmospheric Data Centre P.I. The NERC DataGrid. or some relevant web services
  2. 2. Outline <ul><ul><li>Question: What is a Web Service? </li></ul></ul><ul><ul><li>Answer: Acronym Soup! </li></ul></ul><ul><ul><li>Fundamentals (XML+) </li></ul></ul><ul><ul><ul><li>SOAP and REST </li></ul></ul></ul><ul><ul><ul><li>WSDL </li></ul></ul></ul><ul><ul><li>OGC Web Services </li></ul></ul><ul><ul><ul><li>WFS, WCS, WFS </li></ul></ul></ul><ul><ul><li>UNIDATA </li></ul></ul><ul><ul><ul><li>LDM </li></ul></ul></ul><ul><ul><li>NDG Web Services </li></ul></ul>
  3. 3. What is a web service? <ul><li>Googling gives: </li></ul><ul><li>Answers.Com: Web-based applications that dynamically interact with other Web applications using open standards that include XML, UDDI and SOAP. </li></ul><ul><li>(Yuck: UDDI?) </li></ul><ul><li>emergingtech.ittoolbox.com: </li></ul><ul><ul><li>A Service-Oriented Architecture (SOA) is a collection of services or software agents that communicate freely with each other. </li></ul></ul><ul><ul><li>Sub-topic definition: Web Services protocols and standards are the technology that promote the sharing and distribution of information and business data. A protocol is a standard method for transmitting data through a network. There are many different specialized protocols to accommodate the many kinds of data that might be transmitted. </li></ul></ul>
  4. 4. SOAP <ul><li>Simple Object Access Protocol </li></ul>Horrible looking XML specification, but lots of SOAP pacakges available which are (generally easy to use), eg: from SOAPpy import SOAPproxy url=http://services.xmethods.net:80/soap/servlet/rpcrouter’ n=‘urn:xmethods-Temperature’ server=SOAPProxy(url,namespace=n) temperature=server.getTemp(‘27502’) Returns the temperature at U.S. zipcode 27502 (from Dive Into Python, Mark Pilgrim) ( One knew a priori that a method named getTEmp would return a float given an argument of a zip code, provided one used the right namespace – How?)
  5. 5. WSDL :Web Services Description Language ABSTRACT PROPERTIES >>>from SOAPpy import WSDL >>>Server=WDSL.Proxy(‘path/to/WSDL’) >>>server.method.keys() [u’doGoogleSearch’,u’doGetCachedPage’ …] >>>callInfo=server.methods[‘doGoogleSearch’] >>>for arg in callInfo.inparams: . . . print arg.name, arg.type key (u’http://www.w3.org/2001/XMLSchema’,u’string’) . . . Define expected messages for a service, and their (input or output parameters). An interface will group together a number of messages (operations) Bind an Interface via a definition to a specific transport (e.g. HTTP) and messaging (e.g. SOAP) protocol The network location where the service is implemented , e.g. http://localhost:8080
  6. 6. REST’ful Web Services <ul><li>REST (representational state transfer) is an approach for getting information content from a Web site by reading a designated (ok, you need a URI) Web page that contains an XML (Extensible Markup Language) file that describes and includes the desired content. </li></ul><ul><li>That’s it! You use HTTP (get,put,…) to a URI, with XML as the payload … </li></ul>
  7. 7. Web Services the confusion: <ul><li>(Tim Ewald): “Today, I see three camps: </li></ul><ul><li>1) It's all about SOAP messages …, </li></ul><ul><li>2) It's all about WSDL, </li></ul><ul><li>3) It's all about XML/HTTP. </li></ul><ul><li>Microsoft is definitely in the first camp, focusing on doing things with SOAP whether or not they are ultimately represented as XML or a binary data rep. </li></ul><ul><li>IBM and Iona are in the second camp, focusing on describing in WSDL, whether or not they are ultimately represented as SOAP or a binary protocol. </li></ul><ul><li>Lots of developers and some big companies like Amazon are in the XML/HTTP camp, focusing on getting data from one place to another in a way they can consume it. </li></ul><ul><li>[Tim Ewald: http://pluralsight.com/blogs/tewald/archive/2004/10/18/2875.aspx] </li></ul>
  8. 8. <ul><li>Dimensions of interoperability for earth science data </li></ul>Standards ISO / OGC use access discovery
  9. 9. OGC web services <ul><li>Data access services, e.g.: </li></ul><ul><ul><li>Live Access Server, NDG DataExtractor </li></ul></ul><ul><ul><li>GADS </li></ul></ul><ul><ul><li>DODS/OPeNDAP </li></ul></ul><ul><ul><li>OGC web services </li></ul></ul><ul><li>OGC web services </li></ul><ul><ul><li>Web Map Service </li></ul></ul><ul><ul><li>Web Feature Service </li></ul></ul><ul><ul><li>Web Coverage Service </li></ul></ul><ul><li>[ Open Geospatial Consortium (OGC): International consortium of nearly 300 companies, government agencies and universities participating in a consensus process to develop publicly available geoprocessing specifications] </li></ul>
  10. 10. OGC web services <ul><li>Web Map Service (WMS) </li></ul><ul><li>Three operations: </li></ul><ul><ul><li>GetCapabilities (required) </li></ul></ul><ul><ul><li>GetMap (required) </li></ul></ul><ul><ul><li>GetFeatureInfo (optional) </li></ul></ul><ul><li>Typically support HTTP GET binding, SOAP being considered </li></ul><ul><li>GetCapabilities request </li></ul><ul><ul><li><Service> metadata for service as a whole (ISO 19115 compliant) </li></ul></ul><ul><ul><li><Capability> metadata describes request bindings, exceptions, and: </li></ul></ul><ul><ul><li><Layer> s: title, name, SRS, bounding box, keywords, style; nested layers inherit from parent </li></ul></ul>eg, GLOBE program WMS server GetCapabilities : http://viz.globe. gov / viz -bin/ wmt . cgi ?REQUEST= GetCapabilities &SERVICE=WMS
  11. 11. <ul><li>e.g.: ERA40 re-analysis surface air temperature, 2001-04-27 </li></ul><ul><ul><li>deegree open-source WMS modified with netCDF connector </li></ul></ul>OGC web services Overlaid with rainfall from globe.digitalearth.gov WMS server
  12. 12. <ul><li>Web Coverage Service (WCS) – cf DODS/OPeNDAP/GADS </li></ul><ul><li>A geographic coverage is raw (typically gridded) data </li></ul><ul><li>WCS similar to WMS, but provides data , not images (cf DODS/OPeNDAP, GADS) </li></ul><ul><li>Operations: </li></ul><ul><ul><li>GetCapabilities </li></ul></ul><ul><ul><li>DescribeCoverage </li></ul></ul><ul><ul><li>GetCoverage </li></ul></ul><ul><li>Coverages supplied in well-known-binary format: </li></ul><ul><ul><li>GeoTIFF, HDF-EOS, DTED, NITF, GML, netCDF??? </li></ul></ul>OGC web services
  13. 13. <ul><li>Web Feature Service (WFS) </li></ul><ul><li>Provides access to geographic feature instances </li></ul><ul><li>Features are defined by application schema compliant with the Geography Markup Language (GML) </li></ul><ul><li>Operations: </li></ul><ul><ul><li>DescribeFeatureType (required): returns XML schema for the feature </li></ul></ul><ul><ul><li>GetFeature (required): allows retrieval of features in XML compliant to the feature schema. Selected features may be constrained through Xpath expressions </li></ul></ul><ul><ul><li>Transaction and LockFeature (optional): for inserting, updating and deleting feature instances </li></ul></ul><ul><ul><li>GetCapabilities : describes capabilities of WFS (as for WMS) </li></ul></ul><ul><li>Typically used for vector data (eg cruise tracks), but can be any application schema </li></ul>OGC web services
  14. 14. <ul><li>FOSS implementations </li></ul><ul><ul><li>server: </li></ul></ul><ul><ul><ul><li>deegree </li></ul></ul></ul><ul><ul><ul><li>geoserver </li></ul></ul></ul><ul><ul><ul><li>mapserver </li></ul></ul></ul><ul><ul><li>client: </li></ul></ul><ul><ul><ul><li>quickWMS </li></ul></ul></ul><ul><ul><ul><li>www.wmsviewer.com </li></ul></ul></ul><ul><ul><li>List maintained on NDG wiki at http://ndg.nerc.ac.uk/kwiki/ndg/index.cgi? OtherProjects </li></ul></ul>OGC web services
  15. 15. <ul><li>Summary </li></ul><ul><ul><li>Web Map Service (WMS, ISO 19128) </li></ul></ul><ul><ul><ul><li>GetCapabilities </li></ul></ul></ul><ul><ul><ul><li>GetMap </li></ul></ul></ul><ul><ul><li>Web Feature Service (WFS) </li></ul></ul><ul><ul><ul><li>GetCapabilities </li></ul></ul></ul><ul><ul><ul><li>DescribeFeatureType </li></ul></ul></ul><ul><ul><ul><li>GetFeature </li></ul></ul></ul><ul><ul><ul><li>Transaction, LockFeature </li></ul></ul></ul><ul><ul><li>Web Coverage Service (WCS) </li></ul></ul><ul><ul><ul><li>GetCapabilities </li></ul></ul></ul><ul><ul><ul><li>DescribeCoverage </li></ul></ul></ul><ul><ul><ul><li>GetCoverage </li></ul></ul></ul><ul><ul><li>Catalog Service for the Web (CSW) – very new! </li></ul></ul><ul><ul><li>REST, not SOAP (currently) </li></ul></ul>OGC web services
  16. 16. <ul><li>Climate Science Modelling Language (CSML, a GML application schema) </li></ul><ul><ul><li>http:// ndg . nerc .ac. uk / csml </li></ul></ul><ul><ul><li>Defines seven features of interest! </li></ul></ul>NDG: CSML numerical weather prediction model, ocean general circulation model Timeseries of gridded parameter fields. GridSeriesFeature vertical or scanning radar, shipborne ADCP, thermistor chain timeseries Series of profile-type measurements ProfileSeriesFeature tidegauge, rainfall timeseries Series of single datum measurements PointSeriesFeature gridded analysis field Single time-snapshot of a gridded field GridFeature wind sounding, XBT, CTD, radiosonde Single ‘profile’ of some parameter along a directed line in space. ProfileFeature raingauge measurement Single point measurement PointFeature ship’s cruise track, aircraft’s flight path Discrete path in time and space of a platform or instrument. TrajectoryFeature Examples Description CSML feature type
  17. 17. CSML ProfileFeature GridFeature ProfileSeriesFeature
  18. 18. Discovery Service (here now) Data Extractor (next week) Vocab Service (next month) Attribute Authority (next couple of months) Data Provider (next couple of months) DeliveryBroker (later this year) Browse Service (a long way off) All Open Source, documented, clear APIs NERC DataGrid; web services coming soon
  19. 19. NERC DataGrid: Discovery Service
  20. 20. NDG: dataExtractor and GeoSplat
  21. 21. UNIDATA <ul><li>Unidata ( www.unidata.ucar.edu ) provide data feeds using their Local Data Manager (LDM) technology to push data around the U.S. (and further afield) in the Internet Data Distribution system (IDD). </li></ul><ul><li>Users to specify in advance which data should be delivered to their local systems. The IDD then delivers the data as soon as they are available. </li></ul><ul><li>The IDD is a data subscription service, implemented in such a way that delivery (and often processing) are triggered by external events. </li></ul><ul><li>WMO considering the use of LDM for some data movement. </li></ul>
  22. 22. Unidata: LDM <ul><li>LDM Delivery </li></ul><ul><li>Scalable </li></ul><ul><li>Hierarchical fan out </li></ul><ul><li>Relying on relay sites with appropriate resources </li></ul><ul><li>Flexible </li></ul><ul><li>New data products can be introduced from any node in the system </li></ul>
  23. 23. UNIDATA IDS Topology
  24. 24. Summary <ul><li>Web services not just about SOAP and WSDL … </li></ul><ul><li>We should use </li></ul><ul><ul><li>web service standards, </li></ul></ul><ul><ul><li>WS mechanisms optimised for environmental applications </li></ul></ul><ul><li>Currently need to extend GML (CSML) </li></ul><ul><li>Options for data push if UK community want it based on LDM (or similar) technologies … </li></ul><ul><li>NDG can (and is) building a range of environmental web services </li></ul>