Closed pgiraud closed 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": ... to avoid locking code
and we also use it for location tracking via owntracks (a bit less relevant for TM2)
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.
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