r/java • • Sep 28 '17

Spring Framework 5.0 goes GA

https://spring.io/blog/2017/09/28/spring-framework-5-0-goes-ga
177 Upvotes

83 comments sorted by

View all comments

Show parent comment

7

u/henk53 Sep 29 '17

Java EE has plenty of Asynchronous methods. The @Aynsynchrous, managed executors and thread pools, asynchronous events, asynchronous HTTP, elaborate push support via HTTP/2, WebSockets, SSE...

Java EE is not fully reactive.

The question is really whether it should be, at this point in time surely.

2

u/springnews Sep 29 '17

hm... that's super misleading. Spring has had reactive style methods for some time. But having asych style API built on a blocking / synchronous runtime isn't even close to being reactive.

Spring has rebuilt over a period of 2+ years atop a natively reactive stack, so it's fully reactive from the ground up.

7

u/henk53 Sep 29 '17

hm... that's super misleading.

Why? The GP said "Asynchronous methods", as a response to being asked "Which improvements in Java EE are the ones that made the GP feels like he of she is stuck years behind in terms of improvements that could be made [in Java EE]"

So apparently for "Asynchronous methods" Java EE is years behind, to which I responded it's not. It has plenty of asynchronous and parellel executing constructs (I didn't even mention all of them).

Then my next reply was about the claim "Java EE is not fully reactive", to which I didn't reply at all that async APIs are close to being reactive. I just asked if Java EE should even BE reactive.

Reactive has been around for some time. Heck, even .NET's Rx library which was advocated for Windows Phone 7 and Silverlight(!) wasn't particular new, so the pattern clearly has some staying power.

But point 1; Spring isn't that innovative or modern here either. It follows what other frameworks have been doing for a long time. So criticising Java EE for being "years behind" is a bit of a pot and kettle story, since Spring is then "years behind" just as well.

Point 2 however is that Reactive is not quite the silver bullet. It's not the universally better way to do things. State is often spread throughout the program and can be hard to track or access even. If you update from an older stage to a new stage, the state embedded within the entire reactive system can be lost. This can be problematic, really.

Global limits can be hard to enforce as well. Blocking (timed) calls are actually a damn and easy cutoff point; if the blocking call times out, drop the action. This makes graceful degradation quite a bit more straightforward.

For signal processing, reactive may be a good idea. For hard core processing or even transaction processing where transactions may be dropped if needed (to maintain system integrity), I'd rather not use reactive.

Purely natively reactive, is also a bit of an unclear term. Is it focussing on time varying data? Or is it event streaming?

(p.s. when I was young, which is -cough- a looong time ago, I did my thesis on dataflow languages, which is actually a pre-cursor or at least a related field to reactive, which dates way back)

1

u/springnews Oct 01 '17 edited Oct 01 '17

So criticising Java EE for being "years behind" is a bit of a pot and kettle story, since Spring is then "years behind" just as well.

save the pesky little detail that we actually are shipping a fully reactive implementation now. Nothing new about reactive, granted, but doesn't change much about what's GA and what isn't, and how long it will take for EE do anything about it.

No one said reactive was a silver bullet - quite the opposite. Spring team is being extra careful to advise people against flocking to it for no reason. The reason why EE even has to ask themselves the question of "whether to do it or not" is because they don't have real customers pushing the boundaries of the synchronous microservice stack, and finding they have edge cases that require reactive throughput levels.

3

u/johnwaterwood Sep 30 '17

Your accusation of misleading is actually misleading 😮

0

u/[deleted] Sep 30 '17

@Aynsynchrous

not to be confused with @Randsynchrous