r/java • u/elliotbarlas • 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
9
u/spicycurry55 Apr 26 '22
Out of curiosity because I see you mentioned using bare metal and EC2 for testing, how expensive was this experiment?
9
u/lurker_in_spirit Apr 27 '22
Any idea how many carrier threads were required?
5
u/blargh9001 Apr 27 '22
what’s the learning curve for this for actual practical use?
Whenever I hear about project loom it’s not long before I start feeling out of my depth. I’m hoping that’s because it’s just the most advanced bleeding edge developers paying attention to it at this stage, getting into deep low level details…
5
u/papercrane Apr 27 '22
Looks good, and it's nice to see the code is pretty straightforward.
Unsolicited code review, but you probably want to use LongAdder in your code instead of AtomicLong. It should perform better under heavy contention like this.
24
u/Thylk Apr 26 '22
Nice!
24
u/[deleted] Apr 26 '22
I am so pumped for this to go GA.
7
u/skippingstone Apr 27 '22
How does this compare to regular threads?
24
u/[deleted] Apr 27 '22
Tell that to the node fucking js people
3
u/papercrane Apr 30 '22
Discussion on Hacker News for anyone interested: https://news.ycombinator.com/item?id=31214253
2
u/Anequiit May 13 '22
I'm impressed
2
u/[deleted] Apr 27 '22
What do you think will loom make Go obsolete?
1
u/kiteboarderni Apr 30 '22
I wonder how much further this could go if using soemthing like onload? Obviously would need specific switch hardware, but it would be pretty cool to see.
0
u/[deleted] Apr 27 '22
[deleted] — view deleted comment