1 / 24

Web Services at IRIS DMC

Web Services at IRIS DMC. Joanna Muench Linus Kamb. Outline. Web service development process at DMC Demos SOSA seismogram processing UPDS product handling DHI database access. Developing a web service. Interface creation with a wsdl Code generation Building the backend

egil
Download Presentation

Web Services at IRIS DMC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Services at IRIS DMC Joanna Muench Linus Kamb

  2. Outline • Web service development process at DMC • Demos • SOSA seismogram processing • UPDS product handling • DHI database access

  3. Developing a web service • Interface creation with a wsdl • Code generation • Building the backend • Client side development • Deployment • Testing and logging • Reports from the field

  4. WSDL (web service definition language) is public interface to service Best practice - define wsdl first Avoids language specific constructs Guarantees* interface intent But - complicated, easy to make mistakes <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="dhi_webservice" targetNamespace="http://dhiWS.dmc.iris.edu/wsdl" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://dhiWS.dmc.iris.edu/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://dhiWS.dmc.iris.edu/types"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Created using Cape Clear Studio SOA Editor> <wsdl:types> <xsd:schema targetNamespace="http://dhiWS.dmc.iris.edu/types" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://dhiWS.dmc.iris.edu/types"> <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <xsd:element name="TimeSpan"> <xsd:annotation> <xsd:documentation>Defines a time span with start and end times.</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="startTime" type="xsd:dateTime"/> <xsd:element maxOccurs="1" minOccurs="1" name="endTime" type="xsd:dateTime"/> </xsd:sequence> </xsd:complexType> </xsd:element> Creating an interface

  5. Tools for WSDL creation • Cape Clear SOA Editor • Graphic interface • WSDL validator • Great manual (and free!) • Other editors: • Altova XMLSpy • Sonic Software • or, XML Editor + WSDL validator

  6. Code generation • Tools that translate wsdl into a web service engine in your favorite language • Provide stubs and bindings, making server and/or client generation easier • Available in many languages • Java: Axis, GLUE, JibxSOAP • Perl: SOAPLite • C#: .NET • C++: gSOAP, Axis

  7. Building the backend • Implement desired functionality • Various architectures possible • Maintain flexibility through interfaces • Test • Fill in stub methods in generated code, calling your implementation • You’re ready to deploy!

  8. Building the client • Deployment is more interesting with a client • Client skeleton can be generated from wsdl • Could be command line driven, web application or full application • Common practice to have a client internal to server project, for testing new ideas

  9. Server Deployment • Most web service development environments have deployment tools • Automation is essential - useful tools like ant • Three levels of deployment

  10. Testing at all levels Unit tests in dev Functional tests Performance tests Automate and run frequently Logging Debugging Performance monitoring Usage monitoring Testing and logging

  11. Reports from the Field • Can be easy but… • Setting up deployment, classpaths, etc can be tricky • Tools aren’t foolproof (at least not the free ones) • Attachment specification still vague

  12. IRIS DMC web services • SeismoProcess - component of SOSA (Synthetic and Observed Seismogram Analysis) • UPDS (Uniform Product Distribution Service) revolves around web service • DHI (Data Handling Interface) web service

  13. SeismoProcess Service • Provides additional processing capabilities for SOSA, a Java GUI application • Part of SCEC CME • Motivation: • Update and expand processing capabilities without re-installing application • Prototype for possible more general seismogram processing service • Released as part of SOSA 1.0, but not yet running on production server

  14. SeismoProcess Service

  15. SeismoProcess Service • Implementation details • Attachment style SOAP with Attachments (SwA) • Seismograms sent as SAC files • Issues • Attachment configuration • Performance

  16. UPDS - Motivation • Uniform Product Distribution System • Submit, archive, query, and access • Handles XML “Data Products” • Many different types of products • Unknown future products • Extensible products, product list

  17. UPDS - Design • Submission service • Query/Access service • Unstructured XML • Application and Web interfaces • Flexible interfaces

  18. Web Access Product Handler Module Product Handler Module Product Handler Module Product Handler Modules QUERY / ACCESS WEB SERVICES PRODUCT ARCHIVE UPDS - Overview <XML> <PRODUCT> </XML> DATA PRODUCT PRODUCER SUBMISSION WEB SERVICE SUBMIT CLIENT CLIENT PROGRAM

  19. Web Access Product Handler Module Product Handler Module Product Handler Module Product Handler Modules QUERY / ACCESS WEB SERVICES PRODUCT ARCHIVE UPDS - Overview SERVLET <XML> <PRODUCT> </XML> Q/A LIB DATA PRODUCT PRODUCER SUBMISSION WEB SERVICE Q/A WEB SERVICES Q/A LIB CLIENT PROGRAM

  20. UPDS - Issues • “Pure” XML vs binary products • Large products • “Pure” WS vs multi-protocol approach • Large result sets • Attachment handling • Performance

  21. DHI web service • Web service to CORBA-based DHI • SCEC CME in conjunction with USArray • Provides subset of full DHI capabilities • Motivation: • Language agnostic service • Available over port 80 • Provide most commonly accessed DHI functions, simplified data types • Not yet beta release

  22. DHI web service

  23. DHI web service • Implementation details • Attachment style • Seismograms sent as mSeed, SAC or link to URL for download • Issues • Attachment configuration problems in Axis • Performance of underlying CORBA service

  24. Recap • Can be easy but… hard to do right • Setting up deployment, etc can be tricky • Tools aren’t foolproof (at least not the free ones) • Attachment specifications still vague

More Related