/plushcap/analysis/datastax/datastax-asynchronous-queries-java-driver

Asynchronous queries with the Java driver

What's this blog post about?

The DataStax Java driver for Cassandra uses an asynchronous architecture, allowing client code to get query results in a non-blocking way via Future instances. This post explores the concept and demonstrates its use in implementing a client-side equivalent to the SELECT...IN query. It also discusses how to handle timeouts and exceptions using ResultSetFutures, which extend ListenableFuture from Google's Guava library. The post further explains how to update a hypothetical GUI with the result of a query using callbacks. Finally, it presents an efficient approach for retrieving data from various partitions in Cassandra by sending individual queries and collating the results client-side.

Company
DataStax

Date published
Oct. 31, 2014

Author(s)
-

Word count
1279

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.