▲ | rr808 3 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
I just hope with new lightweight threads I never have to write async reactive code again. It was a such an unproductive mistake, most applications do not need that level of complexity - now we can confidently say no applications need that level of added complexity. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | vips7L 2 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Even for the applications that need reactive I do wonder if anyone has actually done the financial analysis between the extra developers and development time needed for reactive vs just throwing more servers at the problem. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | mrkeen 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
It was a better model for reasoning about concurrency, i.e. evaluate two expressions, rather than where virtual threads is headed, i.e. "you don't have to learn anything" - just spawn two threads, keep writing sequences of statements and pretend nothing's changed since the 90s. https://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | piokoch 3 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Well, I hoped too. The problem is that "lightweight" are not that lightweight, as they need garbage collection. So, in theory, one can create 100K threads on one machine, but in practice that's going to keep burning processor for GC cycles. Another thing is what those lightweight threads are doing? If they play with CPU that's ok, you pay GC penalty and that's all. But if they access limited resources (database, another HTTP service), etc. in real application you face the standard issue: you cannot hit the targeted system with any data you want, this external system will backfire, sooner or later. The good thing in reactive programming is that it does not try to pretend that above problem does not exist. It forces to handle errors, to handle backpressure, as those problems will not magically disappear when we switch to green threads, lightweight threads, etc. There is no free lunch here, network has its restrictions, databases has to write do disk eventually, and so on. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|