Integrating AJAX Approach into GIS Visualization Web Services Ahmet Sayar Indiana University Computer Science Department Pervasive Technology Laboratories February 24, 2006 ICIW’06, Guadeloupe, French Caribbean
Motivation & Contents AJAX ( XMLHttpRequest Protocol ) Web Services ( SOAP Protocol ) AJAX+Web Services ( Why?, How? ) 1. Overlaying map layers from Google and OGC WMS
2. Plotting Geophysics data on the Google Map
Go and fetch additional maps, for example.
For asynchronous data retrieval - XMLHttpRequest
AJAX -Cont Figure is from the web site at http://java.sun.com/developer/technicalArticles/J2EE/AJAX/
Web Services human to machine vs. machine to machine Seamless integrations of services.
Uses open standards (HTTP, XML)
AJAX + Web Services – Why? Provide more interactivity for the browser based web applications. AJAX and Web Services are XML based structures they are able to leverage each others strength. They use widely-used and well-known technologies such as XML and HTTP. They are not competing but
AJAX + Web Services – Challenges? AJAX uses HTTP based XMLHttpRequest protocol for the message transfers. Web Services use SOAP as a communications protocol. Different protocols for message transfers over the different stages of the applications.
BUT their message structures are XML based.
AJAX + Web Services – How? Pure Web Services Pure AJAX AJAX + Web Services
APPLICATION SCENARIOS of the INTEGRATION FRAMEWORK GIS Domain Open Geospatial Consortium (OGC), standards for data models and online services. Geographic Information Systems (GIS), methods and environments to visualize, manipulate and analyze geo-data. GIS system based on SOA. All services (WMS, WFS, IS) are wrapped as Web Services and OGC compatible. Servlet & Web Services based GIS Services (services are provided parallel from different request and response channels) Proposed framework is used in GUI for the GIS decision makers and user end points.
Users interact with the Web Service based GIS services through the AJAX enabled GIS client user interface.
USAGE SCENARIOS I - Google Maps + Web Map Service (WMS) II - Google Maps + Web Feature Service (WFS)
I - Google Maps + Web Map Service (WMS) - Overlaying map layers from Google maps and GIS WMS 1 2 layers 1 2 Pure AJAX Integration framework is needed Layers are of same width, height and bbox values
I - Google Maps + Web Map Service (WMS) GUI and SAMPLE OUTPUT Natural Gas Layer Electric Power Layer
II - Google Maps + Web Feature Service (WFS) Overlaying Geophysics data over Google maps OGC WFS + AJAX Client has a LIGHT-MAPPING Service which makes image rendering. Data come from WFS in GML format. WSDL is a Web service Interface Description Language encoded in XML. Clients should prepare client stubs to be able to invoke the Web Services defined in WSDL. Requests and returned GML data from WFS are put into SOAP envelope. Integration framework is needed Pure AJAX
SOAP is an XML based message exchange protocol used in Web Services interactions.
II - Google Maps + Web Feature Service (WFS) GUI and SAMPLE OUTPUT Simple Architecture Supported Feature Data by the WFS Layer specific parameters for filtering
CONCLUSION Good for the browser based Distributed SOA based applications. Provides powerful interaction asynchronously. AJAX and Web Services both use XML based message communication protocols. This enables application developers to easily integrate AJAX based browser applications into Web Services. They leverage their advantages. No need to modify or extend any technologies in the AJAX model or Web Services. Users do not need to wait whole data to be received to render and display the results. Partial displaying is possible without refreshing the whole page. Instead of making request for whole page, only the interested part will be requested. This reduces the workload of the network traffic. Advanced XML structured geo-data parsing. Fast and efficient compared to DOM parsing. Introduces some extra work. Extra work mostly comes from the conversion of parameters to be able to make compatible requests to remote Web Services. In order to make valid requests, the proxy server should be deployed locally and client stubs for Web Service invocations should be created before running the application.
The performance is degraded by the intermediary proxy server for the conversion and message handling jobs.
References Crisisgrid (GIS project at IU-CGL) home page: http://www.crisisgrid.org/ Demo for the Integration: http://complexity.ucs.indiana.edu:5151/googlemap/wms_overlay_google.jsp OGC GIS Visualization Project page http://complexity.ucs.indiana.edu/~asayar/gisgrids/ Google Publicly available API http://www.google.com/apis/maps/documentation/ Community Grids Labs Related Publications:
THANKS! Ahmet Sayar [email_address] http://www.cs.indiana.edu/~asayar/