Skip to main content

Building a Geospatial Information System, Part 2: A real world application using Web 2.0, SOA, and SCA principles

Angel Tomala-Reyes (aetomala@us.ibm.com), Software Engineer, IBM
Angel Tomala-Reyes photo
Angel E. Tomala-Reyes is a software engineer for the IBM Corporate Information Office. Before joining IBM's CIO development team, he worked for IBM Global Services building distributed ticketing systems and other complex J2EE applications and integration solutions. He is focused on designing and implementing front-end applications using some of the latest technologies in the Web space. His mission is to create highly effective and highly adaptable user interfaces and to advance IBM's enterprise products.
Murali Vridhachalam photo
Murali Vridhachalam, an Open Group certified IT architect, has been involved with XBRL since early 2005. He was the lead architect for IBM's first ever submission of financial reports using XBRL, as part of the SEC's XBRL voluntary filing program. His current interests include SOA and Software as a Service offerings built using the IBM enterprise software portfolio.

Summary:  Businesses, schools, and governmental institutions are increasingly using geospatial information systems (GIS) to solve real-world problems. GIS offers many new ways to visualize information, collaborate, and do business. Web 2.0 GIS applications have started targeting end user audiences (as opposed to professional audiences). This article explores how GIS applications built with Web 2.0 interfaces and technologies result in more interactivity, lower cost, higher performance, and satisfied users.

View more content in this series

Date:  21 Apr 2009
Level:  Introductory
Activity:  7517 views

Introduction

This series discusses how businesses, schools, and government institutions are increasingly using geospatial information systems (GIS) to solve real-world problems. GIS offers exciting new ways to visualize information, collaborate, and do business. In Part 1 you learned the basics of GIS. It covered open source and proprietary software considerations, a basic GIS architecture, and how GIS is used to solve problems in various industries.

Part 3 will have lessons learned from architecting and building the GIS, and recommendations for extensibility, scalability, and performance.

This article provides details on how to build a Web 2.0 GIS using Service Oriented Architecture (SOA) and Services Component Architecture (SCA). Learn how to build a GIS with several open source products and freely available services on the Web.


Requirements of the system

The architecture of the example application should meet the following high level requirements.

  • The GIS system should allow:
    • Casual end users to view a map with water basin delineations, to view data about a basin of interest, and to query the results of pre-computed simulations (water balance, water quality, and crop production) for the selected basin.
    • Expert users to authenticate, collaborate with other users, generate user-defined reports, and share the reports with other expert users and the public.
  • Using different predefined inputs, a hydrology model is executed to compute water balance, water quality, and crop production in the river basins. The input and output spatial data for each basin is to be stored in a spatial data store.
  • Other Web sites and RSS/Atom feed readers can consume data from this system.

Use case model

Given the high level requirements, the actors and use cases in Figure 1 were identified. The use case model has four actors:

Casual user
Will only be able to display maps and run queries.
Special users
Register with the system, and need to authenticate, to collaborate with other special users and generate reports.
Administrators
Will be able to manage user roles.
System
Will provide mapping services, run queries against spatial data, and expose APIs that other Web sites can use to display data from this system and RSS/Atom feed readers to read feeds from this system.

Figure 1. Use case model
Use Case Model Diagram

Technology and software products used

To build a GIS system, there are several open source and proprietary software choices available from the enterprise software portfolio offered by IBM and ESRI. This section briefly describes the robust open source and proprietary software used to build the example system in this article.

The solution is deployed in WebSphere Application Server Community Edition V 2.1, ArcGIS Server 9.3 Enterprise Edition with Spatial Extensions, and DB2 9.5 as the data store.

  • WebSphere Application Server Community Edition is an open source lightweight Java EE 5 application server based on open source Apache Geronimo. It harnesses the latest innovations from the open source community, including Apache Tomcat.
  • ArcGIS Server 9.3 Enterprise Edition is a complete server based geographic information system. It provides a rich standards-based platform, extensive GIS capabilities, data management tools, out-of-the-box end user services, visualization (mapping), and spatial analysis. It supports interoperability standards in the GIS domain as published by the Open Geospatial Consortium (OGC). ArcGIS applications are interoperable with clients that read and write Web Map Services (WMS). SOAP and XML can be used for messaging and data transfer over the Web (HTTP). ArcGIS server supports integration with other enterprise systems using SOA implementation. Spatial extensions enable spatial modeling and analysis.

    The University of Minnesota MapServer (commonly called UMN MapServer) is a robust open source alternative to the proprietary ArcGIS Server 9.3. MapServer can display dynamic spatial maps over the Internet. It provides support for display and querying of hundreds of raster, vector, and database formats. It supports popular scripting languages and development environments, such as PHP, Python, Perl, Ruby, Java and .Net .

  • DB2 9.5 is a market-leading relational database that supports XML as a native data type and is able to store spatial data using spatial extenders.

Open source PostgreSQL is a robust relational database, and is supported by ArcGIS Server 9.3. PostgreSQL database can store spatial data using spatial extensions (PostGIS).

Java Persistence API (JPA) is used to access the database. It provides a standards based lightweight persistence framework that lets you manage relational data from Java EE applications with or without an EJB container. JPA draws some of the best ideas from Hibernate, TopLink, JDO and EJB frameworks. JPA requires that you use Java persistence Query Language (JPQL), allowing you to write portable queries that work regardless of the underlying data store. This helps address database migration issues. JPA is a specification, so vendor-specific implementation must be used. For the example, the open source implementation Apache OpenJPA was a robust choice.

For Web 2.0 functions, the example uses ArcGIS API for JavaScript to build the Web mapping applications. It provides an easy-to-use framework for building lightweight Web mapping applications. It is built on the Dojo JavaScript Toolkit, providing access to dijits (Dojo widgets) and other JavaScript tools.

SCA has emerged as a standard in SOA. With SCA, developers will need to focus only on developing business logic. SCA provides a single programming model for invoking a component. It allows a single component to have multiple bindings, and bindings that are configurable.

Apache Tuscany open source SCA implementation was chosen for the example. It simplifies the task of developing SOA solutions by providing a comprehensive infrastructure for SOA development and management that's based on the SCA standard. Service developers are able to create reusable services that only contain business logic. Protocols are pushed out of business logic and are handled through a wide range of pluggable bindings. A single implementation of business logic can be exposed by different bindings. For example, JavaScript Object Notation (JSON)-RPC, Atom, RSS, EJB, and Web services are some of the bindings that can be specified. Applications can easily adapt to infrastructure changes without recoding; protocols are handled with pluggable bindings and quality of services (transaction, security, and so on) are handled declaratively.

To support authentication services and user roles, the example uses open source OpenLDAP as the Lightweight Directory Access Protocol. It is well established, very reliable, and performance is excellent. It can scale to hundreds of millions of objects in data volumes in excess of terabyte, with performance in excess of 22,000 queries per second at sub-millisecond latencies. OpenLDAP offers a rich feature set, and a BerkleyDB back end. Security features include support for SASL, TLS, SSL, IPC, and password policies. It also supports IPv6 and LDIFv1.

Google Charts API, which is available for free, is used to display charts. It returns a PNG-format image in response to a URL. For each image type, size, color and labels can be specified. Applications can make hundreds of thousands of API calls per day.


Component view

The component diagram below shows the static dependency relationships between the components. It describes the structure of the system in terms of its software components, including their responsibilities and how they collaborate to deliver the required functions. Components in the diagram are decomposed into further component models before they complete the specification required for detailed design.


Figure 2. Component diagram
Component View

The interaction diagram, in Figure 3, shows the interactions between individual component instances. It shows how they collaborate to allow JSON objects to be passed from the front end to the back end persistence layer through services facilitated by Dojo and Apache Tuscany.


Figure 3. Interaction
Interaction Diagram

Application architecture

Figure 4 shows how Web 2.0 user interfaces are implemented using ESRI JavaScript API and Dojo. Base maps are displayed by accessing ESRI services using a JavaScript API. All of the business logic on the server side is implemented in Java using Apache Tuscany (SCA). This allowed the business logic to be exposed with multiple bindings, which enabled different types of remote applications to consume data from our system. All geoprocessing (queries against spatial data) and mapping services (basin delineations) are implemented in python and exposed as RESTful services. Remote applications can consume these services without having to go through our Web application front end.


Figure 4. Application architecture
Application Architecture

To display summary data for each basin, Google charting services are used after REST services are invoked to retrieve data from the GIS server. OpenJPA is used to manage all database interactions and transactions using JPQL, which is vendor neutral. Various remote applications implemented using JavaScript, Dojo, Feed readers, and so on consume data from this system using the different bindings. Spatial data accessed by the REST services are stored in a file based data store.

Figure 5 shows a map based user interface from the example application, including a Dojo widget displaying summary data for a water basin.


Figure 5. Map based user interface
Map based User Interface

Summary

You can build feature-rich Web 2.0 GISs using proprietary or open source technologies and freely available services on the Web. Apache Tuscany, an open source implementation of SCA, can help rapid development and deployment of services. The services can be exposed with several bindings that can be consumed by a variety of clients, including other Web applications and RSS/Atom feed readers.


Resources

Learn

Get products and technologies

  • Download IBM product evaluation versions and get your hands on application development tools and middleware products from DB2, Lotus, Rational, Tivoli, and WebSphere.

Discuss

About the authors

Angel Tomala-Reyes photo

Angel E. Tomala-Reyes is a software engineer for the IBM Corporate Information Office. Before joining IBM's CIO development team, he worked for IBM Global Services building distributed ticketing systems and other complex J2EE applications and integration solutions. He is focused on designing and implementing front-end applications using some of the latest technologies in the Web space. His mission is to create highly effective and highly adaptable user interfaces and to advance IBM's enterprise products.

Murali Vridhachalam photo

Murali Vridhachalam, an Open Group certified IT architect, has been involved with XBRL since early 2005. He was the lead architect for IBM's first ever submission of financial reports using XBRL, as part of the SEC's XBRL voluntary filing program. His current interests include SOA and Software as a Service offerings built using the IBM enterprise software portfolio.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and Web services
ArticleID=383394
ArticleTitle=Building a Geospatial Information System, Part 2: A real world application using Web 2.0, SOA, and SCA principles
publish-date=04212009
author1-email=aetomala@us.ibm.com
author1-email-cc=mural@us.ibm.com
author2-email=mural@us.ibm.com
author2-email-cc=lubacher@us.ibm.com

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers