<div dir="ltr">hi all,<div><br></div><div>I'll try to reimplement - as metioned - I think, the right place to do this is in the "pywps-demo" repo (or at least as an example in documentation)</div><div><br></div><div>however, last time I was atempting to implement this feature, I faced some issues regarding apache variables export and wsgi</div><div><br></div><div>will let you know</div><div><br></div><div>i hope, you like at least the "simple" version of the wsgi script, as proposed in my jachym/pywps/122_documentation branch  <a href="https://github.com/jachym/PyWPS/blob/122_documentation/wsgi/pywps.wsgi">https://github.com/jachym/PyWPS/blob/122_documentation/wsgi/pywps.wsgi</a></div><div><br></div><div>so, basically, all you want is to replace 6 to 22 with </div><div><br></div><div>cfg = os.env['PYWPS_CFG']</div><div>processes = pywps.utils.processes_from_dir(os.env['PYWPS_PROCESSES'])</div><div><br></div><div>and it should work, right?</div><div><br></div><div>J</div></div><br><div class="gmail_quote"><div dir="ltr">st 3. 8. 2016 v 21:02 odesílatel Jonas Eberle <<a href="mailto:jonas.eberle@gmx.de">jonas.eberle@gmx.de</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">Hi all, </div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">I second this request as I like the way to store processes in a directory as we did in PyWPS 3 and not touching the wsgi file for any new process. </div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">Cheers,</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">Jonas</div></div></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br><br><span>----- Am 3. Aug 2016 um 20:28 schrieb Tom Kralidis <<a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a>>:<br></span><div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt">Hi Luís: consider this PyWPS 4 based application wrapper:<br><a href="https://github.com/geopython/demo.pywps.org/blob/master/PyWPS/wps.wsgi" target="_blank">https://github.com/geopython/demo.pywps.org/blob/master/PyWPS/wps.wsgi</a>.<br>I specifically have to call out the processes when initializing the<br>application, i.e.:<br><br>from pywps.app import Service<br>from cite.processes import HelloWorld<br>os.environ['PYWPS_CFG'] = 'cite/cite.cfg'<br>application = Service(processes=[HelloWorld()])<br><br>I would much rather do:<br><br>from pywps.app import Service<br>from cite.processes import HelloWorld<br>os.environ['PYWPS_CFG'] = 'cite/cite.cfg'<br>os.environ['PYWPS_PROCESSES'] = '/path/to/a/dir/of/processes'  # or<br>this could also be specified in the configuration if desired<br><br>application = Service()  # PYWPS_CFG and PYWPS_PROCESSES drive the application<br><br>This way I don't have to update any application code if I add<br>processes via some other workflow.  In addition, I can use this single<br>WSGI file setup and have, say, Apache settings like:<br><br>WSGIScriptAlias /wps1 /osgeo/<a href="http://demo.pycsw.org/pycsw/csw.wsgi" target="_blank">demo.pycsw.org/pycsw/csw.wsgi</a><br>WSGIScriptAlias /wps2 /osgeo/<a href="http://demo.pycsw.org/pycsw/csw.wsgi" target="_blank">demo.pycsw.org/pycsw/csw.wsgi</a><br>...<br>WSGIScriptAlias /wps1000 /osgeo/<a href="http://demo.pycsw.org/pycsw/csw.wsgi" target="_blank">demo.pycsw.org/pycsw/csw.wsgi</a><br><br><br>SetEnvIf Request_URI "/wps1" PYCSW_CONFIG=/path/to/wps1.cfg<br>SetEnvIf Request_URI "/wps2" PYCSW_CONFIG=/path/to/wps2.cfg<br>...<br>SetEnvIf Request_URI "/wps1000" PYCSW_CONFIG=/path/to/wps1000.cfg<br><br>Hope this helps clarify things?<br><br>..Tom<br><br>On Wed, Aug 3, 2016 at 3:00 AM, Luí­s de Sousa<br><<a href="mailto:luis.de.sousa@protonmail.ch" target="_blank">luis.de.sousa@protonmail.ch</a>> wrote:<br>> Tom,<br>><br>> I am not sure I entirely understand this. What do you mean by "mapping<br>> endpoints"?<br>><br>> PyWPS-4 is now just a library, or an API, if you will. It is totally<br>> insulated from web server aspects. On a first glance, these scalability<br>> issues must be solved at application level.<br>><br>> Cheers,<br>><br>> Luís<br>><br>> -------- Original Message --------<br>> Subject: Re: [Pywps-dev] process discovery<br>> Local Time: 2 August 2016 10:58 PM<br>> UTC Time: 2 August 2016 20:58<br>> From: <a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a><br>> To: <a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>><br>> All: as per today's PSC meeting bringing this thread up again.<br>><br>> Per below, a great feature of PyWPS 3 is multi-tenancy against<br>> a single deployment. For example, I can have a single WSGI<br>> wrapper along with environ['PYWPS_CFG'] and<br>> environ['PYWPS_PROCESSES'] as part of the process.<br>><br>> This, in combination with mapping endpoints to environment<br>> variables allows PyWPS to scale with 1..n WPS endpoints which<br>> use the same single WSGI wrapper. One can have 1000 PyWPS<br>> configuration files and this approach scales accordingly. As<br>> well, one can scale processes on a single server with the same<br>> approach.<br>><br>> Unless I am mistaken (which is quite possible) it appears that<br>> PyWPS master/moving forward to PyWPS 4 requires that a<br>> simple wrapper explicitly define processes [1].<br>><br>> Is there another way to accomplish the pluggable features<br>> of PyWPS 3 currently?<br>><br>><br>> [1] <a href="https://github.com/geopython/pywps-demo/blob/master/demo.py#L60" target="_blank">https://github.com/geopython/pywps-demo/blob/master/demo.py#L60</a><br>><br>><br>>>><br>>>> -------- Original Message --------<br>>>> Subject: [Pywps-dev] process discovery<br>>>> Local Time: March 4, 2016 1:20 AM<br>>>> UTC Time: March 4, 2016 1:20 AM<br>>>> From: <a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a><br>>>> To: <a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>>>><br>>>> Hi all: I'm setting up <a href="http://demo.pywps.org" target="_blank">http://demo.pywps.org</a> as a demo space to<br>>>> serve PyWPS instances as required. The goal here is a minimal<br>>>> configuration (assuming a PyWPS install), along with some Apache<br>>>> setup.<br>>>><br>>>> In PyWPS 3, there was functionality to define a PYWPS_PROCESSES<br>>>> environment variable. There was also the ability to define this in the<br>>>> PyWPS<br>>>> config. Looks like this is not available in master branch<br>>>> anymore.<br>>>><br>>>> Any plans on adding this back in the codebase? The value here is being<br>>>> able to deploy a single WPS (in my case WSGI) wrapper which operates<br>>>> against multiple configurations and processes setups driven by a given<br>>>> endpoint.<br>>>><br>>>> Or is there another/better way to acheive this?<br>>>><br>>>> ..Tom<br>>>> _______________________________________________<br>>>> pywps-dev mailing list<br>>>> <a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>>>> <a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pywps-dev</a><br>>>><br>>>><br>>><br>> _______________________________________________<br>> pywps-dev mailing list<br>> <a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pywps-dev</a><br>><br>><br>_______________________________________________<br>pywps-dev mailing list<br><a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pywps-dev</a></blockquote></div></div></div></div>_______________________________________________<br>
pywps-dev mailing list<br>
<a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pywps-dev</a></blockquote></div>