• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Reactive Streams in Java : Drawbacks

 
Greenhorn
Posts: 12
2
Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Reactive programming is popular. Since Java 8, functional programming style is really loved, especially streams. This topic is attractive.

But everything has drawbacks. When shouldn't we use reactive streams?

Thanks in advance,
Ayşenur.
 
Author
Posts: 24
10
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good question.

The drawbacks are in overhead and complication. For example, Exception stack traces will become very large and confusing.

You should not use reactive streams for any application that already works well without it. For example do not use it for something that is single threaded and does make a lot of blocking method calls. Also don't use it if using a ExecutorService would work just as well. https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html

It works well for complex, high traffic, multi-threaded applications with a mix of computation and blocking calls that need close to real-time latency and response times.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic