Hi,

As promised here is the current patch set for the geo-location based
Node Map I demonstrated at OUCE2011 in Fulda. I've broken the patch
into 3 distinct parts to make it easier to review and comment on. I'm
also looking for any pointers for good example services on which I can
base any changes (or others can try). My hope is even if the whole set
doesn't get merged we can at least get common lower levels implemented.

So to the patches:

1. Add the concept of node geo-location to the data model

Currently this patch simply add the node_geolocation table which can
be queried higher up. Speaking to David Hustance at the conference he
suggested it might be worth simply adding longitude and latitude
directly to the node table. I'm not averse to this change but before
going ahead we should probably think about additional geo location
information.

In our application space there are couple of other variables that
would be useful to know. These include height and orientation (bearing
and downtilt). While not relevant to a lot of elements useful things
can be done with the data if known. However it probably wouldn't make
sense to extend the node table with this extra information.

Options include a more generic geolocation table to hold variable
amounts of data, abusing the existing asset tables to store additional
location information or some sort of general purpose key/value store
for element meta-data.

I suspect the solution is still to just add lat/lon to the node table
and worry about the rest later. What do people think?

2. Add a number of servlets to support mapping

Currently this hand generates some JSON used by the mapping layer. It
provides two methods currently:

 * getMapViewCategories - fetch a list of categories
 * getMapNodes - fetch a list of nodes based on category

I would probably want to extend getMapNodes to get based on a node id
and child depth instead of just surveillance category.

The greatest criticism of this bit is it avoids the DAO and as a
result doesn't automatically benefit from any ACL's that have been set
up. Seth (I think) also pointed out that OpenNMS already has a number
of libraries that deal with JSON encoding for the OpenNMS RESTful API.

I think the best course of action would to be to convert these
servlets into a properly supported RESTful service. Are there any
existing examples that are particularly good for showing how to
implement the plumbing for an OpenNMS RESTful service?

3. Add a slippy node map

This last patch is pure JavaScript. It uses the OpenLayers JavaScript
library and the previously mentioned servlets to render the map. The
greatest problem with it is it duplicates a lot of the generic mapping
infrastructure which is already in place.

However it is unlikely in the short term that I could get up to speed
with the GWT coding involved to extend the existing Remote Poller map
and replicate the current functionality. However if the first two
additions can be committed with appropriately blessed interfaces then
it reduces this to a simple client only patch which can be replaced
once someone looks at representing nodes in the existing GWT based
machinery.

I did have a brief play with the Remote Poller map trying to get it to
support WMS style OpenLayers maps (rather than XYZ style). Donald
Desloge did give me a hand trying to get it to work and said he might
have a chance to play with that later.

Anyway comments, criticisms and pointers to analogous implementations
gratefully received.

--
Alex.
www.bennee.com/~alex.

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to