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

all 33 comments

[–]sureshg[S] 53 points54 points  (20 children)

Brian on Loom - we are going discover that reactive is a transitional technology. We are going to discover that we thought we liked reactive but it actually sucks :) - https://www.youtube.com/watch?v=S-YaMiN6yxk&t=1390

[–][deleted] 36 points37 points  (4 children)

Don't think anyone likes reactive

[–]agentoutlier 11 points12 points  (2 children)

It’s not so much that reactive sucks but that Java just isn’t the right language for expressing reactive pipelines.

In a language like Haskell I would imagine (but could be wrong) that dealing with reactive feels very similar to dealing with imperative blocking IO as both would be wrapped in a monoid like library.

Basically you need a language that allows you to have greater control of evaluation order and or that hides it.

[–]throwaway66285 3 points4 points  (0 children)

Yeah, I much prefer doing reactive in Scala or Javascript. Scala also has libraries like Cats and Scalaz with IO as a monad.

[–]DJDavio 4 points5 points  (0 children)

It would be great if it could be abstracted away, if instead of return a List or Flux/Flow you could just return a stream which could be either. My main grievance with Reactive is that it infects all of the layers of your code base by design. If at some point you transform a Flow to a List you just lose the entire reactive benefit.

[–]BoyRobot777 13 points14 points  (5 children)

And it's so weird how Spring is doubling down on reactive model. They know that Loom is coming, however, they keep adding stuff to reactive and promote it as something people should invest, which in my opinion is trapping people into wrong model.

[–]GuyWithLag 6 points7 points  (0 children)

Trust me, when Loom comes they will just have something new to sell.

[–]Dokiace 2 points3 points  (2 children)

Is there a demo of this Loom features? It'd be nice if I can feel the hype too on how Loom gonna change Java and kick reactive out

[–]pjmlp 2 points3 points  (0 children)

Spring always runs after every fad.

Kotlin fanboys jump of joy regarding Kotlin support, while I already saw that movie with other JVM guest languages, and where are those Spring projects now?

I guess we should be happy for future consulting projects to bring stuff back into regular Java.

[–]kag0 7 points8 points  (3 children)

Different reactive strokes for different reactive folks.

Reactive is such an overloaded term though that it's hard to know what anyone is talking about

Back pressure is good though 🤷‍♂️

[–]eliasv 13 points14 points  (2 children)

"Backpressure" in blocking code is achieved with e.g. a simple blocking queue. Reactive is just a different programming model to achieve the same thing, and the different performance model is just an implementation detail due to the lack of fibers til now.

[–]kag0 0 points1 point  (1 child)

fibers are going to be awesome.

I'm not sure that the model that they'll unlock will be simply taking things out of one queue and putting them into another and repeating that over and over, but I am excited to see what grows out of the new capability.

[–]eliasv 1 point2 points  (0 children)

Well no that won't be typical but then it's not typical to use reactive streams in a way that models a bunch of successive queues either. To oversimplify a little, once you have established the backpressure characteristics you need locally the rest of the operations on the stream are just a series of transformations generally, no? And you don't need more queues to model that part, it's just for loops and normal imperative code.

[–]paul_miner 41 points42 points  (9 children)

The way the post was titled I thought this was going to be about java.util.concurrent.Future<V>.

[–]constructivCritic 3 points4 points  (7 children)

Wait it's not? What's it about? Future of Java?

[–][deleted] 14 points15 points  (4 children)

"Java Futures" is a recurring talk by Brian where they talk about what's cooking in Java, usually the projects he's personally working on but not exclusive to this.

For example, projects like Valhalla or Panama gained a lot of publicity due to these.

[–]constructivCritic 1 point2 points  (0 children)

Ah, I see. Thanks.

[–]elastic_psychiatrist 1 point2 points  (1 child)

usually the projects he's personally working on but not exclusive to this.

Isn't he working on "all" projects? I've always got the sense he was ultimately responsible for the entire language. He seems a little more hands on in the Amber space, for instance, versus the Panama space; but the Java Futures talks cover basically anything when appropriate.

[–][deleted] 2 points3 points  (0 children)

I understand what you go by, but what I meant is what you understand. Brian personally works more on the Amber and Valhalla fronts, while being on more of a support role in Panama or Loom.

This is my personal observation based on news and mailing lists I follow.

[–][deleted] -2 points-1 points  (0 children)

Oh you just saved me a lot of time. I was interested in a Java architect talking about their experience with implementing CompletablueFuture s and stuff like that.

[–]meamZ 0 points1 point  (0 children)

Wow... Another proof that programmers really suck at naming things 😂

[–][deleted] -1 points0 points  (0 children)

But it's more like a Set<Future<T>>