You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding more instrumentation for thread counts and fixing byte count that was ignoring the preamble. Load testing to ensure the server can handle when tons of clients are junk and leave connections open.
Copy file name to clipboardExpand all lines: README.md
+15-18Lines changed: 15 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
3
3
**NOTE:** This project is in progress.
4
4
5
-
The goal of this project is to build a full-featured HTTP server and client in plain Java without the use of any libraries. The client and server will use non-blocking NIO in order to provide the highest performance possible.
5
+
The goal of this project is to build a full-featured HTTP server and client in plain Java without the use of any libraries. The client and server will use Project Loom virtual threads and blocking I/O so that the Java VM will handle all the context switching between virtual threads as they block on I/O.
6
+
7
+
For more information about Project Loom and virtual threads, here is a good article to read: https://blogs.oracle.com/javamagazine/post/java-virtual-threads
6
8
7
9
## Installation
8
10
@@ -12,20 +14,20 @@ To add this library to your project, you can include this dependency in your Mav
12
14
<dependency>
13
15
<groupId>io.fusionauth</groupId>
14
16
<artifactId>java-http</artifactId>
15
-
<version>0.3.4</version>
17
+
<version>0.4.0-RC.2</version>
16
18
</dependency>
17
19
```
18
20
19
21
If you are using Gradle, you can add this to your build file:
@@ -204,15 +207,9 @@ The general requirements and roadmap are as follows:
204
207
205
208
## FAQ
206
209
207
-
### Why no Loom?
208
-
209
-
Project Loom is an exciting development which brings a lot of great new features to Java, such as fibers, continuations and more.
210
-
211
-
Loom is currently available in Java 19 as a preview feature. Therefore, you can't use it without compiled code that is difficult to use in future Java releases.
212
-
213
-
This project is anchored to the Java LTS releases to ensure compatibility. Loom will be evaluated once it is out of preview, and available in an LTS version of Java.
210
+
### Why virtual threads and not NIO?
214
211
215
-
The next scheduled LTS release will be Java 21 set to release in September 2023. We are looking forward to that release and to see if we can leverage the Loom features in this project.
212
+
Let's face it, NIO is insanely complex to write and maintain. The first 3 versions of `java-http` used NIO with non-blocking selectors, and we encountered numerous bugs, performance issues, etc. If you compare the `0.3-maintenance` branch with `main` of this project, you'll quickly see that switching to virtual threads and standard blocking I/O made our code **MUCH** simpler.
216
213
217
214
## Helping out
218
215
@@ -225,8 +222,8 @@ We are looking for Java developers that are interested in helping us build the c
0 commit comments