Posts

Showing posts from 2014

An Asynchronous World

Image
This article aims to spot a light on asynchronous data processing in the Java world. But let's at first talk a bit about the difference between synchronous and asynchronous operation execution. A synchronous execution means that you perform an operation on the client side by then waiting until the result is returned by the server. The sends are in sync with the retrievals and so the execution of multiple operations is in sequence. This means that the client side execution is blocked until the operation returns.  An asynchronous execution, on the other hands side, means that the client is just performing operation calls (requests) to the server by not waiting for the immediate result. The client is not blocked and just continues to perform operations calls. Therefore the result which is returned by the server has to be handled as soon as it arrives at the client side. The order in which the results are arriving may not be the same as the order of the original requests. The f

Understanding Couchbase's Elasticsearch configuration

Preamble  Couchbase Server can be used together with Elasticsearch. This makes quite sense because Full-Text-Search is not one of the main purposes of a Key-Value-Store. Instead an external (also scalable) search engine should be used in order to tokenize and index the data for full text search purposes. How it works with Couchbase is that you can install a transport plug-in to your Elasticsearch instance. You then can configure Couchbase's XDCR (Cross Data Centre Replication) feature in order to replicate the JSON documents to Elasticsearch and to let index your JSON data there. Then you can perform full text searches by using the Lucene Query Languge by getting the resuting keys (of Documents those are stored in Couchbase) back. Further details can be found at http://docs.couchbase.com/couchbase-elastic-search/ . Elasticsearch Basics Let's talk a bit about the Elasitcsearch terminology before we spot a light on Couchbase's default Elasticsearch configuration. Do

How to use Couchbase Lite with Android

Image
This article should just explain what you need to do in order to use Couchbase Lite in your Android App. It is more or less following the tutorial of the documentation by summarizing it a bit. So what you need first is an Android project. I used Android Studio (and Gradle as the build framework). The build script is looking as the following one: Build script It shows which additional dependencies are required. Additionally you should download the following library and save it under the 'libs' directory of your project Additional dependency After you synchronized your Gradle project (All the other additional dependencies will be downloaded from the Maven repositories) you should be able to use the Couchbase Lite classes in your Android application. Let's begin with the Layout definition of our mobile app: Layout definition Our example app is just connecting to a database (by creating it) and then stores a document with a specific id. We will then retrie