5 ms·
> Virtual threads will be a game changer. I never really understand this. Tasks and threadpools work great. Are you excited that you can reduce memory usage? I
by x87678r 6y ago
> Virtual threads will be a game changer.
I never really understand this. Tasks and threadpools work great. Are you excited that you can reduce memory usage? I have never been restricted before.
- specialist 6y agoI really liked Ron Pressler's [1] presentation on his work. The details from the Q&A really helped me. https://youtu.be/23HjZBOIshY?t=152 https://youtu.be/23HjZBOIshY?t=152 This is good too. https://archive.fosdem.org/2020/schedule/event/loom/ https://archive.fosdem.org/2020/schedule/event/loom/ I'll butcher it, but my TLDR is: Program sequentially, get threading for free. Any blocking calls are now async under the hood. [1] aka @pron or https://news.ycombinator.com/user?id=pron https://news.ycombinator.com/user?id=pron
- pron 6y agoI tried explaining that here: https://inside.java/2020/08/07/loom-performance/ https://inside.java/2020/08/07/loom-performance/
- x87678r 6y agoThanks I'm honored you're replying. :) Looks like performance improvement will be nice.
- Traubenfuchs 6y agoDo you know if Loom has any implications for reactive frameworks, like reactive spring? Or do they already contain a... "non native" implementation of this concept? https://spring.io/reactive https://spring.io/reactive
- pron 6y agoWith Loom, the simple, blocking, non-reactive frameworks (like Spring MVC) should give you similar throughput to the reactive ones -- that's the main impact. I don't know how reactive frameworks intend to make use of Loom.
- The_rationalist 6y agoLoom will be a performance game changer even for reactive frameworks. I'm not even talking about it the fact it use io_uring and other SOTA OS technologies. I'm talking about the fact it allows to have a non blocking socket thus enabling for the first time asynchronous jdbc access and thus postrgresql pipelineing/batching. This will allow spring to come at the top 4 fastest http servers on earth according to the benchmarckgame
- pgwhalen 6y agoWhat if your tasks use blocking IO, and the number you tasks you have exceed a reasonable number of threads? Your answer might be to use async, event-driven IO instead, but the central thesis behind virtual threads is that this is a terrible programming model, and there's no reason the programming language can't help you write your code top to bottom, but still get the desired performance.