[Qgis-developer] [QGIS Server] How to share QgsPostgresSharedData between multiple QGIS instances
Alessandro Pasotti
apasotti at gmail.com
Thu Dec 22 08:06:40 PST 2016
On Thu, Dec 22, 2016 at 4:10 PM, Matthias Kuhn <matthias at opengis.ch> wrote:
> Hi Alessandro
>
> >
> > 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?
>
> What are the caches used for?
>
mainly per-project capabilities.
With QGIS 3 refactoring the QgsProject class will probably hold all the
information we need instead of parsing the project XML like we are doing
now, I think that we'll need to cache the QgsProject instance itself if we
want scalability by spawning multiple server processes without the need to
re-parse the project file, this in case we need to serve multiple projects
of course.
I was more oriented at a memcached/redis backend that would scale well if
the server instances are running on different containers (in that case the
shared memory will no work).
> I wouldn't exclude a shared-memory segment per-se but I also cannot say
> it's THE solution. I'm not sure if there's a general answer to it.
>
> Whatever it is, it needs to be properly protected against concurrent
> access and possible deadlocks.
>
>
I guess that in case of an external caching backend this would not be a
problem.
> > 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.
>
> I'm not familiar with it, but as far as I can tell, all requirements to
> a cache are listed on the process page (https://12factor.net/processes)
> which looks quite sensible to me.
>
> Regards
> Matthias
>
--
Alessandro Pasotti
w3: www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161222/bb5c6e5a/attachment-0001.html>
More information about the Qgis-developer
mailing list