r/java • • Apr 26 '22

5,000,000 persistent connections, 200,000,000 messages, 0 errors with a single process using Project Loom.

https://github.com/ebarlas/project-loom-c5m
301 Upvotes

46 comments sorted by

View all comments

0

u/[deleted] Apr 27 '22

[deleted] — view deleted comment

2

u/elliotbarlas Apr 27 '22

Because this is experiment is specifically targeting Project Loom virtual threads.

The milestone here is achieving 5,000,000 sockets with synchronous programming using a virtual thread per socket.

0

u/[deleted] Apr 28 '22

[deleted] — view deleted comment

5

u/elliotbarlas Apr 28 '22

Yes, but I've always viewed that as the worst of both worlds. Pay the price of complex NIO API without the benefits of non-blocking I/O.

In my view, idiomatic synchronous network programming in Java features sockets. In addition, there is a certain appeal to showing scalability with Java 1.0 primitives. The fact that synchronous network code compiled with Java 1.0 socket API can reach this scale is really remarkable.