Project Reactor Support
thepaep opened this issue · 17 comments
I would like to know in which components there is support for Project Reactor and which doesn't. Is there any chance of specifying this to me?
I couldn't understand it from the documentations
Hi @thepaep,
Spring Content REST is based on Spring MVC. Supporting reactor is on the list. I just haven't gotten to it yet. That said, I have worked quite hard to support streaming content (from databases especially) so I would be curious to understand the advantages of supporting "reactor" from a content transfer perspective. Or is it just the case that if you choose reactor over mvc for you app then all of the endpoints need to support it?
I haven't seen any usage of Project Reactor also on the databases integrations, so I couldn't quite get what you mean.
There are lots of advantages that are not only in the REST. Reading and writing reactively is much better than the blocking and synchronous way. This is pretty much true for every IO operation we can do.
FYI, Brian Goetz, the architect for the Java language at Oracle, says that “Project Loom will kill reactive programming” https://www.youtube.com/watch?v=9si7gK94gLo&t=1163s
I'm just passing the message, I'm too newbie to have an educated opinion about it.
Thanks for the info @thepaep @JeroenAdam.
@JeroenAdam I had not heard about Project Loom so I will investigate.
@thepaep given that databases don't do anything "reactive" when it comes to serving content I think what we are really saying is that if you choose to create a spring reactive web application and you want to associate content with your entities you would like the Spring Content REST endpoints to just work. That way you get the advantages of "reactive" (more efficient serving and back pressure and so) for you entities as well as being able to associate content with those entities too.
Another question. What storage module(s) would you want to use? spring-content-jpa, or something else like spring-content-s3 or ???
@JeroenAdam this is a very hyped and unrealistic comment. Project loom is great and we all expect it. meanwhile, we have to use reactive programming, so when Loom will be released let's talk (years to come).
@paulcwarren I'm using S3. And yes, once my application is Reactive I don't want to block in any IO operation.
Thanks @thepaep,
So perhaps introducing a ReactiveStoreController
that uses a ReactiveContentStore
might be a high-level approach. Where the ReactiveContentStore
is oriented around Mono's and Flux's.
I found this which shows one possible implementation but I will need to look into it more to see if and how it can be applied to SC properly. But as several folks have asked for this so I am happy to spike this out a bit.
Would also love to see some more up-votes on this.
@paulcwarren thanks. Seems great. I just want to note that I personally don't even plan to use this within a REST service, but as an integration service via Spring Integration - a data pipeline.
So, you are more interested in just the ReactiveContentStore
piece then. Got it. Thanks.
I would also like the ReactiveContentStore
feature to be implemented. A reactive adapter for S3 does not even exists in all of the Spring-Cloud-AWS
projects due to inactivity of them. Such an implementation would be amazing
So, you are more interested in just the
ReactiveContentStore
piece then. Got it. Thanks.
@paulcwarren Indeed.
Wanted feature !!
Any updates? @paulcwarren
No updates as of yet. I am just finishing off a fairly large features to add support for multiple and nested properties and then I intend to pick this up (along with better byte range support) so I am afraid it is going to be a minute BUT it is the next thing up.
Awesome. Thank you
Draft PR. Initial investigation to aid learning.
Comments welcome
Released Java API in 2.1.0 along with this example project
Amazing. Thanks a lot!