[Qgis-developer] [QGIS Server] How to share QgsPostgresSharedData between multiple QGIS instances

Matthias Kuhn matthias at opengis.ch
Thu Dec 22 04:29:54 PST 2016


Hi René-Luc

>
> Do you have an idea  on a way to share a QgsPostgresSharedData between
> multiple QGIS instances ?

There are different approaches to this:

 * Use a shared memory segment http://doc.qt.io/qt-5/qsharedmemory.html
   in this case, if the server is restarted, anything will be gone
   This might introduce data corruption if someone tries to do an update
   with a fid obtained before the restart which collides with a newly
   created fid.

 * Use some persistent storage like a sqlite database to cache the keys

 * Use a reproducible algorithm to generate the fid<->pk mapping
   (something similar to qHash)

Regards
Matthias


More information about the Qgis-developer mailing list