[Geoserver-devel] search locations question

After a bit of encouragement this week I am almost ready to submit the Managed File API proposal.

Before I do I wanted a to ask for the historical background on GeoServerResourceLoader “search locations”.

Reviewing the code we end up with the following:

  1. base directory (determined using lookupGeoServerDataDirectory)
  2. base directory / data (is this for backwards compatibility?)
  3. application context / WEB-INF
  4. application context /
  5. absolute file references: the API supports the use of find( parent, location ) - which performs a check for absolute file references. I cannot find much evidence that this is used - code such as security or style pass in the appropriate data directory folder.

Search locations recorded as a Set so no order is assumed when searching (so using search locations to “override” data directory settings would not work)


Jody Garnett

So here is an example:

Search Location base dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data/data
Search Location additional dir: /Users/jody/java/geoserver/jive/src/main/./target/default8117989407937039007data/WEB-INF


Jody Garnett

On 20 February 2014 at 12:58:59 pm, Jody Garnett (jody.garnett@anonymised.com) wrote:

After a bit of encouragement this week I am almost ready to submit the Managed File API proposal.

Before I do I wanted a to ask for the historical background on GeoServerResourceLoader “search locations”.

Reviewing the code we end up with the following:

  1. base directory (determined using lookupGeoServerDataDirectory)
  2. base directory / data (is this for backwards compatibility?)
  3. application context / WEB-INF
  4. application context /
  5. absolute file references: the API supports the use of find( parent, location ) - which performs a check for absolute file references. I cannot find much evidence that this is used - code such as security or style pass in the appropriate data directory folder.

Search locations recorded as a Set so no order is assumed when searching (so using search locations to “override” data directory settings would not work)


Jody Garnett

Hi Jody,
I believe the search location business was created fully by Justin.
At least I have no clue why we are searching more locations than
just the data directory

Cheers
Andrea

···

On Thu, Feb 20, 2014 at 11:16 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So here is an example:

Search Location base dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data/data
Search Location additional dir: /Users/jody/java/geoserver/jive/src/main/./target/default8117989407937039007data/WEB-INF


Jody Garnett

On 20 February 2014 at 12:58:59 pm, Jody Garnett (jody.garnett@anonymised.com) wrote:

After a bit of encouragement this week I am almost ready to submit the Managed File API proposal.

Before I do I wanted a to ask for the historical background on GeoServerResourceLoader “search locations”.

Reviewing the code we end up with the following:

  1. base directory (determined using lookupGeoServerDataDirectory)
  2. base directory / data (is this for backwards compatibility?)
  3. application context / WEB-INF
  4. application context /
  5. absolute file references: the API supports the use of find( parent, location ) - which performs a check for absolute file references. I cannot find much evidence that this is used - code such as security or style pass in the appropriate data directory folder.

Search locations recorded as a Set so no order is assumed when searching (so using search locations to “override” data directory settings would not work)


Jody Garnett


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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

== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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


Thanks Andrea:

I just did not want to hurt anyones feelings (or production stability) by removing useful functionality. So far the only deal breaker I can find is some security code that accesses WEB-INF/web.xml

Well we will see what Justin says, but I feel simplification (although rare for GeoServer) may be in order.

···

On Thu, Feb 20, 2014 at 11:16 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So here is an example:

Search Location base dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data/data
Search Location additional dir: /Users/jody/java/geoserver/jive/src/main/./target/default8117989407937039007data/WEB-INF


Jody Garnett

On 20 February 2014 at 12:58:59 pm, Jody Garnett (jody.garnett@anonymised.com) wrote:

After a bit of encouragement this week I am almost ready to submit the Managed File API proposal.

Before I do I wanted a to ask for the historical background on GeoServerResourceLoader “search locations”.

Reviewing the code we end up with the following:

  1. base directory (determined using lookupGeoServerDataDirectory)
  2. base directory / data (is this for backwards compatibility?)
  3. application context / WEB-INF
  4. application context /
  5. absolute file references: the API supports the use of find( parent, location ) - which performs a check for absolute file references. I cannot find much evidence that this is used - code such as security or style pass in the appropriate data directory folder.

Search locations recorded as a Set so no order is assumed when searching (so using search locations to “override” data directory settings would not work)


Jody Garnett


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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

== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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


Yes I believe it’s obsolete now. I believe we might have been using a while back to load resources from WEB-INF but don’t think that is the case any longer. So yeah, thinking it is probably something that can be killed.

···

On Thu, Feb 20, 2014 at 3:55 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Thanks Andrea:

I just did not want to hurt anyones feelings (or production stability) by removing useful functionality. So far the only deal breaker I can find is some security code that accesses WEB-INF/web.xml

Well we will see what Justin says, but I feel simplification (although rare for GeoServer) may be in order.


Jody Garnett

On 20 February 2014 at 9:26:20 pm, Andrea Aime (andrea.aime@anonymised.com) wrote:

Hi Jody,
I believe the search location business was created fully by Justin.
At least I have no clue why we are searching more locations than
just the data directory

Cheers
Andrea


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

On Thu, Feb 20, 2014 at 11:16 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So here is an example:

Search Location base dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data/data
Search Location additional dir: /Users/jody/java/geoserver/jive/src/main/./target/default8117989407937039007data/WEB-INF


Jody Garnett

On 20 February 2014 at 12:58:59 pm, Jody Garnett (jody.garnett@anonymised.com) wrote:

After a bit of encouragement this week I am almost ready to submit the Managed File API proposal.

Before I do I wanted a to ask for the historical background on GeoServerResourceLoader “search locations”.

Reviewing the code we end up with the following:

  1. base directory (determined using lookupGeoServerDataDirectory)
  2. base directory / data (is this for backwards compatibility?)
  3. application context / WEB-INF
  4. application context /
  5. absolute file references: the API supports the use of find( parent, location ) - which performs a check for absolute file references. I cannot find much evidence that this is used - code such as security or style pass in the appropriate data directory folder.

Search locations recorded as a Set so no order is assumed when searching (so using search locations to “override” data directory settings would not work)


Jody Garnett


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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

== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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


Thanks Justin, I was indeed able to remove dependence on search locations, tests pass, etc…

···

Jody Garnett

On Fri, Feb 21, 2014 at 3:35 AM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Yes I believe it’s obsolete now. I believe we might have been using a while back to load resources from WEB-INF but don’t think that is the case any longer. So yeah, thinking it is probably something that can be killed.

On Thu, Feb 20, 2014 at 3:55 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Thanks Andrea:

I just did not want to hurt anyones feelings (or production stability) by removing useful functionality. So far the only deal breaker I can find is some security code that accesses WEB-INF/web.xml

Well we will see what Justin says, but I feel simplification (although rare for GeoServer) may be in order.


Jody Garnett

On 20 February 2014 at 9:26:20 pm, Andrea Aime (andrea.aime@anonymised.com) wrote:

Hi Jody,
I believe the search location business was created fully by Justin.
At least I have no clue why we are searching more locations than
just the data directory

Cheers
Andrea


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

On Thu, Feb 20, 2014 at 11:16 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So here is an example:

Search Location base dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data
Search Location additional dir: ./target/default8117989407937039007data/data
Search Location additional dir: /Users/jody/java/geoserver/jive/src/main/./target/default8117989407937039007data/WEB-INF


Jody Garnett

On 20 February 2014 at 12:58:59 pm, Jody Garnett (jody.garnett@anonymised.com) wrote:

After a bit of encouragement this week I am almost ready to submit the Managed File API proposal.

Before I do I wanted a to ask for the historical background on GeoServerResourceLoader “search locations”.

Reviewing the code we end up with the following:

  1. base directory (determined using lookupGeoServerDataDirectory)
  2. base directory / data (is this for backwards compatibility?)
  3. application context / WEB-INF
  4. application context /
  5. absolute file references: the API supports the use of find( parent, location ) - which performs a check for absolute file references. I cannot find much evidence that this is used - code such as security or style pass in the appropriate data directory folder.

Search locations recorded as a Set so no order is assumed when searching (so using search locations to “override” data directory settings would not work)


Jody Garnett


Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk


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

== Our support, Your Success! Visit http://opensdi.geo-solutions.it 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