Chapter 9. Data storage with Clojure
This chapter covers
- Using Clojure with MySQL for simple needs
- Using Clojure with HBase for big data
- Using Clojure with Redis for key-value storage
This chapter begins an exciting journey. We’re going to use all the concepts you’ve learned so far and apply them to applications that might be useful in the real world. We’ll start by discussing a simple requirement common to most nontrivial applications, that of storing data.
First, we’ll look at relational database systems because many applications need a standard relational database. MySQL fits the bill for most people, and we’ll examine an open source project that provides functionality to allow Clojure programs to talk to MySQL.
After discussing MySQL, we’ll look at communicating with HBase, which is an open source implementation of Google’s BigTable. These are column-oriented databases that can handle extremely large datasets, often measured in petabytes. The term big data has been used recently to describe such systems, and HBase is one answer to such large-scale data storage requirements.