Hello World with Couchbase and Java

About the Author

Raghavan "Rags" Srinivas is a Developer Advocate at Couchbase getting his hands dirty with emerging technology directions and trends. His general focus area is in distributed systems, with a specialization in cloud computing. He worked on Hadoop and HBase during its early stages. He has spoken on a variety of technical topics at conferences around the world, conducted and organized Hands-on Labs and taught graduate classes in the evening.
Rags brings with him about 20 years of hands-on software development and about 10 years of architecture and technology evangelism experience. He worked for Digital Equipment Corporation, Sun Microsystems, Intuit and Accenture. He has worked on several technology areas, including internals of VMS, Unix and NT to Hadoop and HBase. He has evangelized and influenced the architecture of a number of technology areas including the early releases of JavaFX, Java, Java EE, Java and XML, Java ME, AJAX and Web 2.0, Java Security and so on.
Rags holds a Masters degree in Computer Science from the Center of Advanced Computer Studies at the University of Louisiana at Lafayette.

Tags

My favorite technical book of all time has been the C Programming Language by Kernighan and Ritchie affectionately referred to as K&R. They popularized a term that will ever be in a developer parlance - Hello World.

This innocous looking program has helped launch the careers of many a programmer and has been the basis of the wild success of many an API. Dennis Ritchie who passed away recently, or as some would refer to it as returned from main(), was also inspirational in creating the Unix Operating System.

What the program does is very simply to get the value of a key that was just set. However, in a distributed system, there are no guarantees due to the inherent dynamic nature of the system. The eight fallacies of distributed computing goes into greater details on this. From a programmer's perspective, the Java client libraries for Couchbase abstract this dyamic nature of a cluster. They provide a basic set of operations such as get and set which is available in either synchronous or asynchronous forms. It's possible to use these simple operations in conjunction with operations that help implement atomicity such as check and set(cas) to implement high performant and scalable systems for the real world.

Any more and I am deviating from the philosophy of the Hello World.

I will be contributing more towards using Couchbase with the Java client libraries, but in the meantime, here are a few useful links.