[JAVA-2754] Integration between Driver reactive API and Quarkus
Description
Environment
Pull Requests
Activity

Karan Dhingra July 22, 2021 at 12:20 AM
➤ Alexandre Dutra commented:
<p>Pull request URL imported from ( https://datastax-oss.atlassian.net/browse/JAVA-2754 ): datastax/cassandra-quarkus/pull/11 ( https://github.com/datastax/cassandra-quarkus/pull/11 ).</p>

Karan Dhingra July 22, 2021 at 12:20 AM
➤ Alexandre Dutra commented:
<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2754?focusedCommentId=52582">JAVA-2754</a>, originally commented by adutra on Thu, 14 May 2020 11:53:51 GMT.</p>
<hr />
<p>When we look into the vertex-cassandra-client project, CasasandraClientImpl is not "reactive", at least not in the sense that it implements the ReactiveStreams API. It seems this client is essentially using the driver async API.</p>
<p>When looking into vertx-mutiny-cassandra-client project, the only thing it contains is this test: https://github.com/smallrye/smallrye-reactive-utils/blob/master/vertx-mutiny-clients/vertx-mutiny-cassandra-client/src/test/java/io/vertx/mutiny/cassandra/CassandraClientTest.java ( https://github.com/smallrye/smallrye-reactive-utils/blob/master/vertx-mutiny-clients/vertx-mutiny-cassandra-client/src/test/java/io/vertx/mutiny/cassandra/CassandraClientTest.java ).</p>
<p>So, I'm not an expert in Vertex or Mutiny, but I think we should still provide something that looks closer to our ReactiveResultSet and offers some backpressure guarantees.</p>

Karan Dhingra July 22, 2021 at 12:20 AM
➤ Alexandre Dutra commented:
<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2754?focusedCommentId=52581">JAVA-2754</a>, originally commented by tomekl007 on Thu, 14 May 2020 11:03:57 GMT.</p>
<hr />
<p>When investigating the <span> ( https://datastax-oss.atlassian.net/browse/JAVA-2754 ) <span>Reviewing</span> </span> , I found this smallrye-mutiny-vertx-cassandra-client:<br> https://github.com/vert-x3/vertx-cassandra-client ( https://github.com/vert-x3/vertx-cassandra-client ) (it uses java driver 4.x)<br> https://github.com/vert-x3/vertx-cassandra-client/blob/master/src/main/java/io/vertx/cassandra/impl/CassandraClientImpl.java ( https://github.com/vert-x3/vertx-cassandra-client/blob/master/src/main/java/io/vertx/cassandra/impl/CassandraClientImpl.java ) <br> So it seems that vertx has a cassandra-client that works in a reactive way.<br> It seems that Vert.x reactive client can be used with quarkus:<br> https://quarkus.io/guides/getting-started-reactive#using-vert-x-clients ( https://quarkus.io/guides/getting-started-reactive#using-vert-x-clients )</p>
<p>I don’t know how does it compare with our extension?<br> It seems that our extension has a different purpose ( it was upvoted multiple times here:<br> https://github.com/quarkusio/quarkus/issues/7876#issue-582099130) ( https://github.com/quarkusio/quarkus/issues/7876#issue-582099130) )) so I think it is needed. <br> But now I don’t fully understand how does it compare to the reactive solution that is already out there (and uses Vertx)</p>
<p>It seems that for mongo, there is also a similar smallrye reactive client<br> io.smallrye.reactive:smallrye-mutiny-vertx-mongo-client<br> but the mongo extension is re-implementing that (see ReactiveMongoClientImpl)</p>
<p>Should we follow the same path and just implement reactive wrappers around our client? </p>

Karan Dhingra July 22, 2021 at 12:20 AM
➤ Alexandre Dutra commented:
<p>Imported from <a href="https://datastax-oss.atlassian.net/browse/JAVA-2754?focusedCommentId=52534">JAVA-2754</a>, originally commented by tomekl007 on Tue, 5 May 2020 07:46:00 GMT.</p>
<hr />
<p>We should be able to integrate with https://quarkus.io/guides/reactive-routes ( https://quarkus.io/guides/reactive-routes )</p>
Details
Details
Assignee
Reporter

<p>Imported from JAVA-2754, originally reported by tomekl007 on Tue, 28 Apr 2020 12:21:01 GMT.</p>
<hr />
<p>Quarkus is using</p>
<pre>
<span><dependency></span>
<span><groupId></span>io.smallrye.reactive<span></groupId></span>
<span><artifactId></span>mutiny-rxjava<span></artifactId></span>
<span></dependency></span>
</pre>
<p>For reactive API.<br> (see https://quarkus.io/guides/getting-started-reactive)<br> We should provide converters between reactive constructs used in the java-driver (Reactor, rx) to quarkus mutiny API.<br> Once it will be done, the quick-start project should be enhanced with a reactive example, this code could be used:<br> <a href="https://github.com/datastax/cassandra-quarkus/compare/java2683_async?expand=1" rel="nofollow">https://github.com/datastax/cassandra-quarkus/compare/java2683_async?expand=1</a></p>
┆Issue is synchronized with a GitHub issue by Unito
┆Repository Name: cassandra-quarkus
┆Issue Number: 35
┆Milestone: 1.0.0-alpha1