[Geoserver-devel] FileWatcher roll call

I am rounding up all the “file watcher” like things for the next ResourceStore API pull request.

So far I have found:

  1. platform FileWatcher (lazy)
  2. security FileWatcher (active - extends Thread)
  3. GeoServerTemplateLoader (extends freemarker templateloader)

So did I miss anyone?

On first inspection these implementations are not used very much, but have the trick of not hitting the file system often. One thing I did not expect was the two file watchers requiring subclassing before use. I will look at replacing this with a strategy object.

Jody Garnett

On Wed, Mar 12, 2014 at 1:42 AM, Jody Garnett <jody.garnett@anonymised.com>wrote:

I am rounding up all the "file watcher" like things for the next
ResourceStore API pull request.

So far I have found:

1) platform FileWatcher<https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/FileWatcher.java&gt;
(lazy)
2) security FileWatcher<https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/security/file/FileWatcher.java&gt; (active
- extends Thread)
3) GeoServerTemplateLoader<https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/template/GeoServerTemplateLoader.java&gt; (extends
freemarker templateloader<http://freemarker.org/docs/api/freemarker/cache/class-use/TemplateLoader.html&gt;
)

For the security file watcher actually using the platform version is
something we wanted to do but never got a chance. So if simplifies things
to remove (2) by all means do. Christian can correct me if i am wrong but I
don't think its required to watch for modifications in a separate head,
actually it adds unnecessary overhead.

So did I miss anyone?

On first inspection these implementations are not used very much, but have
the trick of not hitting the file system often. One thing I did not expect
was the two file watchers requiring subclassing before use. I will look at
replacing this with a strategy object.
--
Jody Garnett

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
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 <https://twitter.com/j_deolive&gt;

Yep, I can remember the plan to remove the security file watcher. Using the platform file watcher is more consistent, +1 here.

···

On Wed, Mar 12, 2014 at 3:14 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

On Wed, Mar 12, 2014 at 1:42 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I am rounding up all the “file watcher” like things for the next ResourceStore API pull request.

So far I have found:

  1. platform FileWatcher (lazy)
  2. security FileWatcher (active - extends Thread)
  3. GeoServerTemplateLoader (extends freemarker templateloader)

For the security file watcher actually using the platform version is something we wanted to do but never got a chance. So if simplifies things to remove (2) by all means do. Christian can correct me if i am wrong but I don’t think its required to watch for modifications in a separate head, actually it adds unnecessary overhead.

So did I miss anyone?

On first inspection these implementations are not used very much, but have the trick of not hitting the file system often. One thing I did not expect was the two file watchers requiring subclassing before use. I will look at replacing this with a strategy object.

Jody Garnett


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

So next question; should I kill the security file watch after transitioning? Or just deprecate it as “unused”. There may be some custom security implementations that use it after all…

In general during this work I have been checking the call hierarchy and deprecating unused methods so we can remove them later.

···

Jody Garnett

On Thu, Mar 13, 2014 at 2:54 AM, Christian Mueller <christian.mueller@anonymised.com> wrote:

Yep, I can remember the plan to remove the security file watcher. Using the platform file watcher is more consistent, +1 here.

On Wed, Mar 12, 2014 at 3:14 PM, Justin Deoliveira <jdeolive@anonymised.com…3839…> wrote:


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

On Wed, Mar 12, 2014 at 1:42 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I am rounding up all the “file watcher” like things for the next ResourceStore API pull request.

So far I have found:

  1. platform FileWatcher (lazy)
  2. security FileWatcher (active - extends Thread)
  3. GeoServerTemplateLoader (extends freemarker templateloader)

For the security file watcher actually using the platform version is something we wanted to do but never got a chance. So if simplifies things to remove (2) by all means do. Christian can correct me if i am wrong but I don’t think its required to watch for modifications in a separate head, actually it adds unnecessary overhead.

So did I miss anyone?

On first inspection these implementations are not used very much, but have the trick of not hitting the file system often. One thing I did not expect was the two file watchers requiring subclassing before use. I will look at replacing this with a strategy object.

Jody Garnett


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

+1 for deprecation, only to be sure :slight_smile:

···

On Thu, Mar 13, 2014 at 12:45 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So next question; should I kill the security file watch after transitioning? Or just deprecate it as “unused”. There may be some custom security implementations that use it after all…

In general during this work I have been checking the call hierarchy and deprecating unused methods so we can remove them later.

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Jody Garnett

On Thu, Mar 13, 2014 at 2:54 AM, Christian Mueller <christian.mueller@anonymised.com> wrote:

Yep, I can remember the plan to remove the security file watcher. Using the platform file watcher is more consistent, +1 here.

On Wed, Mar 12, 2014 at 3:14 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

On Wed, Mar 12, 2014 at 1:42 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I am rounding up all the “file watcher” like things for the next ResourceStore API pull request.

So far I have found:

  1. platform FileWatcher (lazy)
  2. security FileWatcher (active - extends Thread)
  3. GeoServerTemplateLoader (extends freemarker templateloader)

For the security file watcher actually using the platform version is something we wanted to do but never got a chance. So if simplifies things to remove (2) by all means do. Christian can correct me if i am wrong but I don’t think its required to watch for modifications in a separate head, actually it adds unnecessary overhead.

So did I miss anyone?

On first inspection these implementations are not used very much, but have the trick of not hitting the file system often. One thing I did not expect was the two file watchers requiring subclassing before use. I will look at replacing this with a strategy object.

Jody Garnett


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

So got one complication in deprecating this, the security FileWatcher implementation allows for “external” file references that are not contained in the data directory. The test cases do not seem to cover this use-case but it is there in the code.

Is this a facility that is actually used?

···

Jody Garnett

On Fri, Mar 14, 2014 at 1:04 AM, Christian Mueller <christian.mueller@anonymised.com> wrote:

+1 for deprecation, only to be sure :slight_smile:

On Thu, Mar 13, 2014 at 12:45 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So next question; should I kill the security file watch after transitioning? Or just deprecate it as “unused”. There may be some custom security implementations that use it after all…

In general during this work I have been checking the call hierarchy and deprecating unused methods so we can remove them later.

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Jody Garnett

On Thu, Mar 13, 2014 at 2:54 AM, Christian Mueller <christian.mueller@anonymised.com> wrote:

Yep, I can remember the plan to remove the security file watcher. Using the platform file watcher is more consistent, +1 here.

On Wed, Mar 12, 2014 at 3:14 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

On Wed, Mar 12, 2014 at 1:42 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I am rounding up all the “file watcher” like things for the next ResourceStore API pull request.

So far I have found:

  1. platform FileWatcher (lazy)
  2. security FileWatcher (active - extends Thread)
  3. GeoServerTemplateLoader (extends freemarker templateloader)

For the security file watcher actually using the platform version is something we wanted to do but never got a chance. So if simplifies things to remove (2) by all means do. Christian can correct me if i am wrong but I don’t think its required to watch for modifications in a separate head, actually it adds unnecessary overhead.

So did I miss anyone?

On first inspection these implementations are not used very much, but have the trick of not hitting the file system often. One thing I did not expect was the two file watchers requiring subclassing before use. I will look at replacing this with a strategy object.

Jody Garnett


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

I think it is not used, but I am not sure.

Cheers
Christian

···

On Thu, Mar 27, 2014 at 1:12 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So got one complication in deprecating this, the security FileWatcher implementation allows for “external” file references that are not contained in the data directory. The test cases do not seem to cover this use-case but it is there in the code.

Is this a facility that is actually used?

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Jody Garnett

On Fri, Mar 14, 2014 at 1:04 AM, Christian Mueller <christian.mueller@anonymised.com> wrote:

+1 for deprecation, only to be sure :slight_smile:

On Thu, Mar 13, 2014 at 12:45 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

So next question; should I kill the security file watch after transitioning? Or just deprecate it as “unused”. There may be some custom security implementations that use it after all…

In general during this work I have been checking the call hierarchy and deprecating unused methods so we can remove them later.

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Jody Garnett

On Thu, Mar 13, 2014 at 2:54 AM, Christian Mueller <christian.mueller@anonymised.com> wrote:

Yep, I can remember the plan to remove the security file watcher. Using the platform file watcher is more consistent, +1 here.

On Wed, Mar 12, 2014 at 3:14 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

On Wed, Mar 12, 2014 at 1:42 AM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I am rounding up all the “file watcher” like things for the next ResourceStore API pull request.

So far I have found:

  1. platform FileWatcher (lazy)
  2. security FileWatcher (active - extends Thread)
  3. GeoServerTemplateLoader (extends freemarker templateloader)

For the security file watcher actually using the platform version is something we wanted to do but never got a chance. So if simplifies things to remove (2) by all means do. Christian can correct me if i am wrong but I don’t think its required to watch for modifications in a separate head, actually it adds unnecessary overhead.

So did I miss anyone?

On first inspection these implementations are not used very much, but have the trick of not hitting the file system often. One thing I did not expect was the two file watchers requiring subclassing before use. I will look at replacing this with a strategy object.

Jody Garnett


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


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, Mar 27, 2014 at 1:12 PM, Jody Garnett <jody.garnett@anonymised.com>wrote:

So got one complication in deprecating this, the security FileWatcher
implementation allows for "external" file references that are not contained
in the data directory. The test cases do not seem to cover this use-case
but it is there in the code.

Is this a facility that is actually used?

I can't recall a need for that, but may be wrong

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
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

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