Navigation

RSS 2.0 New Entries Syndication Feed Atom 0.3 New Entries Syndication Feed

Show blog menu v

 

General

Use it

Documentation

Support

Sibling projects

RIFE powered

Valid XHTML 1.0 Transitional

Valid CSS!

Blogs : Archives

avatar
< "In Bed with RIFE" : first episode of the RIFE podcast   Maintenance on rifers.org >
Winstone servlet container, yummy yet yikes

After having read the announce of the Winstone v0.8 release on TheServerSide, I decided to try the little beast out.

I like a lot of the things I see, it really seems lean and mean. The configuration can be quickly done on the command-line as arguments, or you can put it in a basic properties file. This makes it much easier to adopt for people that are used to unix-like applications and don't feel like juggling around with XML formats.

It's ability to launch war files immediately is particularly nice:

java -jar winstone-0.8.jar mywebapp.war

The servlet container starts up very quickly indeed and all the RIFE applications I threw at it worked just fine, even continuations-based features. They started up quite quickly too.

It's interesting how the author tries to offer neat little new features that you can't find anywhere else. I particularly liked that you can embed your war file into the Winstone jar and just ship it as one file.

Like this:

mv yourwar.war embedded.war
zip winstone-0.8.jar embedded.war
java -jar winstone-0.8.jar

However, then came the shock. Every feature indicates that it's a container that is aimed at embedding and easy distribution. I'm totally puzzled why the author decided to make it GPL! Who in his right mind creates a new project in already overcrowded domain and makes it less free than anything else out there! Winstone was nice to try out, but unless the author decides to adopt a commercial usage friendly license (like CDDL), it will remain a toy that I played a bit with and then threw away.

posted by Geert Bevin in Java on Jan 26, 2006 9:02 AM : 23 comments [permalink]
 

Comments

Re: Winstone servlet container, yummy yet yikes
Winstone does sound good. But the GPL does not create a link between the servlet container source code and one's own servlet app source code, does it? That would defy belief…
Re: Winstone servlet container, yummy yet yikes
If you used it as an embedded servlet container, or a one-stop jar to distribute your applications, the license is viral. It isn't of course if you install Winstone as a regular servlet container on your own server. GPL only applies when you distribute.
Re: Winstone servlet container, yummy yet yikes
Geert, GPL isn't "less free" than LGPL, ASL, MPL, CDDL, etc...
At least it isn't less "Free" (as in "libre").
The major assets of an OpenSource license are that you can have the code, inspect the code, reuse the code, make modifications. It's not the fact that it's free of charge (as in free beer) or that you can make money out of other people's work by embedding it into a commercial application.

Depending on the focus, GPL is "more free" than others because it is fair: if you want to use other people's work to be faster to the market, make more profit, have better quality (just because you're using something that already exists, that is tested and proven and it's something you don't have to spend time developing yourself), then it is fair to give something back.

Yet, I agree that the GPL is more restrictive, certainly as far as one's "freedom" is concerned but not in terms of "Free"/"libre" ;)

Anyway, as you already pointed out: as long as you don't embed your own class files into the winstone jar, the GPL does not apply to your own code.

Ok, now I really sound like nitpicking, sorry, wasn't the intent ;)

In the end, I do agree with you that ASL, MPL or LGPL would have been nicer, and maybe the author is enclined to change the license. But I wouldn't touch CDDL with a stick.
Re: Winstone servlet container, yummy yet yikes
I'm curious, what is wrong with the CDDL, according to you?
Re: Winstone servlet container, yummy yet yikes
<blockquote>
Anyway, as you already pointed out: as long as you don't embed your own class files into the winstone jar, the GPL does not apply to your own code.
</blockquote>

I don't think thats correct, GPL hinges around using libraries and the winstone APIs are a library that implements the servlet api interfaces. I think Geerts correct, look but don't touch if you plan on distributing.
Re: Winstone servlet container, yummy yet yikes
But then perhaps this virality is easily evaded. Says
http://winstone.sourceforge.net/#deployChoices
about, for example, deploying ONE webapp:

* java -jar winstone.jar webroot-or-warfile,
(this method auto-detects the type) or
* java -jar winstone.jar --webroot=webroot, or
* java -jar winstone.jar --warfile=warfile

Re: Winstone servlet container, yummy yet yikes
First, having thought about it again, analogueboy is correct (and me wrong). Your code would use Winstone as the Servlet spec implementation and hence, as a library. My point was mostly about "GPL is not free" ;)

Now, about CDDL. CDDL is yet another license, and we already have enough of widely used and understood BSD-alike licenses (ASL, MPL, Eclipse, MIT/X, ...).
I'm pretty convinved that with CDDL it's hidden in the detail... why has Sun to come up with another license ? Patent protection ? That's already in ASL2 (with ASL2 you explicitely grant the right to use the software and source code, including defering all patents that are or might apply to the source code). That's my biggest gripe about the CDDL. Is it widely known and understood yet ? No. Proven in court anywhere ? No. Successfully protected someone from patent litigations ? No.
And we all now Sun has created the CDDL to have OpenSolaris under a GPL-incompatible license in order to avoid code reuse in the Linux kernel (so much for Sun and OpenSource).

As said, I fully agree with you that putting Winstone under ASL or MPL would be better, mostly because it's easier for people as many are afraid of that "viral" aspect of GPL/LGPL. LGPL would be fine as well though. Or do you think you cannot deploy proprietary software on JBoss ? ;)

About that (L)GPL "viral story", this summarizes it pretty well: http://slashdot.org/comments.pl?sid=146569&cid=12279367
(yeah, it's slashdot.org, I know... ;))

The LGPL would be fine though. It's a question of packaging, not of altering the Winstone source nor bytecode. But it's not that easy to evaluate, as the GPL/LGPL is rather clear in how it applies to shared libraries (C/C++) but not that much wrt. jar files.
Yet, it's just a repackaging, you are not altering Winstone in any way by adding your class files and resources to the Winstone jar. That definitely validates the LGPL.

But honestly, part of me keeping good distance of CDDL is that I don't fully trust Sun in terms of licenses. I suppose you've also read the Sun JVM license some day, so I guess you know what I mean (if not, read it, it's pretty frightening).
Now I'm not a GPL zealot, definitely not, but ASL/MPL would be a better choice (than CDDL) for Winstone in many regards.
Re: Winstone servlet container, yummy yet yikes
Pascal, have you actually read the CDDL pages and the information that Sun provides about it? Have you read the license? Your reply sound like a typical case of FUD to me. You suggest the MPL, but you are against CDDL, that makes no sense since the CDDL is a derivate from it. The MPL is also incompatible with GPL. Please get your facts straight. Imho CDDL is the best copy-left license for Java projects. I think Sun did a great job there.
Re: Winstone servlet container, yummy yet yikes
> the GPL/LGPL is rather clear in how it applies to
> shared libraries (C/C++) but not that much wrt. jar files.

so I wonder if it's really a problem, when you consider that (a) the GPL IS apparently murky w.r.t. jarfiles, and (b) there's a lot more GPL misuse and abuse happening every day so why worry about a case like this when there's plenty of workarounds in the Winstone command line for a maybe-kosher-maybe-not-so-kosher distro package.

of course, I suppose it couldn't either hurt to get a statement from the developer about what HE would consider to be kosher w.r.t. packaging, bundling, embedding, etc etc. ;--)
Re: Winstone servlet container, yummy yet yikes
The fact that it's murky is exactly the problem. This is also true for LGPL. It's way too risky to build upon since you never really know how certain things have to be interpreted. GPL / LGPL and Java don't match well due to the inappropriate phrasing in those licenses. Worst case, even LGPL is viral for anything that 'links' with it (importing something is linking, reflection is linking too, ...). The fact that we're even discussing about this means that it should be avoided. Doubt and law doesn't work well together.
Re: Winstone servlet container, yummy yet yikes
Geert, there is no need to bash me off as a FUD'der, I don't think I flamed anyone or anything in my posts (if that impression came over, then sorry, it wasn't meant so).
No FUD intended.
If you think CDDL is the way to go, then be it, I just wanted to point out that CDDL is yet another license and in order to work against license proliferation it would be more advisable (IMVHO) to rather use ASL or MPL (BTW, what's the added value of CDDL compared to ASL2 ?) but definitely didn't want to start a license flamewar.

Well, whatever, if it ends up in calling names...
Anyway, Geert, thanks for you involvement and efforts in Rife, and thanks for your observations about Winstone. It sure looks very interesting but hopefully the author will change the license to CDDL/ASL/MPL/whatever-OSI-but-not-GPL.
Cheers.
Re: Winstone servlet container, yummy yet yikes
Oh, just one thing I missed: LGPL is not viral for anything that links with it.
That's the whole point of the LGPL as compared to the GPL.
As an analogy (and I do agree (L)GPL is not as clear for Java as for C/C++), if I #include a header of a library and link against it, it is not viral. My code can even be proprietary. Importing and reflection are linking, but are not viral with LGPL jars.
It if was true that the LGPL was viral wrt. linking then there hardly wouldn't be any proprietary software available for Linux (the GNU libc, amongst many others, is LGPL and not GPL, exactly for that reason).
just my 0.02€
Re: Winstone servlet container, yummy yet yikes
Pascal please don't be offended, I merely said your reply sounded like FUD (fear, uncertainty, doubt), since you apparently didn't read Sun's documents nor realized that it's a slightly modified version of the MPL. Sun even gives you a clear outline of the changed sections, and explains clearly why the changes were made. Still you say things like:
And we all know Sun has created the CDDL to have OpenSolaris under a GPL-incompatible license in order to avoid code reuse in the Linux kernel

Yet MPL has the same compatibility problems with GPL and you recommend it.

About your LGPL statement, did you at least read this: http://www.gnu.org/licenses/lgpl-java.html ?
... When you distribute the library with your application (or on its own), you need to include source code for the library. But if your application instead requires users to obtain the library on their own, you don't need to provide source code for the library...


Apart from that, LGPL is a bad choice for Java since it's not 100% clear how the derived works has to apply and what is considered 'linking'. This leaves room for interpretation and makes people draw different conclusions. This is one of the main reasons that a lot of companies wont even touch a Java open-source project that uses LGPL.
Re: Winstone servlet container, yummy yet yikes
Pascal, I also suggest you to read this thread I started on TSS:
http://www.theserverside.com/news/thread.tss?thread_id=36156

Looking from the discussion there, it really isn't clear at all how to approach LGPL for Java. This is THE main issue and makes it a bad choice.
Re: Winstone servlet container, yummy yet yikes
Geert, thanks for getting a discussion going about this. I'm very keen to know if a license change will be meaningful (I actually replied to your post on theserverside, but I think it got lost in the top page rotation).

To be honest, licenses are not my strong point (as the discussion here seems to have highlighted). Since I'm the only copyright holder though, I can change the license easily.

I guess a license change would be worth trialling, and the CDDL or ASF licenses look like primary candidates. I kinda like the philosophy behind the GPL, it's just that in the container field, there are way too many other good options with looser licenses, which makes it almost a requirement for playing.

Thanks for the feedback ... I'll open it for discussion on the winstone-devel list, and if I don't hear any substantial objections from the regular users, I'll trial one of those two for v0.8.1
Re: Winstone servlet container, yummy yet yikes
Hi Rick,

licenses are tricky things and as a developer it's difficult to understand the implications fully. Actually, you and I probably understand most of it wrongly since we're not expert lawyers. The first choice you have to make however is to adopt a copy-left license or a totally unrestricted license. After that choices, imho, are limited and you clearly summarized that it's either CDDL or ASF2. What made me select CDDL as my preferred copy-left license is the fact that it's clearly explained why it exists and what its purpose it. It has also been specifically created to be Java-friendly.

Good luck with your license selection,

Geert

PS.: the CDDL (and MPL) are incompatible with the GPL, hence why RIFE is dual-license LGPL / CDDL
Re: Winstone servlet container, yummy yet yikes
Thanks - both for your advice and the kind review.

I'm not sure I understand though how the CDDL and GPL are incompatible. Doesn't the GPL just override the CDDL when one of each is linked and distributed ? Which part of the CDDL stops the GPL from overriding it ?

My head is hurting with all the legal talk. Please forgive me if I'm missing the blindly obvious.
Re: Winstone servlet container, yummy yet yikes
Hi Rick, it's the same reason as for the MPL and GPL. You find more information here: http://www.tomhull.com/ocston/docs/mozgpl.html
I hope this helps.
Re: Winstone servlet container, yummy yet yikes
Ah OK - I get it. I missed the bit about not applying any additional conditions (CDDL section 3.6).

Thanks. I think I might just do what you did (dual license).

Rick
Re: Winstone servlet container, yummy yet yikes
Sifting through the Winstone code it seems very well put together, so kudos to Rick Knowles for some good Java craftmanship there. I am a little unsure about the decision to go for backwards compatibility with earlier JDKs as indicated on theserverside.com announcement in the followup discussion.

I was under the impression that the best performance lies in keeping up with Java evolution and using Java NIO, and also benefitting from letting developers/users enjoy the newer APIs and types. That translates into better and more readable code, and better projects in the long run.

The structure in Winstone looks really good though, and it will surely make it popular with many developers. I will at least be committing to using and perhaps enhancing the framework if I can. A CDDL license will also make it a plausible framework for a wide variety of projects.
Re: Winstone servlet container, yummy yet yikes
Apropos Java NIO, the Grizzly HTTP engine in the Sun GlassFish project seems interesting. See Jean-Francois Arcand's Blog http://weblogs.java.net/blog/jfarcand/ .

For some high-traffic solution I guess this would make a lot of sense to marry these two solutions.
Re: Winstone servlet container, yummy yet yikes
Rune,

Thanks for your feedback. The main reasoning behind keeping compatibility with old JDKs is because of mobile devices. The focus in winstone on small size makes it well-suited to mobile devices (where JVM heap size is at a premium), and since these devices typically lack 4-5 years behind in JVM implementations and often only partially implement the spec, I want to keep the API use in the lite jar (ie the winstone.* package) to as low a JDK as necessary.

The optional packages can be use later JDKs if necessary, so the plan currently is to try to implement an IO wrapper library that has a straight java.io implementation in the core and a java.nio implementation in the optional section.

Hopefully that will give us the best of both worlds.

Thanks again,

Rick
Re: Winstone servlet container, yummy yet yikes
Just a quick note to say that I've released v0.8.1 of winstone, and from this version onwards the license has changed to CDDL + LGPL (the same as RIFE). It also has a few bug fixes for various problems that people found.

Please download it and enjoy the new license,

Thanks,

Rick

Add a new comment

:) ;)
=) :-)
:'( :(
:/ :D
:| :p
:o 8)
Your email address will not be displayed at anytime on any page.
Only provide your email address if you'd like updates on this entry
and it's comments by email.
Please answer this simple math question:
19 + 14 = 
 
 
  

Manage subscription

Remove email:
 

< "In Bed with RIFE" : first episode of the RIFE podcast   Maintenance on rifers.org >
 
 
 
Google
rifers.org web