{"id":20246,"date":"2014-01-08T16:00:35","date_gmt":"2014-01-08T14:00:35","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=20246"},"modified":"2014-01-07T23:08:37","modified_gmt":"2014-01-07T21:08:37","slug":"reactive-cassandra","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html","title":{"rendered":"Reactive Cassandra"},"content":{"rendered":"<p>Or an adventure on reading data reactively from Cassandra.<\/p>\n<h2>Overview<\/h2>\n<p>Let&#8217;s first try to define what reactive means from programming point of view.<\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Functional_reactive_programming\" target=\"_blank\">Functional reactive programming <\/a>is programming paradigm for reactive programming using the building blocks of functional programming.<\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Functional_programming\" target=\"_blank\">Functional programming<\/a> is a programming paradigm, a style of building the structure and the elements of computer programs, that treats computation, as the evaluation of mathematical functions thats avoids state and mutable data. Functional programming emphasises functions that produce results that depend only on \u00a0their inputs and not on program state.<\/p>\n<p>How can we do functional programming in Java? Java is Object Oriented Programming language where mutable state is present everywhere.<\/p>\n<p>Any java developer around the world have used any of the interfaces: <\/p>\n<p>java.lang.Runnable, java.util.Comparator, java.util.concurrent.Callable or java.awt.event.ActionListener. All of this interfaces are having only single method declared. These interfaces are known as Single Abstract Methods or SAM. A popular way as these are used is by creating Anonymous inner classes.<\/p>\n<pre class=\" brush:java\">public class RunnableTest {\r\n  public static void main(Sting[] args){\r\n    new Thread(new Runnable(){\r\n      @Override\r\n      public void run(){\r\n        System.out.println(\"A new thread is running ...\");\r\n      }\r\n    }).start();\r\n  }\r\n}<\/pre>\n<p>Functional Programming in Java is hard since function is not included in the language specification. It will become simpler in Java 8 with introduction of \u201clambda\u2019s\u201d. But how can we do functional programming in Java?<\/p>\n<p>Let\u2019s see a simple example.<\/p>\n<pre class=\" brush:java\">@FunctionalInterface\r\npublic interface Worker {\r\n   public void doWork();\r\n}\r\npublic class FunctionalWorker {\r\n  public static void main(String[] args){\r\n    \/\/ anonymous inner class way\r\n    execute( new Worker(){\r\n      @Override\r\n      public void doWork() {\r\n        System.out.println (\"working ...\");\r\n      }\r\n    });\r\n    \/\/ lambda's way\r\n    execute(() -&gt; System.out.println(\"working in lambda's way ...\"));\r\n  }\r\n\r\n  public static void execute(Worker worker){\r\n    worker.doWork();\r\n  }\r\n}<\/pre>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Functional_programming\" target=\"_blank\">Reactive programming<\/a> is a programming paradigm oriented around data flows and the propagation of changes. For example, in imperative programming setting, a := b+c, would mean that a is being assigned the result of \u00a0b +c in the instant the expression is evaluated. Later values of b or c can be changed without effect on a. In reactive programming, the value of a will be automatically updated based on the new values.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>So, we should have a good understanding of what Functional Reactive Programming is, so let&#8217;s go and build a prototype&#8230;<\/p>\n<h2>Reading data\u00a0reactively\u00a0from Cassandra<\/h2>\n<p>Cassandra is one of the NoSql storage out there is quite popular.<\/p>\n<p>Let&#8217;s imagine that we have to build an Avatar service. This service will store avatars meta information and the content directly in cassandra.<\/p>\n<p>The java driver that we are using is providing us support to query cassandra asynchronous, through the <a href=\"http:\/\/www.datastax.com\/drivers\/java\/1.0\/com\/datastax\/driver\/core\/Session.html#executeAsync(java.lang.String)\" target=\"_blank\">executeAsync()<\/a> method. The invocation of this method will return a Future. As we all know java Futures are block-able and could not be composed.<\/p>\n<p>Ok, so we have async support but we still need a way to be able to read it reactively&#8230;<\/p>\n<p>Netflix built and later open sourced the <a href=\"https:\/\/github.com\/Netflix\/RxJava\" target=\"_blank\">RxJava<\/a> library that is providing Functional Reactive Programming for Java (plus other JVM languages).<\/p>\n<p>Functional reactive offers efficient execution and composition by providing a collection of operators capable of filtering, selecting, transforming, combining and composing Observable&#8217;s.<\/p>\n<p>The Observable data type can be thought of as a &#8220;push&#8221; equivalent to <a href=\"http:\/\/docs.oracle.com\/javase\/7\/docs\/api\/java\/lang\/Iterable.html\">Iterable<\/a> which is &#8220;pull&#8221;. With an Iterable, the consumer pulls values from the producer and the thread blocks until those values arrive. By contrast with the Observable type, the producer pushes values to the consumer whenever values are available. This approach is more flexible, because values can arrive synchronously or asynchronously.<\/p>\n<p>The <a href=\"https:\/\/github.com\/Netflix\/RxJava\/wiki\/Observable\" target=\"_blank\">Observable<\/a> type adds two missing semantics to the Gang of Four&#8217;s <a href=\"http:\/\/en.wikipedia.org\/wiki\/Observer_pattern\">Observer<\/a> pattern, which are available in the Iterable type:<\/p>\n<ol>\n<li>The ability for the producer to signal to the consumer that there is no more data available.<\/li>\n<li>The ability for the producer to signal to the consumer that an error has occurred.<\/li>\n<\/ol>\n<p>With these two simple additions, we have unified the Iterable and Observable types. The only difference between them is the direction in which the data flows. This is very important because now any operation we perform on an Iterable, can also be performed on an Observable.<\/p>\n<p>Let&#8217;s see how we can combine the RxJava and Cassandra async query execution to build an Observable.<code><br \/>\n<\/code><\/p>\n<pre class=\" brush:java\">package net.devsprint.reactive.cassandra;\r\n\r\nimport java.util.concurrent.ExecutorService;\r\n\r\nimport rx.Observable;\r\nimport rx.Observer;\r\nimport rx.Subscription;\r\nimport rx.subscriptions.Subscriptions;\r\n\r\nimport com.datastax.driver.core.ResultSet;\r\nimport com.datastax.driver.core.Session;\r\nimport com.google.common.util.concurrent.FutureCallback;\r\nimport com.google.common.util.concurrent.Futures;\r\n\r\n\/**\r\n * Wraps an async execution of Datastax Java driver into an observable.\r\n * \r\n *\/\r\npublic class ObservableCassandra {\r\n\r\n public static Observable executeAsync(final Session execution,\r\n   final String query, final ExecutorService executorService) {\r\n  return Observable.create(new Observable.OnSubscribeFunc() {\r\n\r\n   @Override\r\n   public Subscription onSubscribe(final Observer observer) {\r\n    try {\r\n     Futures.addCallback(execution.executeAsync(query),\r\n      new FutureCallback() {\r\n\r\n      @Override\r\n      public void onSuccess(ResultSet result) {\r\n       observer.onNext(result);\r\n       observer.onCompleted();\r\n      }\r\n\r\n      @Override\r\n      public void onFailure(Throwable t) {\r\n       observer.onError(t);\r\n      }\r\n      }, executorService);\r\n    } catch (Throwable e) {\r\n     \/\/ If any Throwable can be thrown from\r\n     \/\/ executeAsync\r\n     observer.onError(e);\r\n    }\r\n    return Subscriptions.empty();\r\n   }\r\n  });\r\n }\r\n\r\n}<\/pre>\n<p><a href=\"http:\/\/www.datastax.com\/drivers\/java\/1.0\/com\/datastax\/driver\/core\/Session.html#executeAsync(java.lang.String)\" target=\"_blank\">executeAsync() <\/a>method is returning a <a href=\"https:\/\/code.google.com\/p\/guava-libraries\/wiki\/ListenableFutureExplained\" target=\"_blank\">Guava Listenable Future<\/a>. Adding a callback on this future allows us to properly implement the <a href=\"http:\/\/netflix.github.io\/RxJava\/javadoc\/rx\/Observer.html\" target=\"_blank\">Observer<\/a> interface.<\/p>\n<p>A simple service could be implemented as following:<\/p>\n<pre class=\" brush:java\">package net.devsprint.reactive.cassandra;\r\n\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\n\r\nimport rx.Observable;\r\n\r\nimport com.datastax.driver.core.ResultSet;\r\nimport com.datastax.driver.core.Session;\r\n\r\npublic class AvatarService {\r\n private static final String QUERY = \"select * avatars\";\r\n private static final ExecutorService executorService = Executors\r\n   .newFixedThreadPool(Runtime.getRuntime().availableProcessors());\r\n\r\n private final Session session;\r\n\r\n public AvatarService(Session session) {\r\n  this.session = session;\r\n }\r\n\r\n Observable getAvatars() {\r\n  return ObservableCassandra\r\n    .executeAsync(session, QUERY, executorService);\r\n }\r\n\r\n}<\/pre>\n<p>Assuming that the query is heavy, we are providing a separate execution context where the callback will be executed.<\/p>\n<p>With these two classes we have an Avatar service that could be started but it will not do any thing. It will start fetching the data from Cassandra only when there will be at least one subscriber. A complete example could be found at <a href=\"https:\/\/github.com\/devsprint\/reactive-cassandra\" target=\"_blank\">Reactive Cassandra<\/a>.<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/www.javaadvent.com\/2013\/12\/reactive-cassandra_22.html\">Reactive Cassandra<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> gciuloaica at the <a href=\"http:\/\/www.javaadvent.com\/\">Java Advent Calendar <\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Or an adventure on reading data reactively from Cassandra. Overview Let&#8217;s first try to define what reactive means from programming point of view. Functional reactive programming is programming paradigm for reactive programming using the building blocks of functional programming. Functional programming is a programming paradigm, a style of building the structure and the elements of &hellip;<\/p>\n","protected":false},"author":82,"featured_media":53,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[111,113],"class_list":["post-20246","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-cassandra","tag-nosql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reactive Cassandra<\/title>\n<meta name=\"description\" content=\"Or an adventure on reading data reactively from Cassandra. Overview Let&#039;s first try to define what reactive means from programming point of view.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reactive Cassandra\" \/>\n<meta property=\"og:description\" content=\"Or an adventure on reading data reactively from Cassandra. Overview Let&#039;s first try to define what reactive means from programming point of view.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-01-08T14:00:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-cassandra-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Attila Mihaly Balazs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Attila Mihaly Balazs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html\"},\"author\":{\"name\":\"Attila Mihaly Balazs\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/1e759ed465ee0c4780f341af1eb2e8d3\"},\"headline\":\"Reactive Cassandra\",\"datePublished\":\"2014-01-08T14:00:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html\"},\"wordCount\":744,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-cassandra-logo.jpg\",\"keywords\":[\"Apache Cassandra\",\"NoSQL\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html\",\"name\":\"Reactive Cassandra\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-cassandra-logo.jpg\",\"datePublished\":\"2014-01-08T14:00:35+00:00\",\"description\":\"Or an adventure on reading data reactively from Cassandra. Overview Let's first try to define what reactive means from programming point of view.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-cassandra-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-cassandra-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/01\\\/reactive-cassandra.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Reactive Cassandra\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/1e759ed465ee0c4780f341af1eb2e8d3\",\"name\":\"Attila Mihaly Balazs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8d99694cd5b54234cb981dce531baf062589bccf1737bd6aa847594d76375f8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8d99694cd5b54234cb981dce531baf062589bccf1737bd6aa847594d76375f8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a8d99694cd5b54234cb981dce531baf062589bccf1737bd6aa847594d76375f8?s=96&d=mm&r=g\",\"caption\":\"Attila Mihaly Balazs\"},\"sameAs\":[\"http:\\\/\\\/www.transylvania-jug.org\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Attila-Mihaly-Balazs\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reactive Cassandra","description":"Or an adventure on reading data reactively from Cassandra. Overview Let's first try to define what reactive means from programming point of view.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html","og_locale":"en_US","og_type":"article","og_title":"Reactive Cassandra","og_description":"Or an adventure on reading data reactively from Cassandra. Overview Let's first try to define what reactive means from programming point of view.","og_url":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-01-08T14:00:35+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-cassandra-logo.jpg","type":"image\/jpeg"}],"author":"Attila Mihaly Balazs","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Attila Mihaly Balazs","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html"},"author":{"name":"Attila Mihaly Balazs","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/1e759ed465ee0c4780f341af1eb2e8d3"},"headline":"Reactive Cassandra","datePublished":"2014-01-08T14:00:35+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html"},"wordCount":744,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-cassandra-logo.jpg","keywords":["Apache Cassandra","NoSQL"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html","url":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html","name":"Reactive Cassandra","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-cassandra-logo.jpg","datePublished":"2014-01-08T14:00:35+00:00","description":"Or an adventure on reading data reactively from Cassandra. Overview Let's first try to define what reactive means from programming point of view.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-cassandra-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-cassandra-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/01\/reactive-cassandra.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Reactive Cassandra"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/1e759ed465ee0c4780f341af1eb2e8d3","name":"Attila Mihaly Balazs","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a8d99694cd5b54234cb981dce531baf062589bccf1737bd6aa847594d76375f8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a8d99694cd5b54234cb981dce531baf062589bccf1737bd6aa847594d76375f8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a8d99694cd5b54234cb981dce531baf062589bccf1737bd6aa847594d76375f8?s=96&d=mm&r=g","caption":"Attila Mihaly Balazs"},"sameAs":["http:\/\/www.transylvania-jug.org\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Attila-Mihaly-Balazs"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/20246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=20246"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/20246\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/53"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=20246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=20246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=20246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}