Вы находитесь на странице: 1из 4

2008 International Conference on Internet Computing in Science and Engineering

Building Improved GIS Service Based on WSRF

Zhiming GUI, Kai SONG


Department of Computer Science, Beijing University of Technology, Beijing, China
zmgui@bjut.edu.cn

Abstract an improved map service system in this way using the


open source grid toolkit-Globus and Geoserver. Through
To implement some complex geoprocessing functions, it the process, it illustrates how to improve the existing
may need to integrate several different GIS service. Due OWS to get more efficient and enable chained
to the low level HTTP Get/Post method only support geoprocessing.
synchronous data queries and could not keep service
context information, the current OpenGIS Web Service 2. Improve OWS Using WSRF
(OWS) architecture can not meet the requirement of
chained geoprocessing. Though the OpenGIS Message According to the content OWS provide, it can be
Framework (OMF, discussing paper of OGC) provides a divided into data service and execution service. The data
mechanism to favor service chaining in OWS, it does not service such as WMS, WFS and WCS provides the
clearly illustrate how to implement it. With the coming of sharing of geospatial data through the open interface. The
Web Service Resource Framework (WSRF), it provides a execution service such as WPS, it provides the spatial
feasible way to enables the service chain. This paper first processing on the data from the web or from the other
analyzes the WSRF and compares it with the OWS data service. The collaboration of GIS service requires
architecture. Then it provides a method on converting the that the execution service be coupled to data service.
OWS under WSRF. The detailed progress of implementing However, it is difficult to accomplish this target while the
an improved map service using Globus Toolkit is OWS currently can only perform one task on one
provided at the end. The result shows it get better requirement. It leads to the result of one task can not be
performance and collaborative than standard OWS. resend to the other service without another web request. It
also brings lower efficiency if the users wish to carry out
1. Introduction further processing on the returned data. Though the OMF
provides a message framework which intends to separate
The current OWS such as WMS, WFS and WCS the data (state) from the action (service) and favors
support very simple synchronous data queries based on chained geoprocessing, it has not illustrate how to
HTTP transport protocol. The lower level HTTP implement it. To improve the cooperation and enable
GET/POST method is perfect valid in the case of simple chained geoprocessing of current OWS, it needs to find
synchronous queries of information from an end-user out a way to keep and address the output message of
client such as a browser or a viewer application. With the OWS.
coming of service chain (a sequence of services where,
for each adjacent pair of services, occurrence of the first 2.1 WSRF and Stateful Web Service
action is necessary for the occurrence of the second
action.) which needs high level communication between With the rapid development of Grid technology and
web services, the current OWS message method could not OGSA (Open Grid Service Architecture), it provides an
meet the new requirement [1]. The use cases developed in ideal framework for the service management and
OWS1.2 have identified a number of requirements for the cooperation. The most important requirement of OGSA is
communication between web services that are going that the web service should be stateful. WSRF is a joint
beyond the current existing communication [2]. Aiming to effort by the Grid and Web Services communities. It is
these questions, the OGC provides OMF (OWS Message the infrastructure on which OGSA is built. It improves
Framework) to conduct communications between the several aspects of web services to make them more
OWS in its interoperability program. However, it is still a adequate for grid application. It provides a mechanism to
discussing paper. With the rapid development of Grid represent “state”. In WSRF, a stateful web service is a
technology, the WSRF provides a standard way to meet plain web service with a resource, a pairing of a Web
the new requirement of OWS. In this paper, we discuss an service with a resource is called a WS-Resource. The state
approach on adapting the OWS according to the information are seemed as WS-ResourceProperties and
requirement of WSRF. And we designs and implements stored inside resource properties in WSRF. Making the

978-0-7695-3112-0/08 $25.00 © 2008 IEEE 274


DOI 10.1109/ICICSE.2008.12
state information as ResourceProperties will brings great DescribeFeatureType retrieves feature definitions in GML
efficiency benefit while the client wishes to carry out schema. In WSRF, it should be attached to WSDL port
further processing on the result of previous invocation. It type as XML schema. WSRF: WFS incorporates
also contributes to more collaborative between different reference to resourceproperties schema in WSDL
web services. description like this:
WSRF-WFS:
2.2 WS-ResoucePropeties and OGIS message <wsdl:types>
<element name=’MyFeature’ type=’MyFeatureType’
In WSRF, the Web service‘s state is modeled by substitutionGroup=’gml:_Feature’>
wrapping atomic or composite data types called </wsdl:types>
WS-Resource properties in WS-Resources [3]. What need <wsdl:portType name=’WFS’
to do with making OWS stateful is to modify and wrap its wsrp:resourceProperties=’MyFeature’>
input/output message the way WSRF manipulates the
WS-ResourceProperties does. 2.3 Adding Notification to OWS
In WSRF, it provides several actions to manipulate the
value of the resource such as getResourceProperties, Due to notification message is very hard to implement
setResourceProperties,GetMultipleResourceProperties, in HTTP without some serious hacking, the current OWS
QueryResourceProperties. We map it to the OGIS do not provide the notification service. When the client
interface as the following method using the OGC: WFS as want to know what the status of a specific message
the example and illustrate how it can improve the processing, adding notification is extremely useful for the
efficiency and enable chained geoprocessing for the WFS. long transaction. In WSRF, the WS-Notification defines a
As for the OGC: WFS GetFeature operation, it can standard Web services approach to notification using a
select an collection of feature like this, topic-based publish/subscribe pattern. Adding notification
getFeature (<wfs:GetFeature> service to WSRF version OWS using WS-Notification is
<wfs:Query typeName="topp:states"> illustrated in part-3.
<ogc:Filter>
<ogc:PropertyIsEqualTo> 3. Implementation of Improved GIS Service
<ogc:PropertyName>prevail</ogc:PropertyName>
<ogc:Literal>5</ogc:Literal> Here, we convert the OGC: WMS according to the
</ogc:PropertyIsEqualTo> requirement of WSRF as the example. OWMS is one kind
</ogc:Filter> of OGC Portrayal Services belongs to OGC Web Service
</wfs:Query> model and it specifies a means for a client to request a
</wfs:GetFeature>) rendered, projected, cartographically styled map image
If we want to carry out further process on the result set, from a service. The OWMS specification defines a
it could not be done by OGC: WFS since the result is not number of request types, and for each of request type it
kept in server anymore. However, it can be done using defines a set of query parameters and associated
XPath in WSRF as: behaviors. There are three main interfaces in OWMS:
QueryResourceProperties(”<QueryExpression>//MyFeatu GetMap, GetFeatureInfo and Get Capabilities. Get
re[@fid=’state.3’]</QueryExpression>”) if we model the Feature Info returns the information of some special
result as Resource. element s on the map. GetCapabilities: return an XML
This expression retrieves the feature which ID is equal document with metadata containing WMS Information.
to 3 from the result set get from the previous request. GetMap: return an image as specified by a user. To
However, OGC: WFS can do much more complex queries implement the WMS as the WSRF requirement, the first
than simply selecting on feature ID as in this example, it step is to define the input/output parameters of these
needs to compare in more detail the OGC: Filter interfaces as ResourceProperties, and then redefine the
specification with the WSRF resource property query service's interface using WSDL.
operations.
As for the transaction operation such as insert, update, 3.1 ResourceProperties Definition
updateGeom in OGC: WFS, though
WSRF:SetResourceProperties can do part of this job, it There are several parameters in these interfaces. Not
still needs further research to mapping all these operations every parameter in input/output message is suitable to be
to WSRF interface for set and modify these resource modeled as Resource. We should first decide which
properties. information should be made as Resource. Let use the
As for the checking of data integrity and determine GetMap interface as the example.
whether the data can be processed, the OGC: WFS A typical OWMS GetMap call looks like this:

275
URL= service to the portType, it should be extended from the
http://127.0.0.1:8080/geoserver/wms?bbox=-130,24,-66,5 standard NotificationProducer portType.
0&styles=population&Format=image/png&request=Get Assume the Getmap operation return the target map’s
Map&layers=topp:states&width=550&height=250&srs=E URL address as a String, and then we can define the
PSG:4326 GetMap interface in the portType element as:
As we can see from this URL, every time we make a <portType name="MapServicePortType"
new Getmap quest, many parameters with the same value wsdlpp:extends="wsrpw:GetResourceProperty
in the previous call are send again in the URL. Since the wsrpw:GetMultipleResourceProperties
most frequently change parameter is BBOX and the other wsrpw:SetResourceProperties
parameters are comparatively much stable, we choose the wsrpw:QueryResourceProperties"
FORMAT, VERSION, LAYERS, WIDTH, HEIGHT and wsdlpp:extends="wsrpw:GetResourceProperty
SRS as the state information. Since we will use the wsntw:NotificationProducer"
Globus Toolkit to implement the service later, here we wsrp:ResourceProperties="tns:MapServiceResourcePrope
use the WSRF and Globus specific WSDL to redefine the rties">
interface. The state information can be defined as <operation name="GetMap">
resource properties using WSDL like this: <input message="tns:GetMapInputMessage"/>
<!-- RESOURCE PROPERTIES --> <output message="tns:GetMapOutputMessage"/>
<xsd:element name="VERSION" type="xsd:String"/> </operation>
<xsd:element name="LAYERS" …….
type="xsd:String"/> </portType>
<xsd:element name="STYLES" type="xsd:String"/> <types>
<xsd:element name="SRS" type="xsd:String"/> …… <!-- REQUESTS AND RESPONSES -->
<xsd:element name="FORMAT" type="xsd:String"/> <xsd:element name="GetMap" >
…….. <xsd:complexType name=”BBox”>
<xsd:element name="MapServiceResourceProperties"> <xsd:sequence>
<xsd:complexType> <xsd:element name="minx" type="xsd:Float"/>
<xsd:sequence> <xsd:element name="miny" type="xsd:Float"/>
<xsd:element ref="tns:VERSION" minOccurs="1" <xsd:element name="maxx" type="xsd:Float"/>
maxOccurs="1"/> <xsd:element name="maxy" type="xsd:Float"/>
<xsd:element ref="tns: LAYERS " minOccurs="1" …….
maxOccurs="1"/> </xsd:sequence>
<xsd:element ref="tns: STYLES " minOccurs="1" </xsd:complexType>
maxOccurs="1"/> <xsd:element name="GetMapResponse"
<xsd:element ref="tns: SRS " minOccurs="1" type=”xsd:String”/>
maxOccurs="1"/> The other two portType can be defined the same way.
<xsd:element ref="tns: FORMAT " minOccurs="1"
maxOccurs="1"/> 3.3 Implement the Service
......
</xsd:sequence> After define the interface using WSDL, we use Globus
</xsd:complexType> Toolkit 4 and JAVA to program it. The GT4 is a famous
</xsd:element> software toolkit, developed by The Globus Alliance,
which we can use to program grid-based applications.
3.2 PortType Definition First, a QNames interface is defined for all the
members of ResourceProperties according to the WSDL
We have set some input message as definition. Next, according to the requirement of WSRF
ResourceProperties, we need not to include the layerlist and GT4, we split the implementation into three classes,
and stylelist in the message again since at the most one for the Map Service, one for the Resource and one for
situation it is the same. And now the Getmap interface the ResouceHome. Here we use the Singleton design
can be predigest to only one parameter: BBox. model to implement the service. The ResourcrHome class
There are a bit different in the portType definition is extended from an existing class included in the GT
between the normal WSDL and the WSRF specific toolkit, SingletonResourceHome. The only thing to do is
WSDL. The most difference is the Resource properties implement the findSingleton method in it.
attribute of portType element, which is used to descript The MapserviceResource class implements the
the state information. Furthermore, to add notification Resource, ResourceProperties and TopicListAccessor
interface of GT4 JAVA WS-Core library. The

276
MapService class has three main methods corresponding same way since the main information is kept in the server
to the OWMS interface. To simplify its implementation, side.
we set the initial value for the ResourceProperties in the Our current work has not incorporate many useful
MapService construct method. We also use an open WSRF functions such as lifecycle management and
source OWMS implementation - Geoserver as the map security. In the future, we will incorporate it into our
engine. While a client calls the Getmap method of the system. And high performance data transfer is one
map service, the method just creates an OWMS Getmap prominent challenge in GIS service, we also needs to do
request URI based on the state information and the value further investigate on it under Grid environment. Now,
of BBox parameter. Then it calls the Geoserver WMS there is a growing interest amongst OGC members to
using the URI. When got the address of the target map, it explore Grid technology. The incorporating of OGC
returns the address to the client. technology with the WSRF functionalities will provides
more personalized, efficient on-demand geospatial data
3.4 A Simple Client Instance access and services to data users.

This simple client only tests how the Mapservice can Reference
keep state and invocate continuous GetMap request
without sending duplicated information as OGC: WMS [1] OGC, OWS Messaging Framework (OMF), Open GIS
does. Since the initial value for generate a getMap request Consortium, Inc. OGC Document 03-029,2003
has been assigned to the Mapservice in its construct
method, this client do not use the set/get [2] Aijun Chen, “An optimized Grid-based, OGC
standards-compliant collaborative software system for
ResourceProperties method. It just makes two getMap call serving NASA geospatial data”, Proceedings of the 30th
with different BBOX value to get two maps with the Annual IEEE/NASA Software Engineering, 2006
different scale. Its code and result is listed below. pp.159-166.
MapServiceAddressingLocator locator = new
MapServiceAddressingLocator(); [3] The Globus Project, “The Globus Toolkit”,
EndpointReferenceType endpoint = new http://www.globus.org/toolkit, 2006.
EndpointReferenceType();
endpoint.setAddress(new Address(URI)); [4] P. Vretanos, OpenGIS Web Feature Service (WFS)
MapPortType map = Implementation Specification, version 1.1, OGC 2005.
locator.getMapPortTypePort(endpoint); [5] Zaslavsky, C. Baru, “Grid-enabled Mediation Services
……. for Geospatial Information”, Next Generation Geospatial
Map.getMap(BBox1); Information, Volume 1, Part 2 July 2005, pp. 15-25.
Map.getMap(BBox2);
[6] Ian Foster, Carl Kesslman, “The Physiology of the
Grid-An Open Grid Services Architecture for
Distributed Systems Integration”,
http://www.globus.org/research/papers/ogsa.pdf

[7] Asif Akram, “Implement resource sharing using WSRF”,


https://www6.software.ibm.com/developerworks/educati
on/gr-resws1/
Figure 1: The Result of Client ZoomOut
The client shows that the parameters are reduced to [8] A.Chen, L.Di, “Grid Computing enabled geospatial
only BBox and the server need not to handle the other catalogue web service”, Proceedings of ASPRS 2005
parameters as OGC: WMS does. It brings higher Annual Conference, Mar. 7-11, 2005, Baltimore, USA.
efficiency.
[9] Yanfeng Shu, “A Grid-enabled Architecture for
Geospatial Data Sharing”, Proceedings of the 2006
4 Conclusion and Future Work IEEE Asia-Pacific Conference on Services Computing
pp. 369-375.
In this work, we studied on improve the OWS using
WSRF. The OWS input/output message are mapping to [10] Scott Pezanowski, “An Open GeoSpatial
WSRF ResourceProperties and it bring higher efficient Standards-Enabled Google Earth Application to Support
and enables chained geoprocessing. In our current demo Crisis Management”, Proceedings of the 3rd
application, the collaboration between different GIS International Symposium on Geo-information for
service has not been tested. However, it can be done the Disaster Management.

277

Вам также может понравиться