Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty Websocket Impl

You should be aware of the state of the WebSocket API across versions of Jetty.

Jetty 7 and Jetty 8 had an early prototype WebSocket API.  Something that evolved organically as we participated in the RFC WebSocket spec discussions.  The resulting ending API is a mess.

Jetty 9.0 introduced a vastly cleaned up API based on our experiences in Jetty 7/8 and the resulting finalized RFC-6455.
This is the org.eclipse.jetty.websocket.api.* package space.
Jetty 9.0 also introduced side specific usage for the API.
  For client: org.eclipse.jetty.websocket.client.* 
  For server: org.eclipse.jetty.websocket.servlet.*

But the world continues to move forward at its usual speed.
JEE7 was being worked on, and in parallel was JSR-356, aka javax.websocket.* API.
Starting with Jetty 9.1 we now support JSR-356 / javax.websocket and can function as either a client or server.

Scott, the contrib you received is for a dead-end API.  Would encourage you to either embrace Jetty 9's WebSocket API or javax.websocket.* API.

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Fri, Feb 28, 2014 at 1:48 PM, Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:
I'm just returning to working on this...so please forgive the long break in this thread.

First, for the jetty community's info, ECF has recently received a contribution of a remote services provider based upon websocket...which uses the Jetty websocket impl [1].  We will be happy to include this provider in future versions of ECF remote services [2].

This contribution depends upon jetty websocket packages classes (8.1+)...potentially both client and server classes...for remote service consumers/clients and hosts/servers.

I'm currently using eclipse4.4M4, which seemingly has some of the the org.eclipse.jetty.* bundles (version 8.1.12.v20130726) in the 4.4M4 target platform.

Some questions:

The jetty bundles that come with eclipse4.4M4 do *not* seem to come with the websocket packages/classes (at least I can't find them exported by the 8.1.12 bundles above).  

If I load all the bundles the jetty 8 repo into my target platform (the most recent Jetty 8 one from here http://download.eclipse.org/jetty/)...then I'm able to compile the contribution from [1].  This is fine, but I noticed that Jetty 9 seems to be more recently released.

Question:   What's the plan WRT eclipse4.4/Juno WRT jetty versions?   i.e. will Jetty 9 be used for Juno/eclipse4.x?...or Jetty 8?

Second question:  In both the jetty 8 and jetty 9 repos (i.e. the repos at http://download.eclipse.org/jetty ) they appear to have only one feature (along with a source feature).    For the [1] contribution above, we/ECF might want to consume only a subset of the jetty bundles...and perhaps a different set for remote service clients vs. servers.   What would you recommend to do this?   Should we be creating our own jetty features to do this?...and deploying them via our own repository?  Or should we be using/reusing some other feature/repos and point to jetty's repository?  Or something else?

Thanksinadvance,

Scott 

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=426186
[2] https://wiki.eclipse.org/ECF



On 1/21/2014 8:14 AM, Joakim Erdfelt wrote:
There are 4 impls for you to use.

websocket-client (jetty websocket client)
websocket-servlet -> websocket-server (jetty websocket server)
javax-websocket-client-impl (javax.websocket / JSR356 client implementation)
javax-websocket-server-impl (javax.websocket.server / JSR356 server implementation)

Know that for the Jetty WebSocket APIs, the client and server are separate.
But for the JSR-356 implementation, the client is the base implementation with the server being extended from it (this is how the javax.websocket API was written)


--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Tue, Jan 21, 2014 at 8:38 AM, Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:
On 1/20/2014 11:50 PM, Jan Bartel wrote:

Hi Scott,

All jetty jars should have manifest entries with correct bundle headers. I haven't checked the websocket jars, but if you find the manifests are not correct please let us know.


Ok.


Are there particular things you are looking to have in a websocket bundle?


Well...it might be desirable to have the client and server websocket impls in separate bundles...but perhaps not (hard to tell without looking at the structure of the code).   I assume that the websocket impl has internal dependencies (i.e. dependencies on other parts of Jetty), so of course any other bundles.

Do you have a p2 repo/features for websocket+dependencies?


I should mention that our websocket impl uses a servlet 3 servletcontainerinitializer, which may perhaps be problematic in an osgi environment.


Perhaps so.


I'm currently travelling but will be near a computer in the next couple of days so I can investigate further for you.


Ok...thanks, that would be splendid.

Scott




_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top