GSIP-162: WMTS cascading

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

GSIP-162: WMTS cascading

Emanuele Tajariol-2
Hi list!

I submitted a GSIP for adding WMTS cascading capabilities to GeoServer, i.e.
the ability to create WMS layers backed by remote WMTS layers.

Here's the GSIP:
   https://github.com/geoserver/geoserver/wiki/GSIP-162

Since the work also requires some changes in GT, here's the related proposal:
   https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader

Looking forward for your feedback.

   Thanks,
   Emanuele

--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
 
The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Torben Barsballe
Hello Emanuele,

There is one immediate concern I see with this change:

There are a number of places, both in core code as well as extensions and community modules, in the GeoServer codebase that use the following pattern:

        if ( r instanceof FeatureTypeInfo ) {
            ...
        }
        else if ( r instanceof CoverageInfo ) {
            ...
        }
        else if ( r instanceof WMSLayerInfo ) {
            ...
        }

A fairly basic search turns up the following places this pattern is likely used:

gs-geofence, gs-gwc, gs-jms-geoserver, gs-main, gs-notification, gs-notification-geonode, gs-restconfig, gs-web-demo, gs-web-gwc, gs-wms

Properly implementing this change would involve modifying and testing each of these modules. 


As an alternative, consider the following approach:

Refactor WMSLayerInfo into a parent interface for both WMSLayerInfo and WMTSLayerInfo:
  • Create a WebServiceInfo interface extending ReosoueceInfo, with common functionality to WMSLayerInfo and WMTSLayerInfo.
  • Refactor all current GeoServer code to use WebServiceInfo in place of WMSLayerInfo
  • Make the currentl WMSLayerInfo extend WebServiceInfo
  • Add WMTSLayerInfo as an extension of WebServiceInfo

Inline image 1
Diagram of the resulting class structure. Interfaces with abstract implementations are in grey.

(The StoreInfo class diagram would be similar)

This is a slightly more stable class structure, and less likely to cause issues in downstream modules, as they can treat WMSLayerInfo and WMTSLayerInfo the same.
This also makes creating new cascaded service stores easier in the future.


Apart from architectural issues, the actual functionality you present here looks useful.

Torben





On Thu, Jul 13, 2017 at 3:26 AM, Emanuele Tajariol <[hidden email]> wrote:
Hi list!

I submitted a GSIP for adding WMTS cascading capabilities to GeoServer, i.e.
the ability to create WMS layers backed by remote WMTS layers.

Here's the GSIP:
   https://github.com/geoserver/geoserver/wiki/GSIP-162

Since the work also requires some changes in GT, here's the related proposal:
   https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader

Looking forward for your feedback.

   Thanks,
   Emanuele

--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

geowolf
In reply to this post by Emanuele Tajariol-2
Hi Emanuele,
it seems like the implementation mimics 1-1 the WMS approach, looks good to me.

Some remarks:
  • If you have not done so already, please send a formal proposal mail to geotools-devel too (for the geotools part)
  • The change seems to have GeoServer core refer to a GeoTools unsupported module. It's not great, but not new either, GeoServer core has been referring to the WFS (gt-wfs before, gt-wfs-ng now) module since... forever, and that module is also unsupported in GeoTools.
Cheers
Andrea


On Thu, Jul 13, 2017 at 12:26 PM, Emanuele Tajariol <[hidden email]> wrote:
Hi list!

I submitted a GSIP for adding WMTS cascading capabilities to GeoServer, i.e.
the ability to create WMS layers backed by remote WMTS layers.

Here's the GSIP:
   https://github.com/geoserver/geoserver/wiki/GSIP-162

Since the work also requires some changes in GT, here's the related proposal:
   https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader

Looking forward for your feedback.

   Thanks,
   Emanuele

--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel



--

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

jody.garnett
In reply to this post by Torben Barsballe
Torben could we do this without introducing additional "info" objects?


Change it so that WebSeviceInfo contains has a "wstype" (similar to "dbtype") that is used to to configure WebServiceInfo with either WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the correct protocol and producing a GridCoverage for the rendering engine.

--
Jody Garnett

On 14 July 2017 at 09:34, Torben Barsballe <[hidden email]> wrote:
Hello Emanuele,

There is one immediate concern I see with this change:

There are a number of places, both in core code as well as extensions and community modules, in the GeoServer codebase that use the following pattern:

        if ( r instanceof FeatureTypeInfo ) {
            ...
        }
        else if ( r instanceof CoverageInfo ) {
            ...
        }
        else if ( r instanceof WMSLayerInfo ) {
            ...
        }

A fairly basic search turns up the following places this pattern is likely used:

gs-geofence, gs-gwc, gs-jms-geoserver, gs-main, gs-notification, gs-notification-geonode, gs-restconfig, gs-web-demo, gs-web-gwc, gs-wms

Properly implementing this change would involve modifying and testing each of these modules. 


As an alternative, consider the following approach:

Refactor WMSLayerInfo into a parent interface for both WMSLayerInfo and WMTSLayerInfo:
  • Create a WebServiceInfo interface extending ReosoueceInfo, with common functionality to WMSLayerInfo and WMTSLayerInfo.
  • Refactor all current GeoServer code to use WebServiceInfo in place of WMSLayerInfo
  • Make the currentl WMSLayerInfo extend WebServiceInfo
  • Add WMTSLayerInfo as an extension of WebServiceInfo

Inline image 1
Diagram of the resulting class structure. Interfaces with abstract implementations are in grey.

(The StoreInfo class diagram would be similar)

This is a slightly more stable class structure, and less likely to cause issues in downstream modules, as they can treat WMSLayerInfo and WMTSLayerInfo the same.
This also makes creating new cascaded service stores easier in the future.


Apart from architectural issues, the actual functionality you present here looks useful.

Torben





On Thu, Jul 13, 2017 at 3:26 AM, Emanuele Tajariol <[hidden email]> wrote:
Hi list!

I submitted a GSIP for adding WMTS cascading capabilities to GeoServer, i.e.
the ability to create WMS layers backed by remote WMTS layers.

Here's the GSIP:
   https://github.com/geoserver/geoserver/wiki/GSIP-162

Since the work also requires some changes in GT, here's the related proposal:
   https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader

Looking forward for your feedback.

   Thanks,
   Emanuele

--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272" target="_blank">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Ian Turton
In reply to this post by Torben Barsballe
I'm pretty sure I tried that approach but ran into issues further down the line. I'm travelling to Paris at present and my laptop is in the hold but I'll check and see if I can find what the issue was. 

Ian 

On 14 Jul 2017 17:35, "Torben Barsballe" <[hidden email]> wrote:
Hello Emanuele,

There is one immediate concern I see with this change:

There are a number of places, both in core code as well as extensions and community modules, in the GeoServer codebase that use the following pattern:

        if ( r instanceof FeatureTypeInfo ) {
            ...
        }
        else if ( r instanceof CoverageInfo ) {
            ...
        }
        else if ( r instanceof WMSLayerInfo ) {
            ...
        }

A fairly basic search turns up the following places this pattern is likely used:

gs-geofence, gs-gwc, gs-jms-geoserver, gs-main, gs-notification, gs-notification-geonode, gs-restconfig, gs-web-demo, gs-web-gwc, gs-wms

Properly implementing this change would involve modifying and testing each of these modules. 


As an alternative, consider the following approach:

Refactor WMSLayerInfo into a parent interface for both WMSLayerInfo and WMTSLayerInfo:
  • Create a WebServiceInfo interface extending ReosoueceInfo, with common functionality to WMSLayerInfo and WMTSLayerInfo.
  • Refactor all current GeoServer code to use WebServiceInfo in place of WMSLayerInfo
  • Make the currentl WMSLayerInfo extend WebServiceInfo
  • Add WMTSLayerInfo as an extension of WebServiceInfo

Inline image 1
Diagram of the resulting class structure. Interfaces with abstract implementations are in grey.

(The StoreInfo class diagram would be similar)

This is a slightly more stable class structure, and less likely to cause issues in downstream modules, as they can treat WMSLayerInfo and WMTSLayerInfo the same.
This also makes creating new cascaded service stores easier in the future.


Apart from architectural issues, the actual functionality you present here looks useful.

Torben





On Thu, Jul 13, 2017 at 3:26 AM, Emanuele Tajariol <[hidden email]> wrote:
Hi list!

I submitted a GSIP for adding WMTS cascading capabilities to GeoServer, i.e.
the ability to create WMS layers backed by remote WMTS layers.

Here's the GSIP:
   https://github.com/geoserver/geoserver/wiki/GSIP-162

Since the work also requires some changes in GT, here's the related proposal:
   https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader

Looking forward for your feedback.

   Thanks,
   Emanuele

--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272" target="_blank">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Simone Giannecchini
In reply to this post by Torben Barsballe
Hi Torben,
while your suggestion makes sense and I have asked Emanuele to take into account I am also a bit reluctant to follow it.

We tried to stick to the current structure (not saying it is good or bad, it is just the way it is) and doing a general refactor now might give us more harm than anything
 as it would introduce instability and open a can of worms.

So let's see what Emanuele says but I would more in favour of refactoring the whole thing separately, even because winter is coming (see other email threads).


Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
==
Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
 
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

On Fri, Jul 14, 2017 at 6:34 PM, Torben Barsballe <[hidden email]> wrote:
Hello Emanuele,

There is one immediate concern I see with this change:

There are a number of places, both in core code as well as extensions and community modules, in the GeoServer codebase that use the following pattern:

        if ( r instanceof FeatureTypeInfo ) {
            ...
        }
        else if ( r instanceof CoverageInfo ) {
            ...
        }
        else if ( r instanceof WMSLayerInfo ) {
            ...
        }

A fairly basic search turns up the following places this pattern is likely used:

gs-geofence, gs-gwc, gs-jms-geoserver, gs-main, gs-notification, gs-notification-geonode, gs-restconfig, gs-web-demo, gs-web-gwc, gs-wms

Properly implementing this change would involve modifying and testing each of these modules. 


As an alternative, consider the following approach:

Refactor WMSLayerInfo into a parent interface for both WMSLayerInfo and WMTSLayerInfo:
  • Create a WebServiceInfo interface extending ReosoueceInfo, with common functionality to WMSLayerInfo and WMTSLayerInfo.
  • Refactor all current GeoServer code to use WebServiceInfo in place of WMSLayerInfo
  • Make the currentl WMSLayerInfo extend WebServiceInfo
  • Add WMTSLayerInfo as an extension of WebServiceInfo

Inline image 1
Diagram of the resulting class structure. Interfaces with abstract implementations are in grey.

(The StoreInfo class diagram would be similar)

This is a slightly more stable class structure, and less likely to cause issues in downstream modules, as they can treat WMSLayerInfo and WMTSLayerInfo the same.
This also makes creating new cascaded service stores easier in the future.


Apart from architectural issues, the actual functionality you present here looks useful.

Torben





On Thu, Jul 13, 2017 at 3:26 AM, Emanuele Tajariol <[hidden email]> wrote:
Hi list!

I submitted a GSIP for adding WMTS cascading capabilities to GeoServer, i.e.
the ability to create WMS layers backed by remote WMTS layers.

Here's the GSIP:
   https://github.com/geoserver/geoserver/wiki/GSIP-162

Since the work also requires some changes in GT, here's the related proposal:
   https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader

Looking forward for your feedback.

   Thanks,
   Emanuele

--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313" target="_blank">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272" target="_blank">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Emanuele Tajariol-2
In reply to this post by geowolf
Hi Andrea,

>    - If you have not done so already, please send a formal proposal mail to
>    geotools-devel too (for the geotools part)

Yep, the thread is here:
http://osgeo-org.1560.x6.nabble.com/JIRA-GEOT-5766-Create-a-CoverageReader-
for-remote-WMTS-td5326189.html#a5326285

It's linked in the GeoTools proposal, which is linked to the GSIP...

>    - The change seems to have GeoServer core refer to a GeoTools
>    unsupported module.

...and I pointed out this aspect in that mail :)
I guess the GeoTools module needs to be promoted to a supported status, but I
expect that this topic will be discussed in the gt-devel mailing list.

   Cheers,
   Emanuele



Alle 18:41:58 di Friday 14 July 2017, Andrea Aime ha scritto:

> Hi Emanuele,
> it seems like the implementation mimics 1-1 the WMS approach, looks good to
> me.
>
> Some remarks:
>
>    - If you have not done so already, please send a formal proposal mail to
>    geotools-devel too (for the geotools part)
>    - The change seems to have GeoServer core refer to a GeoTools
>    unsupported module. It's not great, but not new either, GeoServer core
> has been referring to the WFS (gt-wfs before, gt-wfs-ng now) module
> since... forever, and that module is also unsupported in GeoTools.
>
> Cheers
> Andrea
>
>
> On Thu, Jul 13, 2017 at 12:26 PM, Emanuele Tajariol <[hidden email]>
>
> wrote:
> > Hi list!
> >
> > I submitted a GSIP for adding WMTS cascading capabilities to GeoServer,
> > i.e.
> > the ability to create WMS layers backed by remote WMTS layers.
> >
> > Here's the GSIP:
> >    https://github.com/geoserver/geoserver/wiki/GSIP-162
> >
> > Since the work also requires some changes in GT, here's the related
> >
> > proposal:
> >    https://github.com/geotools/geotools/wiki/Add-a-WMTS-CoverageReader
> >
> > Looking forward for your feedback.
> >
> >    Thanks,
> >    Emanuele
> >
> > --
> > Regards,
> > Emanuele Tajariol
> > ==
> > GeoServer Professional Services from the experts! Visit
> > http://goo.gl/it488V
> > for more information.
> > ==
> >
> > Ing. Emanuele Tajariol
> > Technical Lead
> >
> > GeoSolutions S.A.S.
> > Via di Montramito 3/A
> > 55054  Massarosa (LU)
> > Italy
> > phone: +39 0584 962313
> > fax:      +39 0584 1660272
> >
> > http://www.geo-solutions.it
> > http://twitter.com/geosolutions_it
> >
> > -------------------------------------------------------
> > AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
> > Le informazioni contenute in questo messaggio di posta elettronica e/o
> > nel/i
> > file/s allegato/i sono da considerarsi strettamente riservate. Il loro
> > utilizzo
> > è consentito esclusivamente al destinatario del messaggio, per le
> > finalità indicate nel messaggio stesso. Qualora riceviate questo
> > messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
> > darcene notizia via e-
> > mail e di procedere alla distruzione del messaggio stesso, cancellandolo
> > dal
> > Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in
> > parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per
> > finalità diverse,
> > costituisce comportamento contrario ai principi dettati dal D.Lgs.
> > 196/2003.
> >
> > The information in this message and/or attachments, is intended solely
> > for the
> > attention and use of the named addressee(s) and may be confidential or
> > proprietary in nature or covered by the provisions of privacy act
> > (Legislative
> > Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use
> > not
> > in accord with its purpose, any disclosure, reproduction, copying,
> > distribution, or either dissemination, either whole or partial, is
> > strictly forbidden except previous formal approval of the named
> > addressee(s). If you are not the intended recipient, please contact
> > immediately the sender by telephone, fax or e-mail and delete the
> > information in this message that has
> > been received in error. The sender does not give any warranty or accept
> > liability as the content, accuracy or completeness of sent messages and
> > accepts no responsibility  for changes made after they were sent or for
> > other
> > risks which arise as a result of e-mail transmission, viruses, etc.
> >
> > ------------------------------------------------------------
> > ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Geoserver-devel mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/geoserver-devel


--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
 
The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Torben Barsballe

On Fri, Jul 14, 2017 at 10:20 AM, Jody Garnett <[hidden email]> wrote:
Torben could we do this without introducing additional "info" objects?


Change it so that WebSeviceInfo contains has a "wstype" (similar to "dbtype") that is used to to configure WebServiceInfo with either WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the correct protocol and producing a GridCoverage for the rendering engine.

I think so. Looking at the current WMSLayer / WMSStore interface, it is fairly general already. The only bit that actually depends on the service type is this method in WMSStoreInfo:

    /**
     * Returns the underlying {@link WebMapServer}
     * <p>
     * This method does I/O and is potentially blocking. The <tt>listener</tt> may be used to report
     * the progress of loading the datastore and also to report any errors or warnings that occur.
     * </p>
     * 
     * @param listener
     *            A progress listener, may be <code>null</code>.
     * 
     * @return The datastore.
     * 
     * @throws IOException
     *             Any I/O problems.
     */
    WebMapServer getWebMapServer(ProgressListener listener) throws IOException;

Where WebMapServer extends AbstractOpenWebService<WMSCapabilities, Layer>.

If one was to convert this to an abstract WebServiceInfo, then almost everything would stay the same as in the current WMS__Info, just slightly more general in the case of this one method.

On Fri, Jul 14, 2017 at 10:32 AM, Simone Giannecchini <[hidden email]> wrote:
Hi Torben,
while your suggestion makes sense and I have asked Emanuele to take into account I am also a bit reluctant to follow it.

We tried to stick to the current structure (not saying it is good or bad, it is just the way it is) and doing a general refactor now might give us more harm than anything
 as it would introduce instability and open a can of worms.

My main concern is that adding a new Resource interface has a greater potential to introduce instability then extending / refactoring an existing one, and in ways that may be less immediately apparent.
 
So let's see what Emanuele says but I would more in favour of refactoring the whole thing separately, even because winter is coming (see other email threads).

I would think that picking an approach and sticking with it is less disruptive overall, as well as taking less effort, but I do understand that things are busy for everyone with the upcoming code freeze and everything else.

I would certainly be interested in hearing your thoughts Emanuele.

Torben

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Emanuele Tajariol-2
Hi Torben! Hi Jody!

IMHO I don't see a big advantage in such a refactoring:
- Most of the if/elseif chains contain different logic in the WMS/WMTS blocks,
so the refactoring in a single class (WebServiceInfo  + wstype) would only add
nested IF blocks inside the existing chains. Ugly to see (but that's personal
taste :)), and not helping a lot in "automatically" reducing issues when
dealing with cascaded services.
- The visitors should be changed in order to only handle the WebServiceInfo
case, and, once again, we'd need an IF on the wstype to find out the type and
act accordingly. This would be quite against the visitor pattern itself.
- The configuration persisting logic should be changed a lot, and probably a
migration of the configuration files would be needed, which adds more complexity
to the change.

If we wish to group the WMSLayerInfo and the WMTSLayerInfo in some way, we may
create an empty interface WebServiceInfo and make the WMSLayerInfo and
WMTSLayerInfo implement it. This would probably help in some OR'ed tests in
the form "...|| source instanceof WMSLayerInfo || ...", but I don't see much
more use of this .

As Simone said, we're using the current if/elseif and visitor architecture; a
refactoring involves changing much more code than the current proposal, and
would probably introduce issues on its own.

> My main concern is that adding a new Resource interface has a greater
> potential to introduce instability then extending / refactoring an existing
> one, and in ways that may be less immediately apparent.

Torben, I see your point, but I guess that the possible instabilities would
pop out only when using the new WMTS cascading feature. Introducing a
refactoring, we may make the existing WMS cascaded layers unstable, and that's
a much worse scenario.

> Change it so that WebSeviceInfo contains has a "wstype" (similar to
> "dbtype") that is used to to configure WebServiceInfo with either
> WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the
> correct protocol and producing a GridCoverage for the rendering engine.

Jody, I don't think that the underlying services can be as similar as different
dbms types. Furthermore, this kind of refactoring would require to have the
same class representing both a WMTS and a WMS resource, which may contain
different info and may evolve independently.


   Cheers,
   Emanuele


Alle 00:31:36 di Saturday 15 July 2017, Torben Barsballe ha scritto:

> On Fri, Jul 14, 2017 at 10:20 AM, Jody Garnett <[hidden email]>
>
>  wrote:
> > Torben could we do this without introducing additional "info" objects?
> >
> >
> > Change it so that WebSeviceInfo contains has a "wstype" (similar to
> > "dbtype") that is used to to configure WebServiceInfo with either
> > WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the
> > correct protocol and producing a GridCoverage for the rendering engine.
> >
> > I think so. Looking at the current WMSLayer / WMSStore interface, it is
>
> fairly general already. The only bit that actually depends on the service
> type is this method in WMSStoreInfo:
>
>     /**
>      * Returns the underlying {@link WebMapServer}
>      * <p>
>      * This method does I/O and is potentially blocking. The
> <tt>listener</tt> may be used to report
>      * the progress of loading the datastore and also to report any errors
> or warnings that occur.
>      * </p>
>      *
>      * @param listener
>      *            A progress listener, may be <code>null</code>.
>      *
>      * @return The datastore.
>      *
>      * @throws IOException
>      *             Any I/O problems.
>      */
>     WebMapServer getWebMapServer(ProgressListener listener) throws
> IOException;
>
> Where WebMapServer extends AbstractOpenWebService<WMSCapabilities, Layer>.
>
> If one was to convert this to an abstract WebServiceInfo, then almost
> everything would stay the same as in the current WMS__Info, just slightly
> more general in the case of this one method.
>
> On Fri, Jul 14, 2017 at 10:32 AM, Simone Giannecchini <
>
> [hidden email]> wrote:
> > Hi Torben,
> > while your suggestion makes sense and I have asked Emanuele to take into
> > account I am also a bit reluctant to follow it.
> >
> > We tried to stick to the current structure (not saying it is good or bad,
> > it is just the way it is) and doing a general refactor now might give us
> > more harm than anything
> >
> >  as it would introduce instability and open a can of worms.
> >
> > My main concern is that adding a new Resource interface has a greater
>
> potential to introduce instability then extending / refactoring an existing
> one, and in ways that may be less immediately apparent.
>
> > So let's see what Emanuele says but I would more in favour of refactoring
> > the whole thing separately, even because winter is coming (see other
> > email threads).
> >
> > I would think that picking an approach and sticking with it is less
>
> disruptive overall, as well as taking less effort, but I do understand that
> things are busy for everyone with the upcoming code freeze and everything
> else.
>
> I would certainly be interested in hearing your thoughts Emanuele.
>
> Torben



--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
 
The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

Torben Barsballe
In that case, I guess the current approach is fine.

Torben

On Tue, Jul 18, 2017 at 3:40 AM, Emanuele Tajariol <[hidden email]> wrote:
Hi Torben! Hi Jody!

IMHO I don't see a big advantage in such a refactoring:
- Most of the if/elseif chains contain different logic in the WMS/WMTS blocks,
so the refactoring in a single class (WebServiceInfo  + wstype) would only add
nested IF blocks inside the existing chains. Ugly to see (but that's personal
taste :)), and not helping a lot in "automatically" reducing issues when
dealing with cascaded services.
- The visitors should be changed in order to only handle the WebServiceInfo
case, and, once again, we'd need an IF on the wstype to find out the type and
act accordingly. This would be quite against the visitor pattern itself.
- The configuration persisting logic should be changed a lot, and probably a
migration of the configuration files would be needed, which adds more complexity
to the change.

If we wish to group the WMSLayerInfo and the WMTSLayerInfo in some way, we may
create an empty interface WebServiceInfo and make the WMSLayerInfo and
WMTSLayerInfo implement it. This would probably help in some OR'ed tests in
the form "...|| source instanceof WMSLayerInfo || ...", but I don't see much
more use of this        .

As Simone said, we're using the current if/elseif and visitor architecture; a
refactoring involves changing much more code than the current proposal, and
would probably introduce issues on its own.

> My main concern is that adding a new Resource interface has a greater
> potential to introduce instability then extending / refactoring an existing
> one, and in ways that may be less immediately apparent.

Torben, I see your point, but I guess that the possible instabilities would
pop out only when using the new WMTS cascading feature. Introducing a
refactoring, we may make the existing WMS cascaded layers unstable, and that's
a much worse scenario.

> Change it so that WebSeviceInfo contains has a "wstype" (similar to
> "dbtype") that is used to to configure WebServiceInfo with either
> WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the
> correct protocol and producing a GridCoverage for the rendering engine.

Jody, I don't think that the underlying services can be as similar as different
dbms types. Furthermore, this kind of refactoring would require to have the
same class representing both a WMTS and a WMS resource, which may contain
different info and may evolve independently.


   Cheers,
   Emanuele


Alle 00:31:36 di Saturday 15 July 2017, Torben Barsballe ha scritto:
> On Fri, Jul 14, 2017 at 10:20 AM, Jody Garnett <[hidden email]>
>
>  wrote:
> > Torben could we do this without introducing additional "info" objects?
> >
> >
> > Change it so that WebSeviceInfo contains has a "wstype" (similar to
> > "dbtype") that is used to to configure WebServiceInfo with either
> > WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the
> > correct protocol and producing a GridCoverage for the rendering engine.
> >
> > I think so. Looking at the current WMSLayer / WMSStore interface, it is
>
> fairly general already. The only bit that actually depends on the service
> type is this method in WMSStoreInfo:
>
>     /**
>      * Returns the underlying {@link WebMapServer}
>      * <p>
>      * This method does I/O and is potentially blocking. The
> <tt>listener</tt> may be used to report
>      * the progress of loading the datastore and also to report any errors
> or warnings that occur.
>      * </p>
>      *
>      * @param listener
>      *            A progress listener, may be <code>null</code>.
>      *
>      * @return The datastore.
>      *
>      * @throws IOException
>      *             Any I/O problems.
>      */
>     WebMapServer getWebMapServer(ProgressListener listener) throws
> IOException;
>
> Where WebMapServer extends AbstractOpenWebService<WMSCapabilities, Layer>.
>
> If one was to convert this to an abstract WebServiceInfo, then almost
> everything would stay the same as in the current WMS__Info, just slightly
> more general in the case of this one method.
>
> On Fri, Jul 14, 2017 at 10:32 AM, Simone Giannecchini <
>
> [hidden email]> wrote:
> > Hi Torben,
> > while your suggestion makes sense and I have asked Emanuele to take into
> > account I am also a bit reluctant to follow it.
> >
> > We tried to stick to the current structure (not saying it is good or bad,
> > it is just the way it is) and doing a general refactor now might give us
> > more harm than anything
> >
> >  as it would introduce instability and open a can of worms.
> >
> > My main concern is that adding a new Resource interface has a greater
>
> potential to introduce instability then extending / refactoring an existing
> one, and in ways that may be less immediately apparent.
>
> > So let's see what Emanuele says but I would more in favour of refactoring
> > the whole thing separately, even because winter is coming (see other
> > email threads).
> >
> > I would think that picking an approach and sticking with it is less
>
> disruptive overall, as well as taking less effort, but I do understand that
> things are busy for everyone with the upcoming code freeze and everything
> else.
>
> I would certainly be interested in hearing your thoughts Emanuele.
>
> Torben



--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Reply | Threaded
Open this post in threaded view
|

Re: GSIP-162: WMTS cascading

jody.garnett
In reply to this post by Emanuele Tajariol-2
It just seems odd that for vector and raster stores we can have an extendable approach - but not for web services.

But I do understand - I think it is more that WMS is exceptional with support for more operations (example GetFeatureInfo) while all other web services will look similar to WMTS (just offering remote rendering).



--
Jody Garnett

On 18 July 2017 at 12:40, Emanuele Tajariol <[hidden email]> wrote:
Hi Torben! Hi Jody!

IMHO I don't see a big advantage in such a refactoring:
- Most of the if/elseif chains contain different logic in the WMS/WMTS blocks,
so the refactoring in a single class (WebServiceInfo  + wstype) would only add
nested IF blocks inside the existing chains. Ugly to see (but that's personal
taste :)), and not helping a lot in "automatically" reducing issues when
dealing with cascaded services.
- The visitors should be changed in order to only handle the WebServiceInfo
case, and, once again, we'd need an IF on the wstype to find out the type and
act accordingly. This would be quite against the visitor pattern itself.
- The configuration persisting logic should be changed a lot, and probably a
migration of the configuration files would be needed, which adds more complexity
to the change.

If we wish to group the WMSLayerInfo and the WMTSLayerInfo in some way, we may
create an empty interface WebServiceInfo and make the WMSLayerInfo and
WMTSLayerInfo implement it. This would probably help in some OR'ed tests in
the form "...|| source instanceof WMSLayerInfo || ...", but I don't see much
more use of this        .

As Simone said, we're using the current if/elseif and visitor architecture; a
refactoring involves changing much more code than the current proposal, and
would probably introduce issues on its own.

> My main concern is that adding a new Resource interface has a greater
> potential to introduce instability then extending / refactoring an existing
> one, and in ways that may be less immediately apparent.

Torben, I see your point, but I guess that the possible instabilities would
pop out only when using the new WMTS cascading feature. Introducing a
refactoring, we may make the existing WMS cascaded layers unstable, and that's
a much worse scenario.

> Change it so that WebSeviceInfo contains has a "wstype" (similar to
> "dbtype") that is used to to configure WebServiceInfo with either
> WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the
> correct protocol and producing a GridCoverage for the rendering engine.

Jody, I don't think that the underlying services can be as similar as different
dbms types. Furthermore, this kind of refactoring would require to have the
same class representing both a WMTS and a WMS resource, which may contain
different info and may evolve independently.


   Cheers,
   Emanuele


Alle 00:31:36 di Saturday 15 July 2017, Torben Barsballe ha scritto:
> On Fri, Jul 14, 2017 at 10:20 AM, Jody Garnett <[hidden email]>
>
>  wrote:
> > Torben could we do this without introducing additional "info" objects?
> >
> >
> > Change it so that WebSeviceInfo contains has a "wstype" (similar to
> > "dbtype") that is used to to configure WebServiceInfo with either
> > WMSProtocolStratagy or WMTSProtcolStratagy responsible for speaking the
> > correct protocol and producing a GridCoverage for the rendering engine.
> >
> > I think so. Looking at the current WMSLayer / WMSStore interface, it is
>
> fairly general already. The only bit that actually depends on the service
> type is this method in WMSStoreInfo:
>
>     /**
>      * Returns the underlying {@link WebMapServer}
>      * <p>
>      * This method does I/O and is potentially blocking. The
> <tt>listener</tt> may be used to report
>      * the progress of loading the datastore and also to report any errors
> or warnings that occur.
>      * </p>
>      *
>      * @param listener
>      *            A progress listener, may be <code>null</code>.
>      *
>      * @return The datastore.
>      *
>      * @throws IOException
>      *             Any I/O problems.
>      */
>     WebMapServer getWebMapServer(ProgressListener listener) throws
> IOException;
>
> Where WebMapServer extends AbstractOpenWebService<WMSCapabilities, Layer>.
>
> If one was to convert this to an abstract WebServiceInfo, then almost
> everything would stay the same as in the current WMS__Info, just slightly
> more general in the case of this one method.
>
> On Fri, Jul 14, 2017 at 10:32 AM, Simone Giannecchini <
>
> [hidden email]> wrote:
> > Hi Torben,
> > while your suggestion makes sense and I have asked Emanuele to take into
> > account I am also a bit reluctant to follow it.
> >
> > We tried to stick to the current structure (not saying it is good or bad,
> > it is just the way it is) and doing a general refactor now might give us
> > more harm than anything
> >
> >  as it would introduce instability and open a can of worms.
> >
> > My main concern is that adding a new Resource interface has a greater
>
> potential to introduce instability then extending / refactoring an existing
> one, and in ways that may be less immediately apparent.
>
> > So let's see what Emanuele says but I would more in favour of refactoring
> > the whole thing separately, even because winter is coming (see other
> > email threads).
> >
> > I would think that picking an approach and sticking with it is less
>
> disruptive overall, as well as taking less effort, but I do understand that
> things are busy for everyone with the upcoming code freeze and everything
> else.
>
> I would certainly be interested in hearing your thoughts Emanuele.
>
> Torben



--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Emanuele Tajariol
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: <a href="tel:%2B39%200584%20962313" value="+390584962313">+39 0584 962313
fax:      <a href="tel:%2B39%200584%201660272" value="+3905841660272">+39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza
esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-
mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal
Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the
attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act (Legislative
Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not
in accord with its purpose, any disclosure, reproduction, copying,
distribution, or either dissemination, either whole or partial, is strictly
forbidden except previous formal approval of the named addressee(s). If you
are not the intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message that has
been received in error. The sender does not give any warranty or accept
liability as the content, accuracy or completeness of sent messages and
accepts no responsibility  for changes made after they were sent or for other
risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel