Ratpack and Cassandra Async

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ratpack and Cassandra Async

Matt
I'm attempting to get Ratpack working with Cassandra and a REST api. What I want is to fire the http request and the cassandra request in parallel, and then join the results together into a single response.

I got the http part working with the ratpack http client, but how can i wire up cassandra's asynch report into a promise that i can join together with the promise from the http client?

Any ideas?
http://www.datastax.com/dev/blog/java-driver-async-queries

Basically it returns a listenablefuture, how can i wire  that up like, say, this?

http://ratpack.io/manual/current/all.html#performing_async_operations



Reply | Threaded
Open this post in threaded view
|

Re: Ratpack and Cassandra Async

beckje01

I have a Cassandra library we are working on open sourcing that does the work of adapting to ratpack promises. I'll work to get this out today for you.

Jeff


On Thu, Nov 19, 2015, 1:23 AM Matt [via Ratpack Forum] <[hidden email]> wrote:
I'm attempting to get Ratpack working with Cassandra and a REST api. What I want is to fire the http request and the cassandra request in parallel, and then join the results together into a single response.

I got the http part working with the ratpack http client, but how can i wire up cassandra's asynch report into a promise that i can join together with the promise from the http client?

Any ideas?
http://www.datastax.com/dev/blog/java-driver-async-queries

Basically it returns a listenablefuture, how can i wire  that up like, say, this?

http://ratpack.io/manual/current/all.html#performing_async_operations






If you reply to this email, your message will be added to the discussion below:
http://forum.ratpack.io/Ratpack-and-Cassandra-Async-tp1356.html
To start a new topic under Ratpack Forum, email [hidden email]
To unsubscribe from Ratpack Forum, click here.
NAML
bm
Reply | Threaded
Open this post in threaded view
|

Re: Ratpack and Cassandra Async

bm
Is there any progress on this?

-Bjørn

beckje01 wrote
I have a Cassandra library we are working on open sourcing that does the
work of adapting to ratpack promises. I'll work to get this out today for
you.

Jeff

On Thu, Nov 19, 2015, 1:23 AM Matt [via Ratpack Forum] <
[hidden email]> wrote:

> I'm attempting to get Ratpack working with Cassandra and a REST api. What
> I want is to fire the http request and the cassandra request in parallel,
> and then join the results together into a single response.
>
> I got the http part working with the ratpack http client, but how can i
> wire up cassandra's asynch report into a promise that i can join together
> with the promise from the http client?
>
> Any ideas?
> http://www.datastax.com/dev/blog/java-driver-async-queries
>
> Basically it returns a listenablefuture, how can i wire  that up like,
> say, this?
>
> http://ratpack.io/manual/current/all.html#performing_async_operations
>
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.ratpack.io/Ratpack-and-Cassandra-Async-tp1356.html
> To start a new topic under Ratpack Forum, email
> [hidden email]
> To unsubscribe from Ratpack Forum, click here
> <http://forum.ratpack.io/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=YmVja2plMDFAZ21haWwuY29tfDF8LTE2NTM2Mjg2MzY=>
> .
> NAML
> <http://forum.ratpack.io/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
Reply | Threaded
Open this post in threaded view
|

Re: Ratpack and Cassandra Async

beckje01
So we have just pushed out the first set of the code for this: https://github.com/SmartThingsOSS/ratpack-cassandra

We will be working on documentation and publishing to bintray but I wanted to get the code out for you right away.

It was just pullout of out one of our internal libraries so there may still be a few rough edges but pull requests are welcome.

Jeff