You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "paulrutter (via GitHub)" <gi...@apache.org> on 2024/02/26 15:17:22 UTC
[PR] Jetty 12.0.6 and add jetty web socket support [felix-dev]
paulrutter opened a new pull request, #298:
URL: https://github.com/apache/felix-dev/pull/298
This change makes it possible to use WebSockets via Felix HTTP Jetty 12 bundle.
There are still some strange things that need to be done when writing a WebSocket servlet to get it all to work, but that's for a separate change request/bug report. I requested access to the Felix Jira so i can add it to the jira project.
More info about the required changes needed:
* https://www.eclipse.org/forums/index.php/t/1110140/
* https://issues.apache.org/jira/browse/FELIX-5310?jql=project%20%3D%20FELIX%20AND%20component%20%3D%20%22HTTP%20Service%22%20AND%20text%20~%20%22websocket%22
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-1968336845
Ok, fair enough. As commented we should probably not include the client. Is there any demo project somewhere that allows to actually test this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on code in PR #298:
URL: https://github.com/apache/felix-dev/pull/298#discussion_r1503059549
##########
http/jetty12/pom.xml:
##########
@@ -181,6 +181,9 @@
org.apache.commons.*
</Conditional-Package>
<Import-Package>
+ jakarta.annotation.*;resolution:=optional,
+ jakarta.transaction.*;resolution:=optional,
+ org.objectweb.asm.*;resolution:=optional,
Review Comment:
Same for this one, without this optional resoluton, the bundle won't start.
##########
http/jetty12/pom.xml:
##########
@@ -181,6 +181,9 @@
org.apache.commons.*
</Conditional-Package>
<Import-Package>
+ jakarta.annotation.*;resolution:=optional,
+ jakarta.transaction.*;resolution:=optional,
+ org.objectweb.asm.*;resolution:=optional,
Review Comment:
Same for this one, without this optional resolution, the bundle won't start.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-1968353199
@cziegeler thanks for the review, i will process the comments and see if i can add a example WebServlet in https://github.com/apache/felix-dev/tree/master/http/samples/whiteboard/src/main/java/org/apache/felix/http/samples/whiteboard as part of this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2063767665
Thanks @paulrutter for your work, I think we should go with what we have here and leave the abstract class out of the main bundle for now. Someone who wants to do websockets can easily pick up that class from the sample
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-1968304091
@cziegeler yes, i tried that. But it's quite hard to determine which bundles you need, with all the transitive (and partly overlapping) dependencies.
See for example https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/jetty-websocket-jetty-server/12.0.6/jetty-websocket-jetty-server-12.0.6.pom.
I could not get all those separate bundles to start, but i might not have the tried with the right combination of bundles.
Since http2 is bundled with Felix Http, which is in the same order as websockets, adding websockets to the bundle as well made most sense to me. Also, since it was part of the former Felix http bundle for Jetty 9/11.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2061971332
@cziegeler what would be needed to get this merged?
I haven't gotten to the example yet though, is that the only thing still pending?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on code in PR #298:
URL: https://github.com/apache/felix-dev/pull/298#discussion_r1505437449
##########
http/jetty12/pom.xml:
##########
@@ -37,12 +37,12 @@
<connection>scm:git:https://github.com/apache/felix-dev.git</connection>
<developerConnection>scm:git:https://github.com/apache/felix-dev.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=felix-dev.git</url>
- <tag>org.apache.felix.http.jetty12-1.0.2</tag>
+ <tag>org.apache.felix.http.jetty12-1.0.3</tag>
</scm>
<properties>
<felix.java.version>17</felix.java.version>
- <jetty.version>12.0.5</jetty.version>
+ <jetty.version>12.0.6</jetty.version>
Review Comment:
I've updated to 12.0.6 with a separate issue
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler merged PR #298:
URL: https://github.com/apache/felix-dev/pull/298
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2027184334
There is a osgi spec planed for websockets. May be interesting for you to look into this process and be a part of it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on code in PR #298:
URL: https://github.com/apache/felix-dev/pull/298#discussion_r1505511765
##########
http/jetty12/pom.xml:
##########
@@ -37,12 +37,12 @@
<connection>scm:git:https://github.com/apache/felix-dev.git</connection>
<developerConnection>scm:git:https://github.com/apache/felix-dev.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=felix-dev.git</url>
- <tag>org.apache.felix.http.jetty12-1.0.2</tag>
+ <tag>org.apache.felix.http.jetty12-1.0.3</tag>
</scm>
<properties>
<felix.java.version>17</felix.java.version>
- <jetty.version>12.0.5</jetty.version>
+ <jetty.version>12.0.6</jetty.version>
Review Comment:
I will sync with master once that's merged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-1968369815
I created https://issues.apache.org/jira/browse/FELIX-6692 to further track this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-1968425924
I'm having a hard time getting an example to work when using the https://github.com/apache/felix-dev/tree/master/http/samples/whiteboard/src/main/java/org/apache/felix/http/samples/whiteboard bundle, somehow the websocket servlet is not getting initialized. I probably won't get to this part today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2027667694
Then please come to the next osgi apec Meeting.
All Public and you are welcome.
https://calendar.google.com/calendar/embed?src=c_fh3lhb5p0l29f6phu2ndifh4a4%40group.calendar.google.com&ctz=America%2FNew_York
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on code in PR #298:
URL: https://github.com/apache/felix-dev/pull/298#discussion_r1503058578
##########
http/jetty12/pom.xml:
##########
@@ -181,6 +181,9 @@
org.apache.commons.*
</Conditional-Package>
<Import-Package>
+ jakarta.annotation.*;resolution:=optional,
Review Comment:
These additions were needed, otherwise the bundle would not start because of missing dependencies. Not sure why though, as the Jetty websocket bundles should be Jakarta agnostic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on code in PR #298:
URL: https://github.com/apache/felix-dev/pull/298#discussion_r1505437215
##########
http/jetty12/pom.xml:
##########
@@ -414,6 +422,21 @@
<artifactId>jetty-session</artifactId>
<version>${jetty.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>jetty-websocket-jetty-api</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>jetty-websocket-jetty-server</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>jetty-websocket-jetty-client</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
<dependency>
Review Comment:
I think we should not include the client and only server parts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2027195186
I noticed that and linked it already, would be interesting indeed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2039997770
Jetty 12.0.8 is available.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2063827922
Thanks for merging! I might add some information to the README about this in a separate PR.
Will a new release follow soon?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2064888158
Minor doc update pr here https://github.com/apache/felix-dev/pull/307
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "stbischof (via GitHub)" <gi...@apache.org>.
stbischof commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2027183245
Would be great so try to move to 12.0.8 as soo as it is released. Because there are was a breaking pi change in jetty. Bwtween 12.03 and 12.0.7
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2027712113
Thanks, i might join depending on my availabity. I added some comments to the draft here https://github.com/osgi/osgi/issues/575#issuecomment-2027711315.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add jetty websocket support to Jetty12 [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-2063428565
I now have a working example, which outputs something like the following:
```
g! ## [servlet1] Init with config [org.apache.felix.http.base.internal.handler.ServletConfigImpl@3d36ae4f]
## [servlet2] Init with config [org.apache.felix.http.base.internal.handler.ServletConfigImpl@46f7eff4]
## [filter1] Init with config [org.apache.felix.http.base.internal.handler.FilterConfigImpl@3d13614c]
## [filter2] Init with config [org.apache.felix.http.base.internal.handler.FilterConfigImpl@52eac941]
## [websocketservlet1] Init, delaying init call until service method is called...
## [filter1] Filter request [ServletRequestWrapper->org.eclipse.jetty.ee10.servlet.ServletApiRequest@6a131dfe]
## [filter1] Filter request [ServletRequestWrapper->org.eclipse.jetty.ee10.servlet.ServletApiRequest@36faee65]
## [websocketservlet1] Delayed init...
## [websocketservlet1] Ensuring websockets
## [websocketservlet1] Configuring WebSocket factory
## [websocketservlet1] Upgrading to websocket request...
## [websocketservlet1] Done, upgrading to websocket request.
## [class org.apache.felix.http.samples.whiteboard.TestWebSocketServlet$TestWebSocket] Opened session: WebSocketSession[to=PT30S,WebSocketCoreSession@3dc5da96{SERVER,WebSocketSessionState@3406391d{CONNECTED,i=NO-OP,o=NO-OP,c=null},[ws://localhost:8080/filtersample/websocket/test,null,false.[permessage-deflate]],af=true,i/o=4096/4096,fs=65536}->JettyWebSocketFrameHandler@1b5be01d[org.apache.felix.http.samples.whiteboard.TestWebSocketServlet$TestWebSocket],JettyWebSocketFrameHandler@1b5be01d[org.apache.felix.http.samples.whiteboard.TestWebSocketServlet$TestWebSocket]]
## [class org.apache.felix.http.samples.whiteboard.TestWebSocketServlet$TestWebSocket] Received message: test
```
The last message is the websocket message received via the browser, which can be invoked via the Chrome Console:
```
const websocket = websocket = new WebSocket("ws://localhost:8080/filtersample/websocket/test");
websocket.send("test");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "cziegeler (via GitHub)" <gi...@apache.org>.
cziegeler commented on PR #298:
URL: https://github.com/apache/felix-dev/pull/298#issuecomment-1968277103
Thanks @paulrutter . Did you try installing the required bundles in addition to the Apache Felix jetty12 bundle?
I'm not totally against embedding this support, but would prefer having it optional.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Jetty 12.0.6 and add jetty websocket support [felix-dev]
Posted by "paulrutter (via GitHub)" <gi...@apache.org>.
paulrutter commented on code in PR #298:
URL: https://github.com/apache/felix-dev/pull/298#discussion_r1505514860
##########
http/jetty12/pom.xml:
##########
@@ -414,6 +422,21 @@
<artifactId>jetty-session</artifactId>
<version>${jetty.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>jetty-websocket-jetty-api</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>jetty-websocket-jetty-server</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty.websocket</groupId>
+ <artifactId>jetty-websocket-jetty-client</artifactId>
+ <version>${jetty.version}</version>
+ </dependency>
<dependency>
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@felix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org