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

Alessandro Pasotti apasotti at gmail.com
Thu Dec 22 06:48:54 PST 2016


On Thu, Dec 22, 2016 at 1:29 PM, Matthias Kuhn <matthias at opengis.ch> wrote:

> 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
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>


Hi Matthias,

In Lyon we also talked about how to share caches between different server
processes, do you think that the shared memory segment would be appropriate
in that case?

For a cache it does not matter if it's not persistent.

The idea would be to have the server honour the 12 factors patterns.



-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161222/8e780eaa/attachment-0001.html>


More information about the Qgis-developer mailing list