Need to "update" existing geoevents instead of duplicating them.

2873
9
09-18-2013 04:40 PM
Highlighted
New Contributor
I'm trying to have Geoevent Processor listen to a feed that sends that same points out periodically, but some of the points update or move. How can I just overwrite the existing geoevents rather than duplicating them?

Thanks,

-- Jason
Reply
0 Kudos
9 Replies
Highlighted
Esri Regular Contributor
Hello Jason -

What output connector are you using?  There are connectors for writing GeoEvent data to a feature service as new/updated features. You'll want to look at 'Add a feature' and 'Update a Feature' and create an output connector for updating features, if you're target output is a feature service.

- RJ
Reply
0 Kudos
Highlighted
New Contributor
I was using add a feature for my out, and now using the "update a feature" I see that the points do in fact get updated in the database, but they don't "refresh" in my map viewer (Flex), however the new features I add do refresh on my viewer.

Is there some kind of caching happening in my viewer?

I'm also noticing that after a minute or so the features get deleted.

Thanks!
Reply
0 Kudos
Highlighted
Esri Regular Contributor
Client-side viewers must actively refresh their displays. In the Introduction to GeoEvent Processor tutorial's 'Making Features Come Alive' exercise, we use the Operations Dashboard because, as a web map viewer, it can be configured to refresh its display automatically every 1, 5, 10, ... seconds. It seems odd that your viewer is displaying features which are "updated" as new rows are added to the database table, but not displaying the features whose existing entries were updated.

As for features getting deleted after a minute or so - have you configured the 'Update a Feature' output connector to delete old features? That is the only part of the GeoEvent Processor workflow you've described which would attempt to remove data from your output dataset.

- RJ
Reply
0 Kudos
Highlighted
New Contributor
I don't have "Delete Old Features" enabled, however I did enable it at one point but turned it off, and it definitely seems like it's behaving with it enabled.
Reply
0 Kudos
Highlighted
Esri Regular Contributor
Thank you for checking to confirm that the output connector you're using in your GeoEvent Service is not still configured to delete old features. I suspect that an old output connector, still configured and running, may be responsible for the periodic deletion of features. An Input does not need to be participating in a GeoEvent Service to receive event input. Likewise an Output does not necessarily need to be participating in a GeoEvent Service to have an effect on the system.

If you want to export an XML of your GeoEvent Processor configuration I'll take a look and see if I can find anything to explain the behavior you're observing with features being deleted.

- RJ
Reply
0 Kudos
Highlighted
New Contributor
I restarted the Geoevent processor service and now it stopped deleting features now.

Yea it's strange that I'd get new features but yet existing features that get changed don't get updated on the viewer. I tried setting the disableClientCaching to true as well as the cachePolicy to OFF and that didn't seem to change anything.

I tried a layerRefresh script I found on the esri forums, but it makes all the points flash each time. I think I could settle for having the new and updated features refresh when I move the map like it does with new features now. Is there anything else I could try?
Reply
0 Kudos
Highlighted
Esri Regular Contributor
I've been told that in the next update to ArcGIS Online, the map viewer will support a configurable refresh interval. You might look for that capability and use AGOL to view a web map rather than relying on a Flex-based map viewer. If you can live with a user needing to pan or zoom to force a display refresh, I suppose that's another option, but I don't have any good high-level suggestions for avoiding the display flicker/flash when you need to frequently and programmatically refresh feature layers to update a map display.

I know that the Operations Dashboard was developed using the Windows WPF SDK for ArcGIS Runtime. That choice of development platform may be what's providing the ability to smoothly update features on the display, but I really don't know. That development is handled by another team; if you're interested I can probably find someone who can discuss the technical implementation. Every other client application map viewer I've seen tends to flicker or flash when the feature layers are updated.

There are techniques a developer can use to "blit" graphics from a secondary buffer into a primary graphics buffer. Basically you're building an image from the feature data and then copying a prerendered image to the graphics buffer being used by the viewer. That's really low-level graphics manipulation though, not something that you'd be able to do using one of the Web APIs, Flex in your case, to build a simple map viewer.
Reply
0 Kudos
Highlighted
New Contributor III
Also check out the JavaScript API v3.6 and particulary the StreamLayer class. StreamLayers read from a websocket for which GEP has an output connector!

/Erik
Reply
0 Kudos
Highlighted
Occasional Contributor II
you can add a refresh, in the flexviewer, to an operational layer. As long as the data is getting updated in the database, add the refresh code, should look something like this
        <layer label="Vehicle Location" type="dynamic" visible="true" alpha="1.0"                 
                   url="http://[servername]/arcgis/rest/services/[webservicename]/MapServer" autorefresh="3">
      <sublayer id="0" popupconfig="popups/PopUp_IncidentPoints.xml"/>
        </layer> 


I am doing the same thing except I created two feature classes one for current and the other historic, flexviewer works like it should
Reply
0 Kudos