hotosm / osm-tasking-manager2

Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
http://tasks.hotosm.org
Other
425 stars 156 forks source link

Don't check for updates if request is idle #924

Closed pgiraud closed 7 years ago

pgiraud commented 7 years ago

Several request to check_for_updates may be sent without receiving any response from server. We should wait for a request to finish before we send a new one.

See https://github.com/hotosm/osm-tasking-manager2/issues/918#issuecomment-269900076

CloCkWeRX commented 7 years ago

Probably a bit heavyweight for TM2, but push notifications/websockets have worked well for me with brokers like Mosquitto in the past.

https://pypi.python.org/pypi/paho-mqtt/1.1 for example is a python client for backend code to interact, https://eclipse.org/paho/clients/js/ is a frontend library for it. MQTT as a protocol supports 'topics' like "project/345/task/789"

... so could be used for real time messaging to all project participants, or real time comments/state changes.

We use it for presence/google docs like "who is viewing this": image ... to avoid locking code

and we also use it for location tracking via owntracks (a bit less relevant for TM2)

pgiraud commented 7 years ago

I'd love to have some publish/subscribe support in the TM. This would be helpful for map, activity, stats updates as well as real time messaging. But I didn't have the opportunity to give it a deep try mostly because I wanted it to be integrated in the application core code in order to keep the installation as easy as possible.