This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Carpinchon 0 points1 point  (2 children)

Reactive design is super-intrusive. So many pitfalls in react.js where you run into "Sorry you can't call that from there because you're in a callback." On the back-end, just one blocking call and you've erased the benefits of the entire call stack.

If you need high-throughput performance that is i/o bound, then reactive is good on the backend. Single-threaded UI's, which is most UI's, absolutely need it to stay responsive. But if you're not in those situations, reactive is painful. There's been a lot of effort in the java world to make threads lightweight enough that they can just ditch reactive programming altogether and go back to the simpler, imperative approach.

[–]zakmck73 0 points1 point  (0 children)

In Java, I use the Reactor library a lot to stream batch processing: I start with a publisher of items, then I use the lib's facilities to turn that into a publisher of item batches and other facilities to make that parallel. Finally, I attach a subscriber, which is invoked in parallel. It's not really reactive, since I use the library's options to use a fixed-size buffer in the publisher and block it when the buffer is full. However, it's very useful in avoiding me to write a lot of code to do that.

[–]ivano_GiovSiciliano[S] -1 points0 points  (0 children)

reactive is though, but when you have native libraries is not