Win a copy of Pipeline as Code this week in the Cloud/Virtualization 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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: 16
5
  • 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

 
Police line, do not cross. Well, this tiny ad can go through:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic