You are previewing NoSQL Web Development with Apache Cassandra.
O'Reilly logo
NoSQL Web Development with Apache Cassandra

Book Description

Apache Cassandra is the most commonly used NoSQL database written in Java and is renowned in the industry as the only NoSQL solution that can accommodate the complex requirements of today's modern line-of-business applications. Cassandra is the technology of choice for such data-driven organizations as Netflix, eBay, Constant Contact, Comcast, and scores of others. In NOSQL WEB DEVELOPMENT WITH APACHE CASSANDRA, you will learn about all aspects of using Cassandra in web applications--including accessing the Cassandra database using the common programming/scripting languages Java, PHP, Ruby, and JavaScript. Master web development using Apache Cassandra with the help of NOSQL WEB DEVELOPMENT WITH APACHE CASSANDRA

Table of Contents

  1. Title Page
  2. Copyright Page
  3. About the Author
  4. Contents
  5. Introduction
  6. Part I Java Clients
    1. Chapter 1 Using Cassandra with Hector
      1. Cassandra Storage Model
      2. Overview of Hector Java Client
      3. Setting the Environment
      4. Creating a Java Project
      5. Creating a Cassandra Cluster Object
      6. Creating a Schema
      7. Creating a Keyspace
      8. Creating a Template
      9. Adding Table Data
      10. Adding a Single Column of Data in a Table
      11. Adding Multiple Columns of Data in a Table
      12. Retrieving Table Data
        1. Querying Single Column
        2. Querying Multiple Columns
        3. Querying with a Slice Query
        4. Querying with the MultigetSliceQuery
        5. Querying with a Range Slices Query
      13. Updating Data
      14. Deleting Table Data
        1. Deleting a Single Column
        2. Deleting Multiple Columns
      15. The HectorClient Class
      16. Summary
    2. Chapter 2 Querying Cassandra with CQL
      1. Overview of CQL
      2. Setting the Environment
      3. Creating a Java Project
      4. Creating a Keyspace
      5. Creating a Column Family
      6. Using the INSERT Statement
      7. Using the SELECT Statement
      8. Creating a Secondary Index
      9. Using the SELECT Statement with the WHERE Clause
      10. Using the UPDATE Statement
      11. Using the BATCH Statement
      12. Using the DELETE Statement
      13. Using the ALTER COLUMNFAMILY Statement
      14. Dropping the Column Family
      15. Dropping the Keyspace
      16. The CQLClient Application
      17. New Features in CQL 3
        1. Compound Primary Key
        2. Conditional Modifications
      18. Summary
    3. Chapter 3 Using Cassandra with DataStax Java Driver
      1. Overview of DataStax Java Driver
      2. Setting the Environment
      3. Creating a Java Project
      4. Creating a Connection
      5. Overview of the Session Class
      6. Creating a Keyspace
      7. Creating a Table
      8. Running the INSERT Statement
      9. Running a SELECT Statement
      10. Creating an Index
      11. Selecting with SELECT and a WHERE Filter
      12. Running an Async Query
      13. Running a PreparedStatement Query
      14. Running the UPDATE Statement
      15. Running the DELETE Statement
      16. Running the BATCH Statement
      17. Dropping an Index
      18. Dropping a Table
      19. Dropping a Keyspace
      20. The CQLClient Application
      21. Summary
  7. Part II Scripting Languages
    1. Chapter 4 Using Apache Cassandra with PHP
      1. An Overview of Phpcassa
      2. Setting the Environment
        1. Installing PHP
        2. Installing Phpcassa
      3. Creating a Keyspace
      4. Creating a Column Family and Connection Pool
      5. Adding Data
      6. Adding Data in a Batch
      7. Retrieving Data
      8. Getting Selected Columns
      9. Getting Columns from Multiple Rows
      10. Getting Column Slices
      11. Getting a Range of Rows and Columns
      12. Updating Data
      13. Deleting Data
      14. Dropping the Keyspace and Column Family
      15. Summary
    2. Chapter 5 Using a Ruby Client with Cassandra
      1. Setting the Environment
      2. Installing a Ruby Client with Cassandra
      3. Creating a Connection
      4. Creating a Keyspace
      5. Creating a Column Family
      6. Adding Data to a Table
      7. Adding Rows in Batch
      8. Retrieving Data from a Table
      9. Selecting a Single Row
      10. Selecting Multiple Rows
      11. Iterating over a Result Set
      12. Selecting a Range of Rows
      13. Using a Random Partitioner
      14. Using an Order-Preserving Partitioner
      15. Getting a Slice of Columns
      16. Updating Data in a Table
      17. Deleting Data in a Table
      18. Updating a Column Family
      19. Dropping a Keyspace
      20. Summary
    3. Chapter 6 Using Node.js with Cassandra
      1. Overview of Node.js Driver for Cassandra CQL
        1. The Client Class
        2. The Connection Class
      2. Event-Driven Logging
      3. Mapping Data Types
      4. Setting the Environment
        1. Creating a Keyspace and a Column Family
        2. Installing Node.js
        3. Installing Node.js driver for Apache Cassandra
      5. Creating a Connection with Cassandra
      6. Adding Data to a Table
      7. Retrieving Data from a Table
      8. Filtering the Query
      9. Querying with a Prepared Statement
      10. Streaming Query Rows
      11. Streaming a Field
      12. Streaming the Result
      13. Updating Data in Table
      14. Deleting a Column
      15. Deleting a Row
      16. Summary
  8. Part III Migration
    1. Chapter 7 Migrating MongoDB to Cassandra
      1. Setting the Environment
      2. Creating a Java Project
      3. Creating a BSON Document in MongoDB
      4. Migrating the MongoDB Document to Cassandra
      5. Summary
    2. Chapter 8 Migrating Couchbase to Cassandra
      1. Setting the Environment
      2. Creating a Java Project
      3. Creating a JSON Document in Couchbase
      4. Migrating the Couchbase Document to Cassandra
      5. Summary
  9. Part IV Java EE
    1. Chapter 9 Using Cassandra with Kundera
      1. Setting the Environment
      2. Creating a JPA Project in Eclipse
      3. Creating a JPA Entity Class
      4. Configuring JPA in Persistence.xml
      5. Creating a JPA Client Class
      6. Running JPA CRUD Operations
        1. Creating a Catalog
        2. Finding a Catalog Entry Using the Entity Class
        3. Finding a Catalog Entry Using a JPA Query
        4. Updating a Catalog Entry
        5. Deleting a Catalog Entry
      7. Summary
    2. Chapter 10 Using Spring Data with Cassandra
      1. Overview of the Spring Data Cassandra Project
      2. Setting the Environment
      3. Creating a Maven Project
      4. Configuring the Maven Project
      5. Configuring JavaConfig
      6. Creating a Model
      7. Using Spring Data with Cassandra with Template
      8. Finding Out About the Cassandra Cluster
      9. Running Cassandra CRUD Operations
        1. Save Operations
        2. Find Operations
        3. Exists and Count Operations
        4. Update Operations
        5. Remove Operations
      10. Summary