Closed cbornet closed 6 years ago
The generator could also have a common mother class + mustache file as the diff between implementations would be mostly an import and maybe the class/method prefix.
Maybe some others could also be generified.
Perhaps. Do you have a working POC using these classes? I'm hesitant to move these classes prematurely since they weren't written with other reactive technologies in mind.
If POC work with other reactive technologies shows they can be used with no or minimal modification, we could move them up into a contrib/reactive namespace under grpc-java-contrib.
My Reactor port is in good way : I have everything working except the TCK. I copied the classes above as-is without modification so it would be great to have them in contrib/reactive.
As for the Reactor gen, do you prefer that I PR on this repo or that I maintain it in another one (most of the code is yours, I only did a portage) ?
See my branch here. I now have everything working (the changes for the TCK were very straight-forward).
This looks great! I was thinking of splitting the rx packages off from the contrib stuff into its own repo, since they change at different rates and for different reasons. Also, the rx tests take so long to validate everything.
A proposed layout would look like:
What do you think?
👍 I let you create it. Just give me credit for the reactor part 😄
@rmichela Do you need help on this ? If you create the repo, I can do PRs.
I'm working on creating the repo now. (Process and all) It should be up in a day or so.
@cbornet I've created the new repo and set you up as a collaborator. You can now move your code and do the refactoring you need to get a common base module.
:+1:
RxGrpc can now be found at https://github.com/salesforce/reactive-grpc. Continued work on this issue will happen there.
Working on porting rxgrpc to Spring's Reactor, I realized that some of the rxgrpc classes don't depend on RxJava and could be mutualized between all reactive-streams implementations (RxJava, Reactor, Akka-streams, ...) Those are : CancellableStreamObserver, RxExecutor, RxStreamBackpressureOnReadyHandler, RxStreamObserverPublisher Maybe some others could also be generified.
So it would be great to have these in an artifact independant of the underlying reactive implementation.