Skip to content

Commit bf233eb

Browse files
committed
Working
1 parent 8715655 commit bf233eb

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
## FusionAuth HTTP client and server ![semver 2.0.0 compliant](http://img.shields.io/badge/semver-2.0.0-brightgreen.svg?style=flat-square) [![test](https://github.com/FusionAuth/java-http/actions/workflows/test.yml/badge.svg)](https://github.com/FusionAuth/java-http/actions/workflows/test.yml)
22

3-
**NOTE:** This project is in progress. Version `0.3.0` is production ready, version `0.4.0` which will likely become `1.0.0` is still in development.
3+
### Latest versions
4+
5+
* Latest stable version: `0.3.0`
6+
* Latest release candidate: `1.0.0-RC.1`
7+
* Using Java Virtual Threads
48

59
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.
610

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
11+
For more information about Project Loom and virtual threads, please review the following link.
12+
* https://blogs.oracle.com/javamagazine/post/java-virtual-threads
813

914
## Project Goals
1015

@@ -21,20 +26,20 @@ To add this library to your project, you can include this dependency in your Mav
2126
<dependency>
2227
<groupId>io.fusionauth</groupId>
2328
<artifactId>java-http</artifactId>
24-
<version>0.4.0-RC.7</version>
29+
<version>1.0.0-RC.1</version>
2530
</dependency>
2631
```
2732

2833
If you are using Gradle, you can add this to your build file:
2934

3035
```groovy
31-
implementation 'io.fusionauth:java-http:0.4.0-RC.7'
36+
implementation 'io.fusionauth:java-http:1.0.0-RC.1'
3237
```
3338

3439
If you are using Savant, you can add this to your build file:
3540

3641
```groovy
37-
dependency(id: "io.fusionauth:java-http:0.4.0-RC.7")
42+
dependency(id: "io.fusionauth:java-http:1.0.0-RC.1")
3843
```
3944

4045
## Examples Usages:
@@ -110,9 +115,9 @@ public class Example {
110115

111116
### TLS
112117

113-
The HTTP server implements TLS 1.0-1.3 using the Java SSLEngine. To enable TLS for your server, you need to create an `HTTPListenerConfiguration` that includes a certificate and private key. Most production use-cases will use a proxy such as Apache, Nginx, ALBs, etc. In development, it is recommended that you set up self-signed certificates and load those into the HTTP server.
118+
The HTTP server implements TLS `1.0-1.3` using the Java SSLEngine. To enable TLS for your server, you need to create an `HTTPListenerConfiguration` that includes a certificate and private key. Most production use-cases will use a proxy such as Apache, Nginx, ALBs, etc. In development, it is recommended that you set up self-signed certificates and load those into the HTTP server.
114119

115-
To set up self-signed certificates on macOS, you can use the program `mkcert`. Here is an example:
120+
To set up self-signed certificates on macOS, you can use the program `mkcert` with the following example.
116121

117122
```shell
118123
brew install mkcert
@@ -121,6 +126,8 @@ mkdir -p ~/dev/certificates
121126
mkcert -cert-file ~/dev/certificates/example.org.pem -key-file ~/dev/certificates/example.org.key example.org
122127
```
123128

129+
Note, if you are using Linux, once you install `mkcert` the instructions should be the same.
130+
124131
In production environments, your certificate will likely be signed by one or more intermediate Certificate Authorities. In addition to the server certificate, ensure that all intermediate CA certificates in the chain are included in your pem file.
125132

126133
Now you can load these into the HTTP server like this:
@@ -171,7 +178,7 @@ The load test configuration is set to `100` clients with `100,000` requests each
171178

172179
All the servers were HTTP so that TLS would not introduce any additional latency.
173180

174-
Here are the current test results:
181+
Here are the current test results: (in progress...)
175182

176183
| Server | Avg requests per second | Failures per second | Avg latency in ms | Normalized Performance (%) |
177184
|----------------|---------------------------|-----------------------|-------------------------|----------------------------|
@@ -257,7 +264,7 @@ Let's face it, NIO is insanely complex to write and maintain. The first 3 versio
257264

258265
## Helping out
259266

260-
We are looking for Java developers that are interested in helping us build the client and server. If you know a ton about networks and protocols and love writing clean, high-performance Java, contact us at [email protected].
267+
We are looking for Java developers that are interested in helping us build the client and server. If you know a ton about networks and protocols and love writing clean, high-performance Java, contact us at `[email protected]`.
261268

262269
## Building with Savant
263270

build.savant

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ restifyVersion = "4.2.1"
1818
slf4jVersion = "2.0.17"
1919
testngVersion = "7.11.0"
2020

21-
project(group: "io.fusionauth", name: "java-http", version: "0.4.0-RC.7", licenses: ["ApacheV2_0"]) {
21+
project(group: "io.fusionauth", name: "java-http", version: "1.0.0-RC.1", licenses: ["ApacheV2_0"]) {
2222
workflow {
2323
fetch {
2424
// Dependency resolution order:

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>io.fusionauth</groupId>
44
<artifactId>java-http</artifactId>
5-
<version>0.4.0-RC.7</version>
5+
<version>1.0.0-RC.1</version>
66
<packaging>jar</packaging>
77

88
<name>Java HTTP library (client and server)</name>
@@ -188,4 +188,4 @@
188188
</build>
189189
</profile>
190190
</profiles>
191-
</project>
191+
</project>

src/main/java/module-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module io.fusionauth.http {
2-
exports io.fusionauth.http.client;
32
exports io.fusionauth.http.io;
43
exports io.fusionauth.http.log;
54
exports io.fusionauth.http.security;

0 commit comments

Comments
 (0)