[Geoserver-devel] Jetty

What's all the Jetty stuff (seems like alot of stuff ...), but just

curious.
'All' this jetty stuff is actually far smaller (less than half the size)
than what it's replacing, the
good old embedded tomcat. And it's a good bit faster as well. It's a
servlet container and http server, but one that was specifically built
for
being small and easy to embed. I'm _really_ impressed by it, and it
should
allow us to make install and run geoservers that are easily under 10
megs.
The linux one will be as easy as a nice shell script. I'd like a
windows
one, ideally with an install shield and a little java swing start/stop
application like the windows resin.

You can try it out with the 'ant test' and 'ant run' targets (test
builds the source again, run doesn't), and indeed I'd appreciate if
others tested it out to make sure it works.

The only difficulty I've had so far is I can't figure how to get the
changes from the web ui to persist, since it works with the war in a
temp directory.

But that's also got me thinking that it may be a bit weird for us to
write our persistance directly inside the webapp. I mean, people and
the applications themselves move that stuff around and delete it. My
current idea is to create a .geoserver directory in the user's home.
Maven does the same, so I figure it must not be too hard to do in java.
We would store the services.xml and catalog.xml files there. This
would make a nice entry point for users to edit their own config files
(since looking in WEB-INF is a bit weird, and confused when building
from source, and it's in the conf directory). This would have a nice
side effect for developers, as building from source would not wipe out
the changes you made in the web admin tool (which happens now because
it just uses your conf directory). This would make our nice cite
builds not work so well, though I'm sure we could figure out a good
solution. I suppose this begs the question of where you put say the
shapefiles, as maybe files could be in .geoserver/data ? But yeah,
what do people think?

Chris

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

cholmes@anonymised.com wrote:

What's all the Jetty stuff (seems like alot of stuff ...), but just
   

curious.
'All' this jetty stuff is actually far smaller (less than half the size)
than what it's replacing, the
good old embedded tomcat. And it's a good bit faster as well. It's a
servlet container and http server, but one that was specifically built
for being small and easy to embed. I'm _really_ impressed by it, and it
should allow us to make install and run geoservers that are easily under 10
megs.
The linux one will be as easy as a nice shell script. I'd like a
windows one, ideally with an install shield and a little java swing start/stop
application like the windows resin.

Jetty is impressive, link for others: http://jetty.mortbay.com/jetty

You can try it out with the 'ant test' and 'ant run' targets (test
builds the source again, run doesn't), and indeed I'd appreciate if
others tested it out to make sure it works.

The only difficulty I've had so far is I can't figure how to get the
changes from the web ui to persist, since it works with the war in a
temp directory.

http://jetty.mortbay.com/jetty/faq?s=250-Configuration&t=tempdir

Basically assign a temp dir attribute, as long as you provide one the results will not be deleted.

But that's also got me thinking that it may be a bit weird for us to
write our persistance directly inside the webapp. I mean, people and
the applications themselves move that stuff around and delete it. My
current idea is to create a .geoserver directory in the user's home.

Good idea (GeoServer's persistence has always puzzled me), .geoserver is bad idea for a directory name on Windows.
Any directory located in the user's home will be sufficient. However given that resin (and thus geoserver) may be run as a service under windows it may be less trouble define a GEOSERVER_HOME env variable.

Maven does the same, so I figure it must not be too hard to do in java.

See above comment, when run as a service resin is supplied a user for file permissions. But that extra level of indirection may be confuse the issue for some people. The danger is that they will just grant resin Administrator (this is not a default, but is common practice for services).

We would store the services.xml and catalog.xml files there. This
would make a nice entry point for users to edit their own config files
(since looking in WEB-INF is a bit weird, and confused when building
from source, and it's in the conf directory).

There is no down side, this style of development is actually what I expected when I first tried out GeoServer.

This would have a nice
side effect for developers, as building from source would not wipe out
the changes you made in the web admin tool (which happens now because
it just uses your conf directory). This would make our nice cite
builds not work so well, though I'm sure we could figure out a good
solution. I suppose this begs the question of where you put say the
shapefiles, as maybe files could be in .geoserver/data ? But yeah,
what do people think?

Great idea, your users will love you. Do you really want to do this this week? (I would rather spend time bug hunting right now). As for the cite tests, set your GEOSERVER_HOME to a different directory. Shapefiles will always be a problem. I like the idea of geoserver/data - I really want to make that shapefile datastore that serves up the contents of a directory as FeatureTypes.

Don't we do something strange with styles sld files? Like try and serve them up directly? Is there any files that must be copied from the geoserver directory the the WEB-INF at runtime?

Jody

Good idea (GeoServer's persistence has always puzzled me), .geoserver is bad idea for a directory name on Windows.
Any directory located in the user's home will be sufficient. However given that resin (and thus geoserver) may be run as a service under windows it may be less trouble define a GEOSERVER_HOME env variable.

Amazingly, there is nothing wrong with a .anything name on windows these days, a quick look inside my own documents and settings/username folder turns up...:
.java .javaws .netbeans .jprobe .jedit .maven and many more.

You may also want to look at:
http://java.sun.com/j2se/1.4.2/docs/guide/lang/preferences.html#prefs-other

For some ideas.

James

James Macgill wrote:

Any directory located in the user's home will be sufficient. However given that resin (and thus geoserver) may be run as a service under windows it may be less trouble define a GEOSERVER_HOME env variable.

Good idea (GeoServer's persistence has always puzzled me), .geoserver is bad idea for a directory name on Windows.

Amazingly, there is nothing wrong with a .anything name on windows these days, a quick look inside my own documents and settings/username folder turns up...:
.java .javaws .netbeans .jprobe .jedit .maven and many more.

This is true that these files exist :slight_smile:

You can make such filenames programatically - but if you try to reanme a directory to ".geoserver" using Explorer (at least on Windows 2000) you get the following errors message:

"You must type a filename."

This would prevent our users from backing up their .geoserver directory (a problem I have encountered with .maven). One acceptable solution I have seen is the one used by jCVS - they use a leading period for unix and a leading underscrore for windows.

Cheers,
Jody

Do you really want your configuration / data directory to be hidden? :slight_smile: Shout it out loud, I'm geoserver and I'm proud!

On Tuesday, April 6, 2004, at 11:10 AM, Jody Garnett wrote:

James Macgill wrote:

Any directory located in the user's home will be sufficient. However given that resin (and thus geoserver) may be run as a service under windows it may be less trouble define a GEOSERVER_HOME env variable.

Good idea (GeoServer's persistence has always puzzled me), .geoserver is bad idea for a directory name on Windows.

Amazingly, there is nothing wrong with a .anything name on windows these days, a quick look inside my own documents and settings/username folder turns up...:
.java .javaws .netbeans .jprobe .jedit .maven and many more.

This is true that these files exist :slight_smile:

You can make such filenames programatically - but if you try to reanme a directory to ".geoserver" using Explorer (at least on Windows 2000) you get the following errors message:

"You must type a filename."

This would prevent our users from backing up their .geoserver directory (a problem I have encountered with .maven). One acceptable solution I have seen is the one used by jCVS - they use a leading period for unix and a leading underscrore for windows.

Cheers,
Jody

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

      Paul Ramsey
      Refractions Research
      Email: pramsey@anonymised.com
      Phone: (250) 885-0632