Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 33
11
  • 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

 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic