Hi Folks, does anyone know the advantages of using...
# server
a
Hi Folks, does anyone know the advantages of using coroutines over project reactor? Are they mutually exclusive or do they compliment each other or do they do the same thing in different ways? Also is there a facility/library solution in Kotlin similar to what BlockHound offers in Java or should we just stick to BlockHound to panic the blocking calls?
c
you can use blockhound, coroutines-debug has support for it. also coroutines and reactor are the same paradigm, there are even reactor compatiblity layers in coroutines.
👍🏽 1
👍 1
the kotlin way would be to just use coroutines. but investigating how reactor works is also educational and helps to understand coroutines.
m
@Arun have you taken a look at using Kotlin Flows in a declarative style? It makes use of coroutines, but has the more functional and declarative feel of Project Reactor
a
@Michael Clark no I've not. We use project reactor heavily and wanted to know about alternatives in Kotlin. Flow seems nice. Is it stable/ used in production? The article talks about instability, may be cus it's from 2019?
@Arun according to this page, "*The
Flow
interface is not stable for inheritance in 3rd party libraries*, as new methods might be added to this interface in the future, but is stable for use."
Where I work currently, we haven't used Flow on production code, but I do use it regularly in testing, and have never had a problem with it