[Pywps-dev] process discovery

Jonas Eberle jonas.eberle at gmx.de
Wed Aug 3 12:02:03 PDT 2016


Hi all, 

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. 

Cheers, 
Jonas 

----- Am 3. Aug 2016 um 20:28 schrieb Tom Kralidis <tomkralidis at gmail.com>: 

> Hi Luís: consider this PyWPS 4 based application wrapper:
> https://github.com/geopython/demo.pywps.org/blob/master/PyWPS/wps.wsgi.
> I specifically have to call out the processes when initializing the
> application, i.e.:

> from pywps.app import Service
> from cite.processes import HelloWorld
> os.environ['PYWPS_CFG'] = 'cite/cite.cfg'
> application = Service(processes=[HelloWorld()])

> I would much rather do:

> from pywps.app import Service
> from cite.processes import HelloWorld
> os.environ['PYWPS_CFG'] = 'cite/cite.cfg'
> os.environ['PYWPS_PROCESSES'] = '/path/to/a/dir/of/processes' # or
> this could also be specified in the configuration if desired

> application = Service() # PYWPS_CFG and PYWPS_PROCESSES drive the application

> This way I don't have to update any application code if I add
> processes via some other workflow. In addition, I can use this single
> WSGI file setup and have, say, Apache settings like:

> WSGIScriptAlias /wps1 /osgeo/demo.pycsw.org/pycsw/csw.wsgi
> WSGIScriptAlias /wps2 /osgeo/demo.pycsw.org/pycsw/csw.wsgi
> ...
> WSGIScriptAlias /wps1000 /osgeo/demo.pycsw.org/pycsw/csw.wsgi

> SetEnvIf Request_URI "/wps1" PYCSW_CONFIG=/path/to/wps1.cfg
> SetEnvIf Request_URI "/wps2" PYCSW_CONFIG=/path/to/wps2.cfg
> ...
> SetEnvIf Request_URI "/wps1000" PYCSW_CONFIG=/path/to/wps1000.cfg

> Hope this helps clarify things?

> ..Tom

> On Wed, Aug 3, 2016 at 3:00 AM, Luí­s de Sousa
> <luis.de.sousa at protonmail.ch> wrote:
> > Tom,

> > I am not sure I entirely understand this. What do you mean by "mapping
> > endpoints"?

> > PyWPS-4 is now just a library, or an API, if you will. It is totally
> > insulated from web server aspects. On a first glance, these scalability
> > issues must be solved at application level.

> > Cheers,

> > Luís

> > -------- Original Message --------
> > Subject: Re: [Pywps-dev] process discovery
> > Local Time: 2 August 2016 10:58 PM
> > UTC Time: 2 August 2016 20:58
> > From: tomkralidis at gmail.com
> > To: pywps-dev at lists.osgeo.org

> > All: as per today's PSC meeting bringing this thread up again.

> > Per below, a great feature of PyWPS 3 is multi-tenancy against
> > a single deployment. For example, I can have a single WSGI
> > wrapper along with environ['PYWPS_CFG'] and
> > environ['PYWPS_PROCESSES'] as part of the process.

> > This, in combination with mapping endpoints to environment
> > variables allows PyWPS to scale with 1..n WPS endpoints which
> > use the same single WSGI wrapper. One can have 1000 PyWPS
> > configuration files and this approach scales accordingly. As
> > well, one can scale processes on a single server with the same
> > approach.

> > Unless I am mistaken (which is quite possible) it appears that
> > PyWPS master/moving forward to PyWPS 4 requires that a
> > simple wrapper explicitly define processes [1].

> > Is there another way to accomplish the pluggable features
> > of PyWPS 3 currently?


> > [1] https://github.com/geopython/pywps-demo/blob/master/demo.py#L60



> >>> -------- Original Message --------
> >>> Subject: [Pywps-dev] process discovery
> >>> Local Time: March 4, 2016 1:20 AM
> >>> UTC Time: March 4, 2016 1:20 AM
> >>> From: tomkralidis at gmail.com
> >>> To: pywps-dev at lists.osgeo.org

> >>> Hi all: I'm setting up http://demo.pywps.org as a demo space to
> >>> serve PyWPS instances as required. The goal here is a minimal
> >>> configuration (assuming a PyWPS install), along with some Apache
> >>> setup.

> >>> In PyWPS 3, there was functionality to define a PYWPS_PROCESSES
> >>> environment variable. There was also the ability to define this in the
> >>> PyWPS
> >>> config. Looks like this is not available in master branch
> >>> anymore.

> >>> Any plans on adding this back in the codebase? The value here is being
> >>> able to deploy a single WPS (in my case WSGI) wrapper which operates
> >>> against multiple configurations and processes setups driven by a given
> >>> endpoint.

> >>> Or is there another/better way to acheive this?

> >>> ..Tom
> >>> _______________________________________________
> >>> pywps-dev mailing list
> >>> pywps-dev at lists.osgeo.org
> >>> http://lists.osgeo.org/mailman/listinfo/pywps-dev



> > _______________________________________________
> > pywps-dev mailing list
> > pywps-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/pywps-dev


> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pywps-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20160803/06404fb5/attachment.html>


More information about the pywps-dev mailing list