[Geoserver-devel] ResourceStore API change proposal

After some further discussion with Jody, I've cooked up the following proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes.

Please don't hesitate to give feedback.

Kind Regards
Niels

On Thu, Aug 13, 2015 at 1:13 PM, Niels Charlier <niels@anonymised.com> wrote:

After some further discussion with Jody, I've cooked up the following
proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes
.

Please don't hesitate to give feedback.

Wrong link :slight_smile:

Correct one:
https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes
.

Cheers
Andrea

--

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 Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
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.

-------------------------------------------------------

Ciao Andrea,
I don't see this one either.

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 Poggio alle Viti 1187
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 Thu, Aug 13, 2015 at 3:02 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

On Thu, Aug 13, 2015 at 1:13 PM, Niels Charlier <niels@anonymised.com> wrote:

After some further discussion with Jody, I've cooked up the following
proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes.

Please don't hesitate to give feedback.

Wrong link :slight_smile:

Correct one:
https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes.

Cheers
Andrea

--

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 Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
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.

-------------------------------------------------------

------------------------------------------------------------------------------

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Look at it, you posted the exact identical same thing as I did :slight_smile: The problem is the dot at the end, it isn’t considered part of the link by our email software. I got rid of the dot. Now it should work on this link: Regards Niels

···

On 13-08-15 15:02, Andrea Aime wrote:

On Thu, Aug 13, 2015 at 1:13 PM, Niels Charlier <niels@anonymised.com> wrote:

After some further discussion with Jody, I’ve cooked up the following
proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

Please don’t hesitate to give feedback.

Wrong link :slight_smile:

Correct one: https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes

Fun and games…

Here is a new link https://github.com/geoserver/geoserver/wiki/GSIP-132 (I try and name all to proposal in a similar fashion).

Niels I cleaned up the code examples / list formatting for markdown. Please review.

···

On 13 August 2015 at 06:25, Niels Charlier <niels@anonymised.com> wrote:

On 13-08-15 15:02, Andrea Aime wrote:

Look at it, you posted the exact identical same thing as I did :slight_smile:

The problem is the dot at the end, it isn’t considered part of the link by our email software. I got rid of the dot.
Now it should work on this link:
https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes

Regards
Niels


Jody Garnett

On Thu, Aug 13, 2015 at 1:13 PM, Niels Charlier <niels@anonymised.com> wrote:

After some further discussion with Jody, I’ve cooked up the following
proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

Please don’t hesitate to give feedback.

Wrong link :slight_smile:

Correct one: https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

Added a note about removing Resources.delete( resource ) as it will no longer be needed.

And also +1.

···

On 13 August 2015 at 07:37, Jody Garnett <jody.garnett@anonymised.com> wrote:

Fun and games…

Here is a new link https://github.com/geoserver/geoserver/wiki/GSIP-132 (I try and name all to proposal in a similar fashion).

Niels I cleaned up the code examples / list formatting for markdown. Please review.


Jody Garnett


Jody Garnett

On 13 August 2015 at 06:25, Niels Charlier <niels@anonymised.com> wrote:

On 13-08-15 15:02, Andrea Aime wrote:

Look at it, you posted the exact identical same thing as I did :slight_smile:

The problem is the dot at the end, it isn’t considered part of the link by our email software. I got rid of the dot.
Now it should work on this link:
https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes

Regards
Niels

On Thu, Aug 13, 2015 at 1:13 PM, Niels Charlier <niels@anonymised.com> wrote:

After some further discussion with Jody, I’ve cooked up the following
proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

Please don’t hesitate to give feedback.

Wrong link :slight_smile:

Correct one: https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

Niels,

as an aside, some email clients guess that undelimited URIs in plain text emails do not end in trailing punctuation, despite some punctuation characters being perfectly valid in a URI. The recommended solution is to delimit any URIs that might be misinterpreted. One recommendation is to use angle brackets, and I find these to work well in practice.

See "Appendix C. Delimiting a URI in Context" in RFC 3986:
<https://tools.ietf.org/html/rfc3986#appendix-C&gt;

I can confirm that delimiting a URI with angle brackets works perfectly in Thunderbird for plain text emails, even for URIs that end in a period. Try editing your original email to add angle brackets around the URI (including the trailing period), saving it as a draft, then hover over the link while viewing the email in the Drafts folder. You should see that the trailing period is honoured in the URI shown in the Thunderbird status bar.

Kind regards,
Ben.

On 14/08/15 01:25, Niels Charlier wrote:

The problem is the dot at the end, it isn't considered part of the link
by our email software. I got rid of the dot.
Now it should work on this link:
https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

+0. No objection. Trying to think of a case where this might cause problems, but do not know enough about ResourceStore.

On 14/08/15 02:42, Jody Garnett wrote:

Added a note about removing Resources.delete( resource ) as it will no
longer be needed.

And also +1.

--
Jody Garnett

On 13 August 2015 at 07:37, Jody Garnett <jody.garnett@anonymised.com> wrote:

Fun and games..

Here is a new link https://github.com/geoserver/geoserver/wiki/GSIP-132
(I try and name all to proposal in a similar fashion).

Niels I cleaned up the code examples / list formatting for markdown.
Please review.

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Thanks for the tip, Ben!

I didn't really make the link end on a dot consciously - typed it at the end of the page title by accident.

Cheers!
Niels

On 08/14/2015 12:43 AM, Ben Caradoc-Davies wrote:

Niels,

as an aside, some email clients guess that undelimited URIs in plain text emails do not end in trailing punctuation, despite some punctuation characters being perfectly valid in a URI. The recommended solution is to delimit any URIs that might be misinterpreted. One recommendation is to use angle brackets, and I find these to work well in practice.

See "Appendix C. Delimiting a URI in Context" in RFC 3986:
<https://tools.ietf.org/html/rfc3986#appendix-C&gt;

I can confirm that delimiting a URI with angle brackets works perfectly in Thunderbird for plain text emails, even for URIs that end in a period. Try editing your original email to add angle brackets around the URI (including the trailing period), saving it as a draft, then hover over the link while viewing the email in the Drafts folder. You should see that the trailing period is honoured in the URI shown in the Thunderbird status bar.

Kind regards,
Ben.

On 14/08/15 01:25, Niels Charlier wrote:

The problem is the dot at the end, it isn't considered part of the link
by our email software. I got rid of the dot.
Now it should work on this link:
https://github.com/geoserver/geoserver/wiki/GSIP-132---ResourceStore-API-changes

Hi,
+0, already added.

One question, I see this:

But I believe you want to allow a JDBC based store to be plugged. In this situation in the rest of
GeoServer the code uses GeoServerExtensions to lookup an implementation of resource store
once the app-context is setup, and if one is found, it’s used, otherwise a default one is
instantiated.

This one is a bit tricky though, in that the proxy is an implementation itself, but not impossible
to implement using the usual pattern (one just gets all the implementations available and compares
with self).

Cheers
Andrea

···

On Thu, Aug 13, 2015 at 1:13 PM, Niels Charlier <niels@anonymised.com> wrote:

After some further discussion with Jody, I’ve cooked up the following
proposal for ResourceStore API changes:

https://github.com/geoserver/geoserver/wiki/GSIP-132—ResourceStore-API-changes.

Please don’t hesitate to give feedback.

Kind Regards
Niels



Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

==
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 Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
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.


On 14-08-15 19:21, Andrea Aime wrote:

Hi,
+0, already added.

Thanks

One question, I see this:

<bean id="resourceStore" class="org.geoserver.platform.resource.ResourceStoreProxy">
   <property name="delegate" ref="dataDirectoryResourceStore"/>
</bean>

But I believe you want to allow a JDBC based store to be plugged. In this situation in the rest of
GeoServer the code uses GeoServerExtensions to lookup an implementation of resource store
once the app-context is setup, and if one is found, it's used, otherwise a default one is
instantiated.

Is that true? I didn't come across this method. It appears to me that usually either ResourceLoader or GeoServerDataDirectory are used which are injected.

The idea is to replace the bean with name "resourceStore" by the jdbc resource store. The default Resourceloader and GeoServerDataDirectory would then get injected with the jdbc store.

If GeoServerExtensions.bean is used to get the resource store directly (which is not recommended, it is not proper IoC) it is best to get the bean by name and not by class.

This one is a bit tricky though, in that the proxy is an implementation itself, but not impossible
to implement using the usual pattern (one just gets all the implementations available and compares
with self).

I don't understand this sentence :confused: Could you please elaborate

Thanks

Niels