4

I've been tasked with creating a web app where multiple users can draw on a map and have that reflected to other users in real time. Persistence of the drawing if users leave and come back is important. The server will be ArcGIS Server and the client will be done with the JavaScript API.

I'm pretty sure the best way to do this is with a dynamic map service layer set with a short refresh time, but I'm worried about bandwidth usage. Are there any strategies for minimizing the volume of data sent such as having the server only send what's changed after the first query?

  • Phil Leggetter won an Esri contest a while ago with a real-time mapping application. I can't find it directly but he has some other real-time stuff on GitHub, which might be worth checking out – Stephen Lead Feb 5 '14 at 8:12
2

Instead of just an Dynamic Map Service, I would suggest an hybrid approach.

For older data, which does not get edited(Say older than one day), keep a Dynamic Map service. For data that is being edited and is fresh, use a Feature service, which gives out data as vectors.

Depending on the turnover of edits, and concurrent number of users, this might lead to a saving of bandwidth, and a better user experience of your App.

  • I marked this as the accepted solution but if anyone has other suggestions as well it would be much appreciated. – Jeffery Grajkowski Jan 31 '14 at 23:18
2

This is a really interesting problem. I can think of a solution that I think it will fit your purpose but might implies some maintenance though.

  • Create two feature classes in your geodatabase. Name the first one Redlining, which will contain all your drawings. The second one call it Redlining_RealTime, which will contain only the fresh edits.
  • Create a dynamic Map Service and let it fetch data from the Redlining feature class. This should be a "still" dynamic map service i.e. you do not need to refresh it periodically.

  • Create another Feature Map Service point it to Redlining_RealTime. This is where your users will sketch their drawing and saves data to. setup this service on your javascript API code so it refreshes dynamically every certain interval.

  • Now the tricky part. Create a python script that appends all features from Redlining_RealTime into Redlining feature class, then make sure to truncate the Redlining_RealTime feature class. This way this feature class will be fresh and clean.

  • Schedule the script to run at midnight everyday. This way you will get a clean Redlining_RealTime table, which will be refreshed only to get the day's edits.

For a bonus performance boost, update your python script so it builds the cache for the Redlining map service as well. Set your new tile map service with JPG so it minimizes the bandwidth to fraction and avoid database requests to ArcGIS for Server all together. If you are concerted about the detailed of the drawing, use PNG or higher resolution image drawing for caching.

Hope this helps

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.