DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Apache Cassandra With Java: Introduction to UDT
  • Java EE 6 Pet Catalog with GlassFish and MySQL
  • How to LINQ Between Java and SQL With JPAStreamer
  • Architecture and Code Design, Pt. 1: Relational Persistence Insights to Use Today and On the Upcoming Years

Trending

  • Why Your RAG Pipeline Will Fail Without an MCP Server
  • Top JavaScript/TypeScript Gen AI Frameworks for 2026
  • Designing Agentic Systems Like Distributed Systems
  • Using LLMs to Automate Data Cleaning and Transformation Pipelines
  1. DZone
  2. Data Engineering
  3. Databases
  4. Apache Cassandra Horizontal Scalability for Java Applications [Book]

Apache Cassandra Horizontal Scalability for Java Applications [Book]

Get to know how to use Cassandra with Java, the applicability with Cassandra, and several Java Frameworks such as Hibernate, Spring, Quarkus, Jakarta EE, and so on.

By 
Otavio Santana user avatar
Otavio Santana
DZone Core CORE ·
Mar. 04, 21 · Review
Likes (4)
Comment
Save
Tweet
Share
8.7K Views

Join the DZone community and get the full member experience.

Join For Free

The business world grows exponentially with several opportunities and companies competing with each other. The dispute between customers is something that is no longer defined by the company's location, but by its applications' response time. Several studies reveal that millisecond improvements are enough to acquire new customers and retain existing ones, in addition to overcoming the competition.

In this battle for milliseconds, several paradigms and frameworks have been created. All this improvement, however, would be useless if the persistence of information was still the bottleneck.

With the need for better performance, NoSQL databases emerged to facilitate performance and information distribution. Along with this concept, Apache Cassandra was born, the elastic NoSQL database, fault-tolerant with a high level of performance, achieving success in the largest companies in the world such as Netflix, GitHub, and eBay, among others. Cassandra is a non-relational database developed by Facebook, and today is an open-source column family type NoSQL database within the Apache Foundation. In general, the objective of this book is to talk about Cassandra, its concepts, and its applicability to Java. To cover all of the concepts, the book was sectioned into a total of nine chapters.

The scope of the first chapter is the introduction to non-relational databases. The chapter addresses the challenges of distributed databases, their limitations with the CAP theorem, which is NoSQL and its types, as well as the comparison between NoSQL and the already consolidated relational database.

In the second chapter, we will cover Cassandra's concepts, such as its hierarchy, reading, and writing, its functioning in the node, and its orchestration within a cluster. We will see different ways of installing Cassandra - manual installation, Docker, and clustering with docker-compose.

Using queries is very common within a database. In the relational world, the developer is familiar with SQL. Cassandra has its own query language: Cassandra Query Language or CQL, and note that, one of its biggest differentials is the similarity with SQL. Learning how to create keyspace, column family, perform CRUD operations (creation, recovery, update and delete data) that the developer loves so much are topics in this chapter.

There are several similarities between Cassandra's communication language, CQL, and SQL. However, the database's similarities end there. It is worth remembering that conceptually, taking into account the CAP theorem, the relational database and Cassandra are in different aspects. Thus, performing the modeling of Cassandra in the same way that it takes place within the relational database will have a high-performance impact, not to mention that you'd be trying to use an airplane as if it were a car. The topics of this session are the explanation and tips to perform the modeling in Cassandra and some simple principles for daily modeling.

After all of Cassandra's communication concepts and modeling tips, the next step is the integration with Java. Within this communication between Java and Cassandra, the first point to be covered is how to implement it with the DataStax Driver whose API is similar to the JDBC driver. An important point within the DataStax Driver is that once the developer is familiar with CQL, all communication takes place in a very fluid way. Businesses are generally very object-oriented, the content covers the impacts of Mappers, frameworks whose objective is to carry out the mapping between Cassandra and the objects of a business entity, positively as productivity and negatively with possible performance problems. Among these mappers, we will use DataStax Mapper, Spring Data Cassandra, Hibernate OGM Cassandra, and Eclipse JNoSQL, and to facilitate the comparison between them, the same example will be used, which is based on a solution for a library.

  • To get the book: https://leanpub.com/jcassandra
  • Book repo: https://github.com/otaviojava/cassandra-book
  • To access the source code of the book: https://github.com/otaviojava/cassandra-java-code
Relational database Database Apache Cassandra Book Java (programming language) application Concept (generic programming) sql Scalability Open source

Opinions expressed by DZone contributors are their own.

Related

  • Apache Cassandra With Java: Introduction to UDT
  • Java EE 6 Pet Catalog with GlassFish and MySQL
  • How to LINQ Between Java and SQL With JPAStreamer
  • Architecture and Code Design, Pt. 1: Relational Persistence Insights to Use Today and On the Upcoming Years

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook