[QGIS-Developer] Make QGIS-Server more modular and specialized?

Alessandro Pasotti apasotti at gmail.com
Tue Sep 29 22:42:09 PDT 2020


On Tue, Sep 29, 2020 at 9:37 PM Andreas Neumann <a.neumann at carto.net> wrote:
>
> Hi Alessandro and Matthias,
>
> Oh - I did not know about https://github.com/qgis/QGIS/pull/37682
>
> How do I use this if I compile QGIS Server from source? How can I
> disable/enable the components?

Hi Andreas,

If you don't want some services you can just delete the generated
".so"  and they won't be loaded.

>
> And yes - a "bad list" or "good list" would also be interesting to have.
>

That isn't difficult to do, I've already sketched it to be able to run
some CI tests.

> Yes - probably as you say - not a speed gain to expect from it - and
> probably size of qgis_mapserv.fcgi and memory consumption wouldn't
> shrink much either?
>

Not probably, certainly you'll gain:

- a very small amount of memory, just for the executable shared
objects ".so" memory storage
- 0 speed or something so close to 0 that would be not measurable anyway
- 0 size of the fcgi or of the standalone development server, because
all services are already modules (shared objects ".so") and they are
dynamically loaded as "plugins" at runtime (which accounts for the
memory).

> About GetPrint: yes, we could reroute requests with a reverse proxy to
> different instances, depending on the URL containing GetPrint commands
> or not.

Yeah, that's probably the best/easiest way.

Kind regards

>
> Thanks to both of you for your replies,
>
> Andreas
>
> Am 29.09.20 um 19:17 schrieb Alessandro Pasotti:
> > On Tue, Sep 29, 2020 at 6:48 PM Andreas Neumann <a.neumann at carto.net> wrote:
> >> Dear QGIS (Server) devs,
> >>
> >> I wonder if it would be possible to make QGIS server more "modular" in a future version? I mean that at compile time you could decide which services should be enabled and which not? Example: if you are only interested in WMS, could you switch off all the other services?
> > Hi Andreas,
> >
> > It is already possible, at the service level, we now have separate
> > packages for the different services so you can actually install only
> > what you want.
> >
> > See: https://github.com/qgis/QGIS/pull/37682
> >
> > But I doubt that you will gain any speed: the part of the code that
> > decides what service is invoked is really fast compared to the rest of
> > the processing.
> >
> > Another simple thing I was thinking about is to have a service
> > "badlist" or a "goodlist" where we list in an environment variable the
> > services that we want to be loaded (or not loaded)
> >
> > Cheers
> >
> >
> >> Another usage scenario: a larger installation of QGIS server might want to separate server instances for WMS, WFS or other services and assign different resources to it.
> >>
> >> Also, would it be possible to make QGIS Server a bit leaner/smaller/faster that way - or is the stuff the makes QGIS Server "fat" mainly the qt dependencies?
> >>
> >> Thanks for the discussion,
> >>
> >> Andreas
> >>
> >> _______________________________________________
> >> QGIS-Developer mailing list
> >> QGIS-Developer at lists.osgeo.org
> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> >



-- 
Alessandro Pasotti
QCooperative:  www.qcooperative.net
ItOpen:   www.itopen.it


More information about the QGIS-Developer mailing list