O'Reilly logo

Clojure Programming Cookbook by Nicolas Modrzyk, Makoto Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Spyglass and Couchbase to share state between JVMs

Spyglass is a very fast Memcached client to share states between JVMs.

Spyglass is a future complete client to support almost all of the Memcached protocol operations, as well as binary and text protocols. Spyglass supports not only synchronous accesses to Memcached but also asynchronous accesses to it.

We will use a Couchbase Server as a Memcached server and access it using Spyglass.

Getting ready

Installing Couchbase and setting up Memcached takes several steps. We will instruct you how to do them.

Setting up dependencies in project.clj

You need to add the spyglass to your project.clj file to run samples (or any other dependency management you are using):

:dependencies [[org.clojure/clojure "1.8.0"] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required