Jetty 9?

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty 9?

Tal Liron
Can Restlet 2.2 work use Jetty 9 as its connector?

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067974
Reply | Threaded
Open this post in threaded view
|

RE: Jetty 9?

Tal Liron
The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty, which is unfortunate because it's not a recommended protocol, and has been dropped in Jetty 9.

Would it be possible to change the Jetty connector so that it would work with either Jetty 8 or 9? It's very unfortunate that Restlet is always behind on the latest releases of Jetty,

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067981
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9?

BryanHunt
You can always use the servlet extension with Jetty.

Bryan


On Nov 06, 2013, at 08:45 AM, Tal Liron <[hidden email]> wrote:

The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty, which is unfortunate because it's not a recommended protocol, and has been dropped in Jetty 9.

Would it be possible to change the Jetty connector so that it would work with either Jetty 8 or 9? It's very unfortunate that Restlet is always behind on the latest releases of Jetty,

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067981
Reply | Threaded
Open this post in threaded view
|

Re: Jetty 9?

Jerome Louvel-3
Restlet integration with Jetty (the org.restlet.ext.jetty extension) isn't based on AJP but on core Jetty APIs, enable support of HTTP/HTTPS and AJP.

I haven't tried but dropping new Jetty JARs might just do it, but likely they have changed their internal API here and there and some patches will be required. Anyone want to have a look?

The main issue I see for Jetty 9 in RF 2.2 is their requirement on Java 7... It seems like the official support should come instead in RF 3.0.

Jerome




2013/11/6 Bryan Hunt <[hidden email]>
You can always use the servlet extension with Jetty.

Bryan


On Nov 06, 2013, at 08:45 AM, Tal Liron <[hidden email]> wrote:

The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty, which is unfortunate because it's not a recommended protocol, and has been dropped in Jetty 9.

Would it be possible to change the Jetty connector so that it would work with either Jetty 8 or 9? It's very unfortunate that Restlet is always behind on the latest releases of Jetty,

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067981

Reply | Threaded
Open this post in threaded view
|

RE: Re: Jetty 9?

Tal Liron
The API has indeed subtly changed, so that throwing in the Jars will not work. And though Restlet doesn't use AJP to communicate with Jetty, it does try to initialize AJP support, and those classes no longer exist in Jetty 9, thus another kind of failure. Bottom line, it won't work.

Jerome, Jetty 9 is an important feature for me, but I understand that it would be difficult to include this support in the Restlet main code base, because it would indeed require JVM 7 to compile. What is your opinion about me forking and hosting a "jetty9" extension separately from the Restlet tree? I would be happy to keep the same multiple licenses. And eventually, when Restlet becomes ready for JVM 7, it could be merged into the main tree.

Another idea is to create yet another repository within Restlet for "contrib" extensions from the community. They could be included in the Restlet distribution, each with its own documentation and possible quirks, clearly demarcated from the "core" extensions.

-Tal

> Restlet integration with Jetty (the org.restlet.ext.jetty extension) isn't
> based on AJP but on core Jetty APIs, enable support of HTTP/HTTPS and AJP.
>
> I haven't tried but dropping new Jetty JARs might just do it, but likely
> they have changed their internal API here and there and some patches will
> be required. Anyone want to have a look?
>
> The main issue I see for Jetty 9 in RF 2.2 is their requirement on Java
> 7... It seems like the official support should come instead in RF 3.0.
>
> Jerome
>
>
>
>
> 2013/11/6 Bryan Hunt <bhunt at mac dot com>
>
> > You can always use the servlet extension with Jetty.
> >
> > Bryan
> >
> >
> > On Nov 06, 2013, at 08:45 AM, Tal Liron <tal dot liron at threecrickets dot com>
> > wrote:
> >
> > The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty,
> > which is unfortunate because it's not a recommended protocol, and has been
> > dropped in Jetty 9.
> >
> > Would it be possible to change the Jetty connector so that it would work
> > with either Jetty 8 or 9? It's very unfortunate that Restlet is always
> > behind on the latest releases of Jetty,
> >
> > ------------------------------------------------------
> >
> > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067981
> >
> >

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068043
Reply | Threaded
Open this post in threaded view
|

RE: Re: Jetty 9?

Tal Liron
So, I went ahead and created a Jetty 9 extension for Restlet 2.2:

https://github.com/tliron/restlet-jetty9

It's not much tested (especially SSL), but it does work! There are also 2 helper parameters that I still haven't found how to duplicate on Jetty 9, so they are just be ignored. Actually, I would prefer a more major refactor, because Jetty 9 is different enough that it would demand a different set of parameters.

Jetty 9 is a major overhaul of the API: it was naïve of me to think it could just be a drop-in replacement. :)

Obviously, you need at least JVM 7 to use Jetty 9.

As I said, would prefer to contribute this to Restlet, but the JVM 7 requirement makes it awkward.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068074
Reply | Threaded
Open this post in threaded view
|

Re: Re: Jetty 9?

Jerome Louvel-3
In reply to this post by Tal Liron
I suggest that you create a new /restlet-framework-java/master/incubator/org.restlet.ext.jetty9 extension by copying then adapting the o.r.e.jetty extension.

You can always have you own branch in GitHub and then merge it back when master becomes ready for RF 3.0 (Java 7), but from a licensing point of view you can't offer all the available open source licenses and would need to pick one (I suggest Apache license).

Best regards,
Jerome



2013/11/6 Tal Liron <[hidden email]>
The API has indeed subtly changed, so that throwing in the Jars will not work. And though Restlet doesn't use AJP to communicate with Jetty, it does try to initialize AJP support, and those classes no longer exist in Jetty 9, thus another kind of failure. Bottom line, it won't work.

Jerome, Jetty 9 is an important feature for me, but I understand that it would be difficult to include this support in the Restlet main code base, because it would indeed require JVM 7 to compile. What is your opinion about me forking and hosting a "jetty9" extension separately from the Restlet tree? I would be happy to keep the same multiple licenses. And eventually, when Restlet becomes ready for JVM 7, it could be merged into the main tree.

Another idea is to create yet another repository within Restlet for "contrib" extensions from the community. They could be included in the Restlet distribution, each with its own documentation and possible quirks, clearly demarcated from the "core" extensions.

-Tal

> Restlet integration with Jetty (the org.restlet.ext.jetty extension) isn't
> based on AJP but on core Jetty APIs, enable support of HTTP/HTTPS and AJP.
>
> I haven't tried but dropping new Jetty JARs might just do it, but likely
> they have changed their internal API here and there and some patches will
> be required. Anyone want to have a look?
>
> The main issue I see for Jetty 9 in RF 2.2 is their requirement on Java
> 7... It seems like the official support should come instead in RF 3.0.
>
> Jerome
>
>
>
>
> 2013/11/6 Bryan Hunt <bhunt at mac dot com>
>
> > You can always use the servlet extension with Jetty.
> >
> > Bryan
> >
> >
> > On Nov 06, 2013, at 08:45 AM, Tal Liron <tal dot liron at threecrickets dot com>
> > wrote:
> >
> > The answer, unfortunately, is no: Restlet uses AJP to connect to Jetty,
> > which is unfortunate because it's not a recommended protocol, and has been
> > dropped in Jetty 9.
> >
> > Would it be possible to change the Jetty connector so that it would work
> > with either Jetty 8 or 9? It's very unfortunate that Restlet is always
> > behind on the latest releases of Jetty,
> >
> > ------------------------------------------------------
> >
> > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067981
> >
> >

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068043

Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Jetty 9?

Tal Liron
Thanks, Jerome.

I picked the Apache License 2.0, and am hosting it as a separate project. I'm assigning joint copyright on it to Restlet S.A.S, per the contributor agreement, so you are free to merge it should you ever wish to do so:

https://github.com/tliron/restlet-jetty9

Rather than a branch, it's its own tiny repository. I know you've made many efforts to make things easier for contributers, but alas it's still too cumbersome for me. The Restlet repository is enormous and unwieldy, and in fact I haven't been able to build it at all. It's just too much effort over no clear gain to be part of the "incubator" at this point. Maven builds, especially, make it trivial to use the Restlet binaries without having to be part of the git tree. Just treat the project as an incubator if you like!


> I suggest that you create a new
> /restlet-framework-java/master/incubator/org.restlet.ext.jetty9 extension
> by copying then adapting the o.r.e.jetty extension.
>
> You can always have you own branch in GitHub and then merge it back when
> master becomes ready for RF 3.0 (Java 7), but from a licensing point of
> view you can't offer all the available open source licenses and would need
> to pick one (I suggest Apache license).
>
> Best regards,
> Jerome

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068100
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Jetty 9?

Jerome Louvel-3
That's fine Tal, whatever works best for you. Merging by hand won't be a big issue anyway.

You might want to enter an issue in RF repo to let people discover this support and let us communicate over it.

Best regards,
Jerome


2013/11/7 Tal Liron <[hidden email]>
Thanks, Jerome.

I picked the Apache License 2.0, and am hosting it as a separate project. I'm assigning joint copyright on it to Restlet S.A.S, per the contributor agreement, so you are free to merge it should you ever wish to do so:

https://github.com/tliron/restlet-jetty9

Rather than a branch, it's its own tiny repository. I know you've made many efforts to make things easier for contributers, but alas it's still too cumbersome for me. The Restlet repository is enormous and unwieldy, and in fact I haven't been able to build it at all. It's just too much effort over no clear gain to be part of the "incubator" at this point. Maven builds, especially, make it trivial to use the Restlet binaries without having to be part of the git tree. Just treat the project as an incubator if you like!


> I suggest that you create a new
> /restlet-framework-java/master/incubator/org.restlet.ext.jetty9 extension
> by copying then adapting the o.r.e.jetty extension.
>
> You can always have you own branch in GitHub and then merge it back when
> master becomes ready for RF 3.0 (Java 7), but from a licensing point of
> view you can't offer all the available open source licenses and would need
> to pick one (I suggest Apache license).
>
> Best regards,
> Jerome

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068100

Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Re: Jetty 9?

Tal Liron
Excellent. If anyone has comments, here is the GitHub issue:

https://github.com/restlet/restlet-framework-java/issues/793

> That's fine Tal, whatever works best for you. Merging by hand won't be a
> big issue anyway.
>
> You might want to enter an issue in RF repo to let people discover this
> support and let us communicate over it.
>
> Best regards,
> Jerome

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068106
Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Jetty 9?

Tal Liron
In reply to this post by Tal Liron
Binaries and API documentation are now available via the GitHub project site.

Enjoy!

> https://github.com/tliron/restlet-jetty9

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068157
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Jetty 9?

Jerome Louvel-3
It looks good, thanks Tal!

Jerome


2013/11/9 Tal Liron <[hidden email]>
Binaries and API documentation are now available via the GitHub project site.

Enjoy!

> https://github.com/tliron/restlet-jetty9

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3068157

Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Re: Jetty 9?

Tal Liron
I went ahead and also added a Jetty 9 client connector:

https://github.com/tliron/restlet-jetty9

Note that if you add the Jar to your classpath, both the server and client connectors will be activated.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3069061
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Jetty 9?

Jerome Louvel-3
Thanks Tal, this looks great. We might want to add parameters to disable/enable the client/server connector from the extension as a second step to allow mixing of several connector extensions.

I've added a note about this to the matching ticket:

Jerome



2013/11/22 Tal Liron <[hidden email]>
I went ahead and also added a Jetty 9 client connector:

https://github.com/tliron/restlet-jetty9

Note that if you add the Jar to your classpath, both the server and client connectors will be activated.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3069061

Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Re: Re: Jetty 9?

Tal Liron
Actually, it's a feature I would like to see with *all* Restlet extensions: it would be nice for users to be able select which extensions they want to use, rather than configure it solely via the classpath.

Possibly with Java properties? I can imagine every extension class having an "enabled" property.

> Thanks Tal, this looks great. We might want to add parameters to
> disable/enable the client/server connector from the extension as a second
> step to allow mixing of several connector extensions.
>
> I've added a note about this to the matching ticket:
> https://github.com/restlet/restlet-framework-java/issues/512

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3069272
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Jetty 9?

Jerome Louvel-3
Hi Tal,

In RF 3.0, we should really give more precise control regarding extensions usage for:
  • connectors
  • converters
  • authenticators
The configuration of a Restlet component or application should be explicit and fully available programmatically.

I'm even considering fully removing the classpath based auto-registration as it seems to create more problems than solutions.

Best regards,
Jerome



2013/11/26 Tal Liron <[hidden email]>
Actually, it's a feature I would like to see with *all* Restlet extensions: it would be nice for users to be able select which extensions they want to use, rather than configure it solely via the classpath.

Possibly with Java properties? I can imagine every extension class having an "enabled" property.

> Thanks Tal, this looks great. We might want to add parameters to
> disable/enable the client/server connector from the extension as a second
> step to allow mixing of several connector extensions.
>
> I've added a note about this to the matching ticket:
> https://github.com/restlet/restlet-framework-java/issues/512

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3069272

Reply | Threaded
Open this post in threaded view
|

RE: Re: Re: Re: Re: Re: Jetty 9?

Tal Liron
Great! I agree with this new direction.

Well, for now I will implement your requested feature.

> Hi Tal,
>
> In RF 3.0, we should really give more precise control regarding extensions

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3070826