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

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Apache Cassandra With Java: Introduction to UDT
  • Best Performance Practices for Hibernate 5 and Spring Boot 2 (Part 1)
  • Java EE 6 Pet Catalog with GlassFish and MySQL
  • How to LINQ Between Java and SQL With JPAStreamer

Trending

  • How to Configure and Customize the Go SDK for Azure Cosmos DB
  • GDPR Compliance With .NET: Securing Data the Right Way
  • My LLM Journey as a Software Engineer Exploring a New Domain
  • *You* Can Shape Trend Reports: Join DZone's Software Supply Chain Security Research
  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.2K 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
  • Best Performance Practices for Hibernate 5 and Spring Boot 2 (Part 1)
  • Java EE 6 Pet Catalog with GlassFish and MySQL
  • How to LINQ Between Java and SQL With JPAStreamer

Partner Resources

×

Comments

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

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: