Skip to content

Commit e7c68d8

Browse files
committed
Merge branch 'release/1.3.0'
2 parents 783077f + 8b19aa7 commit e7c68d8

21 files changed

+880
-539
lines changed

.github/workflows/ci-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
os: [ ubuntu-20.04, macos-12, windows-2019 ]
18+
os: [ ubuntu-20.04, macos-13, windows-2019 ]
1919
jdk: [ 8, 11, 17, 21 ]
2020
fail-fast: false
2121

README.md

Lines changed: 23 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,36 @@ websocket codecs, minimal heap allocations on frame path, and compatibility with
1111

1212
### use case & scope
1313

14-
* Intended for dense binary data & small text messages: no extensions (compression) support.
14+
* Intended for dense binary data & text messages: no extensions (compression) support.
1515

1616
* No per-frame heap allocations in websocket frameFactory / decoder.
1717

1818
* Library assumes small frames - many have payload <= 125 bytes, most are < 1500, maximum supported is 65k (65535 bytes).
1919

20+
* On encoder side 3 use cases are supported: frame factory [[1]](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java#L1475) (create bytebuffer and encode frame prefix),
21+
frame encoder [[2]](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java#L1019) (encode frame prefix into provided bytebuffer),
22+
frame bulk-encoder [[3]](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java#L707) (much more performant - encode multiple frames into provided bytebuffer).
23+
2024
* Just codec - fragments, pings, close frames are decoded & protocol validated only. It is responsibility of user code
2125
to handle frames according to protocol (reassemble frame fragments, perform graceful close,
2226
respond to pings) and do utf8 validation of inbound text frames ([utility](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1/src/main/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketFrameListener.java#L81) is provided).
2327

24-
* Single-threaded (transport IO event-loop) callbacks / frame factory API -
25-
in practice user code has its own message types to carry data, and external means (e.g. mpsc / spsc queues) may be used to
26-
properly publish messages on eventloop thread.
28+
### build & binaries
2729

28-
* On encoder side 3 use cases are supported: frame factory [[1]](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java#L1475) (create bytebuffer and encode frame prefix),
29-
frame encoder [[2]](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java#L1019) (encode frame prefix into provided bytebuffer),
30-
frame bulk-encoder [[3]](https://github.com/jauntsdn/netty-websocket-http1/blob/fb7bbb12d4fc0e62a72845dee89fe8f1d86f9a0a/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java#L707) (much more performant - encode multiple frames into provided bytebuffer).
30+
```
31+
./gradlew
32+
```
3133

32-
* Dedicated decoder for case of exchanging tiny messages over TLS connection:
33-
only non-masked frames with <= 125 bytes of payload for minimal per-webSocket state (memory) overhead.
34+
Releases are published on MavenCentral
35+
```groovy
36+
repositories {
37+
mavenCentral()
38+
}
39+
40+
dependencies {
41+
implementation "com.jauntsdn.netty:netty-websocket-http1:1.2.0"
42+
}
43+
```
3444

3545
### performance
3646

@@ -120,57 +130,22 @@ public interface WebSocketCallbacksHandler {
120130
}
121131
```
122132

123-
### configuration
124-
125-
#### default messages decoder
126-
127-
Always expects masked frames, allows mask mismatch [test example](https://github.com/jauntsdn/netty-websocket-http1/blob/bc942b19958c1486ef7414bee9c69ef36a55bfa5/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketHandshakeTest.java#L121)
133+
### testing
128134

129-
server: `allowMaskMismatch: true, maxFramePayloadLength: 65_535`
130-
131-
client: `allowMaskMismatch: true, maxFramePayloadLength: 65_535`
132-
133-
#### small messages decoder
134-
135-
Always expects non-masking frames, disallows mask mismatch [test example](https://github.com/jauntsdn/netty-websocket-http1/blob/bc942b19958c1486ef7414bee9c69ef36a55bfa5/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketHandshakeTest.java#L140):
136-
137-
server: `expectMasked: false, allowMaskMismatch: false, maxFramePayloadLength: 125`
138-
139-
client: `mask: false, allowMaskMismatch: false, maxFramePayloadLength: 125`
140-
141-
### tests
142-
143-
* WebSocket frames [integration test](https://github.com/jauntsdn/netty-websocket-http1/blob/develop/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java):
135+
* WebSocket frames [integration tests](https://github.com/jauntsdn/netty-websocket-http1/blob/develop/netty-websocket-http1-test/src/test/java/com/jauntsdn/netty/handler/codec/http/websocketx/WebSocketCodecTest.java):
144136
control & data frames of all allowed sizes, jauntsdn/netty-websocket-http1 client, netty websocket server.
145137

146138
* WebSocket frames long-running [soak test](https://github.com/jauntsdn/netty-websocket-http1/tree/develop/netty-websocket-http1-soaktest/src/main/java/com/jauntsdn/netty/handler/codec/http/websocketx/soaktest):
147139
exercising all logic paths of codec with 100m of randomized frames over multiple connections: netty websocket client, jauntsdn/netty-websocket-http1 server.
148140

149-
* [Perf test](https://github.com/jauntsdn/netty-websocket-http1/tree/develop/netty-websocket-http1-perftest/src/main/java/com/jauntsdn/netty/handler/codec/http/websocketx/perftest):
150-
per-core throughput of jauntsdn/netty-websocket-http1 client & server.
141+
* [Perf tests](https://github.com/jauntsdn/netty-websocket-http1/tree/develop/netty-websocket-http1-perftest/src/main/java/com/jauntsdn/netty/handler/codec/http/websocketx/perftest):
142+
estimation of per-core throughput of jauntsdn/netty-websocket-http1 client & server.
151143

152144
### examples
153145

154146
`netty-websocket-http1-perftest` may serve as API showcase for both [client](https://github.com/jauntsdn/netty-websocket-http1/blob/develop/netty-websocket-http1-perftest/src/main/java/com/jauntsdn/netty/handler/codec/http/websocketx/perftest/client/Main.java)
155147
and [server](https://github.com/jauntsdn/netty-websocket-http1/blob/develop/netty-websocket-http1-perftest/src/main/java/com/jauntsdn/netty/handler/codec/http/websocketx/perftest/server/Main.java):
156148

157-
### build & binaries
158-
159-
```
160-
./gradlew
161-
```
162-
163-
Releases are published on MavenCentral
164-
```groovy
165-
repositories {
166-
mavenCentral()
167-
}
168-
169-
dependencies {
170-
implementation "com.jauntsdn.netty:netty-websocket-http1:1.1.4"
171-
}
172-
```
173-
174149
## LICENSE
175150

176151
Copyright 2022-Present Maksym Ostroverkhov.

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
group=com.jauntsdn.netty
2-
version=1.2.0
2+
version=1.3.0
33

44
googleJavaFormatPluginVersion=0.9
55
dependencyManagementPluginVersion=1.1.0
66
gitPluginVersion=0.13.0
77
osDetectorPluginVersion=1.7.3
88
versionsPluginVersion=0.45.0
99

10-
nettyVersion=4.1.112.Final
11-
nettyTcnativeVersion=2.0.65.Final
10+
nettyVersion=4.1.116.Final
11+
nettyTcnativeVersion=2.0.69.Final
1212
hdrHistogramVersion=2.1.12
1313
slf4jVersion=1.7.36
1414
logbackVersion=1.2.13
1515
jsr305Version=3.0.2
1616

17-
junitVersion=5.10.2
18-
assertjVersion=3.25.3
17+
junitVersion=5.11.4
18+
assertjVersion=3.26.3
1919

2020
org.gradle.parallel=true
2121
org.gradle.configureondemand=true

netty-websocket-http1-test/gradle.lockfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ com.google.errorprone:javac-shaded:9+181-r4173-1=googleJavaFormat1.6
99
com.google.googlejavaformat:google-java-format:1.6=googleJavaFormat1.6
1010
com.google.guava:guava:22.0=googleJavaFormat1.6
1111
com.google.j2objc:j2objc-annotations:1.1=googleJavaFormat1.6
12-
io.netty:netty-buffer:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
13-
io.netty:netty-codec-http:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
14-
io.netty:netty-codec:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
15-
io.netty:netty-common:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
16-
io.netty:netty-handler:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
17-
io.netty:netty-resolver:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
18-
io.netty:netty-transport-classes-epoll:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
19-
io.netty:netty-transport-classes-kqueue:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
20-
io.netty:netty-transport-native-unix-common:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
21-
io.netty:netty-transport:4.1.112.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
22-
net.bytebuddy:byte-buddy:1.14.11=testCompileClasspath,testRuntimeClasspath
12+
io.netty:netty-buffer:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
13+
io.netty:netty-codec-http:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
14+
io.netty:netty-codec:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
15+
io.netty:netty-common:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
16+
io.netty:netty-handler:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
17+
io.netty:netty-resolver:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
18+
io.netty:netty-transport-classes-epoll:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
19+
io.netty:netty-transport-classes-kqueue:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
20+
io.netty:netty-transport-native-unix-common:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
21+
io.netty:netty-transport:4.1.116.Final=compileClasspath,testCompileClasspath,testRuntimeClasspath
22+
net.bytebuddy:byte-buddy:1.14.18=testCompileClasspath,testRuntimeClasspath
2323
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
24-
org.assertj:assertj-core:3.25.3=testCompileClasspath,testRuntimeClasspath
24+
org.assertj:assertj-core:3.26.3=testCompileClasspath,testRuntimeClasspath
2525
org.codehaus.mojo:animal-sniffer-annotations:1.14=googleJavaFormat1.6
26-
org.junit.jupiter:junit-jupiter-api:5.10.2=testCompileClasspath,testRuntimeClasspath
27-
org.junit.jupiter:junit-jupiter-engine:5.10.2=testRuntimeClasspath
28-
org.junit.jupiter:junit-jupiter-params:5.10.2=testCompileClasspath,testRuntimeClasspath
29-
org.junit.platform:junit-platform-commons:1.10.2=testCompileClasspath,testRuntimeClasspath
30-
org.junit.platform:junit-platform-engine:1.10.2=testRuntimeClasspath
31-
org.junit:junit-bom:5.10.2=testCompileClasspath,testRuntimeClasspath
26+
org.junit.jupiter:junit-jupiter-api:5.11.4=testCompileClasspath,testRuntimeClasspath
27+
org.junit.jupiter:junit-jupiter-engine:5.11.4=testRuntimeClasspath
28+
org.junit.jupiter:junit-jupiter-params:5.11.4=testCompileClasspath,testRuntimeClasspath
29+
org.junit.platform:junit-platform-commons:1.11.4=testCompileClasspath,testRuntimeClasspath
30+
org.junit.platform:junit-platform-engine:1.11.4=testRuntimeClasspath
31+
org.junit:junit-bom:5.11.4=testCompileClasspath,testRuntimeClasspath
3232
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
3333
org.slf4j:slf4j-api:1.7.36=compileClasspath,testCompileClasspath,testRuntimeClasspath
3434
empty=annotationProcessor,testAnnotationProcessor

0 commit comments

Comments
 (0)