Thursday, April 19, 2007
Status Report for 04/18/2007
then,
(2) I have evaluated current performance of the system and figured out the bottleneck regarding large XML based data transfer and handling (parsing rendering etc.),
and,
(3) proposed an architecture for the improvements.
and finally,
(4) evaluated the expected results
Architecture is summarized in three orderly steps. These are
. Pre-fetching (Runs in a predefined periods asynchronously and independently)
Run-time:
. Caching
. Cached-data extraction and Rectangulation on un-cached data
. Merging the extracted cached data with the returned map images in response to rectangles
Please for more detailed information see this paper
http://complexity.ucs.indiana.edu/~asayar/proposal/CurrentResearchWork1.pdf
Thursday, April 05, 2007
FAQ About Sci-Plotting Services
SCI-Plotting Services (%60 completed)
-- Implementing in Web Service principles
-- Data Conversion
-- Layers compatible to be overlaid on WMS maps or Google Maps
53. What is Sci-Plotting service?
It is a rendering service like WMS providing layers integratable to WMS maps but not map images. They provide layers created from geo-science simulation outputs in tabular format. For the core functionality we use Dislin scientific-data plotting libraries. Dislin is a plotting library containing functions for displaying data graphically as curves, graphs, pie-charts, 3-D color plots, surfaces and contours. All these services are wrapped as Web Services and integrated into the general visualization system. This is a service consists of the functionalities provided as Web Services through which any geo-science application output data can be interpreted, rendered and displayed as images and graphs.
54. Can you give a sample output layer Sci-Plotting service provides?
In the three layer set structured architecture, Layer-1 and Layer-2 come from WMS and, Layer-3 comes from Sci-Plotting services.
55. Did you use Sci-Plotting services in any real geo-science application?
Yes we did. GeoFEST is a two- and three-dimensional finite element software package for the modeling of solid stress and strain in geophysical and other continuum domain applications. GeoFEST uses stress-displacement finite elements to model stress and strain due to elastic static response to an earthquake event in the region of the slipping fault, the time-dependent viscoelastic relaxation, and the net effects from a series of earthquakes. Sample output snapshot at Q59.
56. What are the inputs and outputs of Sci-Plotting services?
Currently raw data (input data) is in the column format and located on an HTTP address which can be accessed by using HTTP protocol. It is actually a plain text file. URL to this file is given as parameter to the request for plotting. For each different application there is a data conversion filter to make the data understandable to the service. For example for PI applications Sci-Plotting server is given a file URL to plot in which data is in tabular format. One column shows X coordinate other column shows Y coordinate and other columns shows the values to be plotted. In the future we plan to use VOTables to represent tabular data.
The VOTable format is an XML representation of the tabular data. The VOTable format’s aim is making the online Sci-Data both interoperable and scalable. The interoperability is encouraged through the use of XML standards. When the data is encoded in XML, data interpretation and validation will be easier. During the machine to machine communication, data encapsulation in any kind of messages such as SOAP will also be easier. Application specific metadata can also be embedded in to the VOTable. Metadata can be about the owner of the data, application properties of the data, authentication etc. There is also a price for encoding data in XML. When the data encoded in XML, each data element is tagged. The tagging causes overheads in terms of the volume. Increasing in the data volume basically causes increasing in the transfer time and the processing time.
Return type is image map layers to be overlaid on other maps or graphs showing statistic information to be displayed separately. Most of the output types are application dependent so far but since our implementation packages are open source you can download and modify it in accordance with your application and needs.
57. What is the most challenging part in creating Sci-Plotting services?
Input data comes from variety of different Geo-Science applications to be plotted. Each of these applications output different number of records, columns, variables, and different data structures. Most of the applications outputs thousands or even millions of lines of records. Storing, updating and reusing of the data are cumbersome. Some times, application requires some restrictions and properties on the data. In that case, there should be some properties and attributes about the archived data to check against these requirements. For example, some data are valid just for some specific time intervals or they might have expiration dates for their validations. Furthermore, data on the net may require authentication for access. The remote data needs to be accessed by using various arbitrarily complex protocols by using the URL syntax, “protocol://location”.
The VOTable format seeks answers and solutions to the problems and challenges explained in the previous paragraph. The main goal is making the online geo-data both interoperable and scalable. The interoperability is encouraged through the use of XML standards. When the data encoded in XML, data interpretation and validation will be easier. During the machine to machine communication, data encapsulation in any kind of messages such as SOAP will also be easier. Metadata about the data can also be embedded in to the data. Metadata can be about the owner of the data, application properties of the data, authentication etc. Everything is not perfect when we used the XML encoded data. There is also a price for it. When the data encoded in XML, each data element is tagged. The tagging causes overheads in terms of volume. Increasing in the data volume basically causes increasing in the transfer time and the processing time.
58. How do you use core Dislin libraries through Web Service Interfaces?
Dislin is originally written in Fortran and C but they have also their corresponding native libraries. Native libraries allow us call codes written in any programming language from a program written in the Java language by declaring a native Java method, loading the library that contains the native code, and then calling the native method. We embedded Dislin libraries into our plotting Web Services which is written in Java by using Java Native Interfaces and native methods. In order to install it into our whole system we needed to publish the plotting services as Web Services. Therefore, we first created service description files (WSDL) and publish them by using java axis web services container.
Service stack is composed of native method declarations. All the declared native methods have their own corresponding native implementation routines in the loaded native libraries. Routines can be accessed from any java class through the ServiceStack class. You can see the shrunk version of the ServiceStack class as below. Since all the methods are declared as static, class is assumed to be static as well. So, sample contour calls from any java class will be as below;
// before calling ServiceStack routines first import ServiceStack class
ServiceStack.contour(x-array, x-length, y-array, y-length, data-array, data-length, z-level);
public class ServiceStack
{
public ServiceStack () { }
public static native void contri(float af[], float af1[], float af2[], int i, int ai[], int ai1[], int ai2[]);
public static native void abs3pt(float f, float f1, float f2, float af[]);
public static native void contour(float af[], int i, float af1[], int j, float af2[], float f);
public static native void angle(int i);
/*
Native routine correspondences of all the scientific data plotting libraries
*/
static
{
System.loadLibrary("javaNativeCodeLibraries");
}
}
59. How do you invoke the Sci-Plotting services? Can you give sample snapshot from your outputs?
We initially created below user interface as WMS Client. It was enabling just getting maps from WMSs. Later, we enhanced it with smart map tools and movie streaming interfaces. Finally, we have added and integrated new interfaces for invoking scientific plotting Interfaces in accordance with other interacted GIS services.
GUI and map tools enable users to dynamically interact with the Dislin libraries and GIS visualization services. Each action by the user causes the changes in the parameter values and new request to the corresponding services. Depending on the application and user needs, plotting layers can be shown on another pop-up browser or just overlaid on other layers. All these kinds of service parameters are defined in the requests.
GeoFEST Geo-Science Application snapshot
In order to get better view of the figure, please click on it.
FAQ About Creating Streaming Map Movies
- Enhanced SMT with movie capabilities
- Easy to display movie streams
........... from Collaboration sessions
........... from standalone JMF client program
46. What is streaming map movie?
Visualizing changes over time is achieved by integrating temporal information on a map. Usually the result is a series of static maps showing certain themes at different moments. In addition to creating static maps, WMS also has the ability to combine the static maps correspond to a specific time interval data and combine them in an animated movie. Movies created by WMS are composed of a certain number of frames. Each frame represents a static map that corresponds to a time frame defined in request.
47. Why do you need to create map movie?
Standard map servers produce static images, but many types of geographic data are time dependent. In order to understand geographic phenomena and characteristics of temporal data it is necessary to examine how these patterns change over time for these types of data.
48. How does WMS create a streaming map movie?
Movies in general are composed on static frames. Frames are actually images. Movies are obtained by playing these static frames sequentially. In our case of map movies, frames are static map images created for a specific bounding box and a specific time interval. Sequential frames are created based on successive time intervals. Range of interval is given by the client from the user interface. See below figure, time interval is set to “P1Y”.
Movies are created just for time-dependent data. WMS notify the clients for what layers it can create movie streams through its capabilities file. If a client makes a request to get a movie for a specific layer, to succeed, this layer should have a time dimension defined under this layer element in the capabilities file. Here is an example dimension tag under the layer tag in capability. Layer is created based on a data which is provided yearly.
The last value “P1Y” (in the Dimension tag element above) defines the periodicity of the data collection. According to this value, WMS cuts the whole time (“from/to/periodicity”) into multiple values and for each time slice, it makes a "getFeature” request to WFS to get feature data in GML. After receiving GML, WMS creates static map images for each time slice. These images will be frames of the result map movie.
Clients should make the “getMap” standard request to WMS to get the movie for a specific layer but the “format” variable should be set to “movie/
Below figure is the BIG PICTURE for the creation of the map movies. In order to get further information for the map movies please see the *draft* technical report
http://complexity.ucs.indiana.edu/~asayar/gisgrids/docs/movie_jmf.doc.
49. Can you give a sample movie request sent to WMS?
The request is actually “getMap” request with specific parameters set to specific values. We might need to request a map movie based on the layer created from a data. WMS defines this layer in its capabilities file with the “dimension” tag as displayed in Q48. In order for WMS to create map movie we need to send a “getMap” request as below. Here we request an mpeg movie created from frames created with a yearly data. First frame starts with the year 1987 and last frame ends with the year 1992. So, movie will be created from five frames.
50. Can you define any attributes such as frame rate for the movie streams published by WMS?
The map video stream has several parameters that can be adjusted. These parameters affect the quality of the produced map video stream. Among these configurable parameters are frame rate and video format of the stream, update rate of the map images in the video stream.
In our current implementation, we define these attributes in hard coding but in the future we will take it from the smart map tools interface. This is necessary because; some clients might not be capable of visualizing video streams with low frame rate or can visualize them with very low quality because of their connection or some other issues. They might need to adjust the attributes and get the best result.
51. How do you display map videos?
When the frames (static maps) corresponding to separate time slices are created, WMS publishes them to a Real Time Protocol (RTP) session as streams. RTP sessions are defined with IP Address and Port Number couples. Movie streams published to an RTP session can be visualized by any client connecting to the same RTP session (same IP and port number defined by the publisher).
If you want to display the movie streams with a standalone program (not in collaboration environment such as AccessGrid and Global MMCS), then download and install JMStudio software (http://java.sun.com/products/java-media/jmf/). From the user interface select “File” menu and click on “open RTP session” and give IP, port and time to live (ttl) values that you already know there is one WMS publishing map movie streams to this session.
52. Do you have any sample map movie to see online?
Yes, see the below link. Movie at the below link is obtained by screen recording of the real PI Geo-Science application’s output. Movie is composed of yearly seismic earthquake records. The minimum magnitude is 4.0 (PI spec parameter), and frames are composed of static maps created yearly based.http://complexity.ucs.indiana.edu/~asayar/gisgrids/html/work/AutoScreenRecorder_01.mpg
FAQ About Smart Map Tools (SMT)
Smart Map Tools
- WMS Client
- Interactive data querying
- Streaming map movies capability for the time-dependent feature data
- Integrating AJAX Approach
...... Layer based integration of Google maps and OGC’s WMS maps
....... Overlaying features from WFS over Google Maps
SMT is acronym of Smart Map Tools. We call it smart because tools allow users to manipulate data, create interactive queries and analyze the spatial information. SMT also enables Geo-Science application results interrelated with maps at the “layer” level. SMT also allows creating movie streams or animations from time dependent data.
32. What functionalities does it provide?
In order to give brief idea about what SMT provides, I give development stages from the initial to the current.
1. I first implemented it as “WMS Client”. At that time, SMT was just getting map images and displaying through standard map tools enabling zooming, moving and calculation distance between two selected points on the map etc.
2. I have added interactive query capability. Users are able to query data just by clicking on a specific data on the map. They do not write any complicated SQL queries or any other type of scripts.
3. I have added project based functionality to give additional interpretation to the data.
4. Embedding additional interfaces for the layers based on time dependent data in order to create streaming map movies. User is given option of defining time intervals such as per one year or per one month etc.
5. I created AJAX based approach. It enabled layer based integration of Google maps and OGC’s WMS maps at the “layer” level and, overlaying features from WFS over Google Maps.
6. NOW – I am trying to create a flexible framework enabling integration of all these Map services with Geo-Science Grids. it includes interacting with Sci-Plotting services to plot Geo-Science Grids simulation outputs over Google maps or WMS maps, interacting with HPSearch Job Manager in accordance with Sci-Plotting services. Sci-Plotting services (by Sayar) and HPSearch Job manager (by Gadgil) are two of CGL projects.
33. Can you give a snapshot from SMT?
This is a snapshot from the very early stage of our SMT implementation. For more advanced one please see the snapshot at Q59. Explanations in orange framed boxes give the basic functionality of the SMT. It is implemented by using Java Server Pages (JSP), JavaScript and DHTML technologies.
34. Do you have any GIS demo running?
We have a demo running at http://156.56.104.187:8083/aaa/maptools/newmap.jsp. This is my implementation of user interface for the WMS Client and our proposed Map Services and Geo-Science grids integration framework.
Here is the user manual for instructions about how to use smart map tools to get and manipulate maps and run geo-science applications through smart map tools interactively.
http://complexity.ucs.indiana.edu/~asayar/gisgrids/docs/usermanual.pdf
35. What is the streaming map video?
Another capability SMT provides is the set of tools enabling creation of the streaming map movies. Visualizing changes over time is achieved by integrating temporal information on a map. Usually the result is a series of static maps showing certain themes at different moments. In addition to creating static maps, WMS also has the ability to combine the static maps correspond to a specific time interval data and combine them in an animated movie. Movies created by WMS are composed of a certain number of frames. Each frame represents a static map that corresponds to a time frame defined in request. Please see the Section 1.2.3 for more detailed information about the streaming map movies.
AJAX (Asynchronous JavaScript and XML) is a web development model for the browser based web applications. AJAX is a style of web application development that uses a mix of modern web technologies to provide a more interactive user experience. AJAX is not a technology. It is an approach to web applications that includes a couple of technologies. These are JavaScript, HTML, Cascading Style Sheets (CSS), Document Object Model (DOM), XML and XSLT, and XMLHttpRequest as messaging protocol.
AJAX drew some attention in the public, after Google started to develop some new applications with it. Some of the major products Google has introduced over the last year by using AJAX model are Google Groups, Google Suggests, and Google Maps. Besides the Google products Amazon also have used AJAX approach in its search engine application.
37. What inspired you to use AJAX and Web Services together for the GIS Vis Systems?
AJAX provides high interactivity and performance results for the browser based web applications. AJAX and Web Services are XML Based structures, so that they are able to leverage each others strength. Both AJAX and Web Services uses widely-used and well-known technologies such as XML and HTTP. Last but not least is that they are not competing but complementary technologies.
38. What are the advantages of using AJAX in your GIS Visualization systems?
AJAX has a couple of advantages for the browser based web applications developers. It eliminates the stop-start nature of interactions, user interactions with the server happen asynchronously, data can be manipulated without having to render the entire page again and again in the web browser, and requests and responses over the XMLHttpRequest protocol are structured XML documents.
Using AJAX approach in our system enables users to be able to integrate Google Maps with the Geo-science data in the form of layers (from WMS) or plotting (feature data from WFS). Regarding WFS, it provides vector data (points or line strings) in the GML format encoded in XML. GML contains content and presentation information for the feature data. Google maps are able to be plotted by using its own libraries after extracting the presentation data (OGC call them as Geometry elements such as points and line strings) through parsing of the GML.
By layering or/and plotting geo-science data on the Google maps, we obtain more detailed and informatory maps. As an example, I can see if my house is constructed on an earthquake fault through layering and in right zoom level.
39. What are the disadvantages of using AJAX and Web Services together (if there is…)?
This framework 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.
40. What are the challenges in your architecture?
The biggest challenge is the handling the messages going through different protocols before accessing the receiver. Web Services and AJAX use different protocols for the data transfer. AJAX uses HTTP based XMLHttpRequest protocol and Web Services use SOAP over HTTP protocol (they also use SMP but in our implementations we use SOAP). They have no common message protocols to transfer messages and data.
41. Can you use Google Maps to display geo-science data directly instead of using your integration approach?
First of their concern is commercial not scientific. It is not efficient for integrating and displaying scientific data over the Google Maps by using their libraries. There are a couple of reasons for that but the most important one is that they use DOM parsing internally and it is not memory and performance efficient when you need to display data larger then about 4MB. With our approach we can display even 30MB of XML based geo-science data in a reasonable time period.
42. What is the general architecture (approach for the involving AJAX)?
The major contribution of the proposed architecture is that users interact with the Web Service based GIS services through the AJAX enabled GIS client user interface.
AJAX uses HTTP GET/POST requests (through JavaScript’s XMLHttpRequest) for the message transfers (see (A) in Figure). Web Services use Simple Object Access Protocol (SOAP) as a communications protocol (see (B) in Figure). In order to be able to integrate these two different message protocols, we convert the message format from one protocol to another. Since there is no ready to use common protocol to handle messages communications between AJAX and Web Services, we implemented a simple message conversion technique (see (C) in Figure). This essentially works by having the XMLHttpRequest communicate with a servlet, which in turn acts as a client to a remote Web service. This allows us to easily convert between SOAP invocations and HTTP POSTS. It also has the benefit of avoiding JavaScript sandbox limitations: normally the XmlHttpRequest object in the browser can only interact with its originating Web server.
In order to get better view of the figure, please click on it.
This is actually a usage scenario of the general architecture explained in Q42 with some extensions. In order to fulfill this task we need to use base architecture.
Please see the figure below in order to understand the architecture in general before reading below explanations. There are two different path working in parallel by the given user parameters created by the client actions. Actions are interpreted by the browser through the Google Mapping tools on Layer 1. JavaScript captures these actions by ActionListeners and Google Binding APIs and gives to Layer-2 object.
Each layer is represented as JavaScript object. In our architecture we can utilize all the WMS Web Service interfaces such as “getMap”, “getCapabilities” and “getFeatureInfo”. The client does not need to make rendering or mapping jobs to create the map image. The map is consists of two layers one is coming from Google and other is coming from WMS. The layer returned by WMS is in a ready to use format such as JPEG or PNG or TIFF. The Layer returned by Google is a JavaScript object. In order to overlay these, we convert the layer coming from WMS into a JavaScript object before overlaying.
44. How do you integrate Google Maps with WFS?
This is actually a usage scenario of the general architecture explained in Q42 with some extensions. In order to fulfill this task we need to use base architecture.
Before reading the answer please see the figure below in order to better understand the architecture. WFS provide feature data in vector format and vector data are encoded in GML according to OGC WFS specifications. GML is an XML encoding for the transport and storage of geographic information, including both the geometry and properties of geographic features.Client makes “getFeature” request and, the GML file encoded in XML is returned in a SOAP envelope. After getting a response, the client extracts geometry elements. The most important and commonly used geometry elements are Points, LineStrings, LinearRings, and Polygons. Even though Google Mapping API supports just two of them, Points and LineStrings, the other geometry elements can also be converted to these two types with minor updates. Having extracted and obtained geometry elements, these elements are plotted over the Google Map by using “GPoints” and “GPolylines” objects and the “mapOverlay” function of the Google Map API. By setting returned GML’s non-geometry elements and using ‘GMarker” object of the Google API, this architecture also provides the “getFeatureInfo” functionalities of the OGC WMS services. All these tasks are achieved by using XMLHttpRequest API and JavaScript functionalities.
Figure-a is about Google and WMS integration. The layer is coming from WMS is overlaid on Google map. This is a real output from the IESS application done in los Alamos National Lab. Layers coming from WMS are consists of two feature data. These are Natural gas and electric power pipelines.Figure-b is about Google and WFS integration. Application is done at Community Grids Lab (CGL) for Pattern Informatics, earthquake forecast application. In this sample application output we show California Earthquake seismic data plotted on Google maps as GIcons. You can even query data interactively by clicking on it as shown on the figure.
In order to get better view of the figure, please click on it.
Status Report for 04/04/2007
SUMMARY OF MY RESEARCH
Please first see "FAQ About OGC Compatible GIS Systems - Definitions" Posted: 03/25/07
(See FAQ About OGC Compatible Map Services - Development Posted: 03/28/07)
I. Building OGC Compatible Web Map Services (WMS) with Web Service Principles
<> Integration with WFSs and other WMSs
<> Implementing as Web Services
<> Capability-Based WMS Federations
<> Performance issues with archived data access and rendering
(See FAQ About Smart Map Tools (SMT) Posted: 04/04/07)
II. Smart Map Tools (SMT) Tools
<>WMS Client
<>Interactive data querying
<>Streaming map movies capability for the time-dependent feature data
<>Integrating AJAX Approach
.........Layer based integration of Google maps and OGC’s WMS maps
........ Overlaying features from WFS over Google Maps
(See FAQ About Creating Streaming Map Movies Posted: 04/04/07)
III. Building Architectural Framework for Creating Streaming Map Movies:
<>Publishing streams through JMF libraries.
<>Enhanced SMT with movie capabilities
<>Easy to display movie streams
..........from Collaboration sessions
......... from standalone JMF client program
(See FAQ About Sci-Plotting Services Posted: 04/04/07)
IV. SCI-Plotting Services (%60 completed)
<>Implementing in Web Service principles
<>Data Conversion (from … to VOTable)
<>Provides layers compatible to be overlaid on WMS maps a and/or Google Maps