• 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: integrating reactive and non-reactive

 
Ranch Hand
Posts: 121
IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm newbie in reactive world.
A question: ho do you experience integration between (micro)services implemented using reactive streams with (legacy?) services that don't? Or if you implement your own service using reactive but including third-party libs that don't ?
 
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
Hi,

Integration between microservices should be no different. Reactive Streams are used internally to handle concurrency.

When you're using third-party libraries the main thing to take into consideration is if each method call is blocking or non-blocking and thread safety. When using Reactive Streams typically you can specify a different Scheduler based on if the call causes I/O (network traffic for example) or is CPU heavy (image processing in memory for example).

You need to keep track of whether or not a library is thread-safe. Usually they will say this upfront in the docs, but if not then it probably isn't. If it's not just make sure multiple threads don't modify the same resource at the same time.

Thank for the question,
Adam

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic