<div dir="ltr"><div class="gmail_extra">On Thu, Dec 22, 2016 at 4:10 PM, Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias@opengis.ch" target="_blank">matthias@opengis.ch</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alessandro<br>
<span class="gmail-"><br>
><br>
> In Lyon we also talked about how to share caches between different<br>
> server processes, do you think that the shared memory segment would be<br>
> appropriate in that case?<br>
<br>
</span>What are the caches used for?<br></blockquote><div><br></div><div>mainly per-project capabilities.<br><br></div><div>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.<br><br></div><div>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).<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I wouldn't exclude a shared-memory segment per-se but I also cannot say<br>
it's THE solution. I'm not sure if there's a general answer to it.<br>
<br>
Whatever it is, it needs to be properly protected against concurrent<br>
access and possible deadlocks.<br>
<span class="gmail-"><br></span></blockquote><div><br></div><div>I guess that in case of an external caching backend this would not be a problem.<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">
> For a cache it does not matter if it's not persistent.<br>
><br>
> The idea would be to have the server honour the 12 factors patterns.<br>
<br>
</span>I'm not familiar with it, but as far as I can tell, all requirements to<br>
a cache are listed on the process page (<a href="https://12factor.net/processes" rel="noreferrer" target="_blank">https://12factor.net/<wbr>processes</a>)<br>
which looks quite sensible to me.<br>
<br>
Regards<br>
<span class="gmail-HOEnZb"><font color="#888888">Matthias<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div>