Grid Viewer Service Registry Page
Description
GridViewer is a combination of enterprise Java code, JSP samples, the gmap-polygon project, and the client that can be generated by a GIPSEService (Like GIPSEBiosense). It was developed by Peter White for the NCPHI Grid Lab, and is intended to view data provided by GIPSEServices using Google Maps.
Gmap-Polygon is the main visualization dependency. Currently you need to build and install gmap-polygon in your local maven repository it before attempting to build gridviewer.
Location of source code
The source code for gmap-polygon is located at: https://phgrid.svn.sourceforge.net/svnroot/phgrid/gmap-polygon
The source code for the geolocational data is located in the same repository at https://phgrid.svn.sourceforge.net/svnroot/phgrid/loader-gmaps-polygon/
The source code for gridviewer is located in the same repository at https://phgrid.svn.sourceforge.net/svnroot/phgrid/gridviewer
Deployment instructions
Prerequisites:
- A local build box with subversion, maven, and a servlet container (tomcat, jboss, websphere, etc) installed.
- A database (we use postgres, and MS SQL Server, but if you can get the JSBC drivers for a different database and load the CSV's, feel free to use that different database instead)
Installation/Configuration:
- Load the database with the geodata.
- Download the four database creation scripts from the loader-gmaps-polygon project's "ddl" directory (https://phgrid.svn.sourceforge.net/svnroot/phgrid/loader-gmaps-polygon/ddls) and the three geodata files from the loader-gmaps.polygon project "csv" directory (svn co https://phgrid.svn.sourceforge.net/svnroot/phgrid/loader-gmaps-polygon/csvs csv's).
- Using your databases preferred method, create the tables with the DDLs and upload the data from the CSVs. (the documentation for the postgres method (called COPY) can be found here.)
- Check out, configure, and build the gmap-polygon code from the repository.
- Check out the code from the repository (svn co https://phgrid.svn.sourceforge.net/svnroot/phgrid/gmap-polygon/trunk/ gmap-polygon).
- Configure the test and main database connection properties in the gmap-polygon.filter-example.properties (located in the trunk directory) and rename the file gmap-polygon.filter.properties (also note, you may need to update the pom file with a new JDBC driver dependency if you are not using postgres or sql server as your database)
- Build the package using mvn package.
- If the build tests pass, Install the package into the repository using mvn install.
- Check out, configure, build, and install the grid-viewer code from the repository
- Check out the code (svn co https://phgrid.svn.sourceforge.net/svnroot/phgrid/gridviewer/trunk gridviewer ).
- Configure
- Rename the gridviewer.filter-example.properties to gridviewer.filter.properties.
- Set the a google map key property for the endpoint of your application (example: http://www.mywebsite.com:8080/gridviewer) by going to the google map signup page (you do not need to do this if you will only be viewing gridviewer as only connecting to 'localhost')
- Configure the grid-viewer to discover grid services using either a web-page or a database.
- If web, set serversource to "URL" and fill in the URL
- The server list is denoted by the format ~~[service name]~[service endpoint]~~[service name]~[service endpoint]~~! Grid-viewer can automatically differentiate between secure and non-secure services based on whether the endpoints are http or https (there is an example of the server list format attached to this page: serverlist.txt)
- The serverlist can be hosted wherever the grid-viewer will be able to access it. So if you decide to host the server-list file on a secure local server, configure your network so that grid-viewer can connect to it.
- If the server list is to be hosted in a database, set serversource to "DB" and fill out the database connection details in the properties file.
- One of the DDL's is for the "gvserverlist" table, it will hold the server list and endpoints
- If web, set serversource to "URL" and fill in the URL
- Build the web project using the mvn package command (note, gmap-polygon must be built and installed into the maven repository for this to work)
- If the build tests pass, deploy the resulting war file (located in the target directory) to the servlet container.
Other information
- All service returns including metadata are cached. The cache is currently memory-only LRU style with a limit of 1000 items, and each service return averages about 100 KB. If you do not have a half-gigabyte of memory to dedicate to a web-server, you can adjust the number of items or the caching properties by adjusting the oscache.properties file as defined on the Open Symphony Cache site.
- If you want to clear the cache without restarting the web-application (you will need to if you want to refresh server metadata) point your browser to [gridviewer location]/admin/clearcache.jsp
Link to the gridviewer demo
There is a link to a running gridviewer instance here