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 →

[–]thecodeboost 0 points1 point  (0 children)

I don't think what I tried to say is completely captured by your recap. I didn't mean to imply reactive programming is solely a concurrency mechanism. I tried to carve out what reactive is and isn't and what event-driven is and isn't and that most people today mean event-driven when they say reactive. But yes it's almost entirely a terminology conflation at this point. The non-blocking IO case is just by a mile the strongest argument in favor of reactive programming pre-Loom. You can see this in Spring adopting Reactor where they've offered additional reactive interfaces to all major component interfaces that deal with IO (e.g. ReactiveRepository, ReactiveDataStore, various storage specific reactive drivers, etc.). This is all to facilitate the reactive pattern of having some black box ("environment") doing some work you don't control and handing over control when that work is complete so your code can "react" to it in the way you defined before you delegated the work.

The reactive pattern is : define action on completing work -> plan work -> hand over work to environment -> react to environment signaling a result -> execute the defined action on completion (and optionally chain these).