TechnologyApril 28, 2022

DataStax Cassandra Myth Buster Series: Coding on Cassandra is Too Complicated

 DataStax Cassandra Myth Buster Series: Coding on Cassandra is Too Complicated

Cassandra is widely considered the go-to database for fast, scalable, and high-performance data applications. This blog speaks to concerns about Cassandra’s ease-of-use and the requirement to learn Cassandra Query Language (CQL) to accelerate application development.

Apache Cassandra® has a well-earned reputation as a powerhouse database system. It is always available, 100% reliable, and infinitely scalable. This makes Cassandra ideal for many workloads, including fast data applications. Fast data apps differ from online transactional processing (OLTP) applications in the scale, availability, and performance demanded by modern use cases.

Cassandra has had a reputation as a complex tool that might not fit every company’s cloud-native strategy. In recent years, DataStax has championed several enhancements to the Cassandra ecosystem. We’ve released many of them as open-source to make Cassandra far more accessible.

This post debunks the myth that Cassandra is too complicated for most teams to work with. We’ll show you how Cassandra is now easier and more intuitive than ever before. New and powerful APIs make it the go-to choice for powering fast and scalable data applications in terms of both cost and effort.

Myth: Coding in Cassandra is too complicated

Coding on Cassandra is too complicated. Teams with a narrower skills focus, such as front-end teams, will find it particularly hard to work with. The main concern is that the requirement to learn specific query languages like Cassandra Query Language (CQL) can be a drag on developer productivity.

Reality: Cassandra is very developer-friendly with familiar APIs

In reality, development teams can reduce the time it takes to prototype and bring apps to production faster using familiar, modern APIs based on HTTP. This has been made possible with the addition of Stargate, a cloud-native, modern data API layer.

Cassandra’s resilience and ability to run flawlessly at a global scale get rave reviews from platform teams concerned with performance, data integrity, and availability. But many developers may feel intimidated by Cassandra. In the past it lacked native support for their preferred languages and toolsets. Cassandra also uses its own query language (CQL) that is similar but different from the older and more widely known SQL.

The truth is, Cassandra has evolved into one of the world’s most developer-friendly NoSQL database systems. Dev teams are learning that Cassandra actually makes it easy to move fast, stay productive, and get results — working with their preferred tools on their own terms.

The key is Stargate, an open-source data API gateway. It gives developers API access to Cassandra, using RESTDocumentGraphQL, and gRPC. Besides the obvious advantages of limiting the need to know CQL dependence on language-specific native drivers, Stargate makes Cassandra more accessible and significantly less complex for developers in three other important ways:

  • Going cloud-native
  • Embracing openness
  • Abstracting complexity

Going Cloud-Native

Apache Cassandra was brought into the world about the same time architects were championing a change to RESTful API endpoints. Front-end developers were embracing JSON as the greatest common denominator for data interchange. Just as HTTP-based APIs have evolved since then, so has the Cassandra ecosystem.

It’s no accident this evolutionary path coincides with the rise of cloud-based infrastructure. With an appropriate separation of concerns, cloud-native applications shouldn’t have to worry about operational details like load balancing, autoscaling, health checks, or transport layer security (TLS) termination. The cloud platform should handle those details and leave application developers free to focus on rapid development of new features. Mediating abstractions like an API data gateway enable this useful separation of concerns. Stargate plays an essential role for Apache Cassandra by providing such a gateway.

Stargate supports REST, Document, and GraphQL APIs. It also provides a set of client libraries (Java, Go, Node.js, and Rust) for making CQL calls over gRPC rather than relying on native drivers. The result is a multi-model set of APIs, giving developers freedom of choice. They choose how to interact with data, and where to be on a scale of more performant (native Drivers, gRPC clients) versus more flexible (schemaless JSON via the Document API).

Embracing openness

Modern data APIs are essential, and they evolve quickly. Both GraphQL and gRPC usage is exploding, and more than 80% of developers use REST. Stargate keeps Cassandra on the cutting edge with support for modern data APIs. It puts developers in the driver’s seat by letting them choose the tools they prefer to use based on what best addresses their application requirements.

Abstracting complexity

Stargate helps to abstract away backends entirely. This lets developers work without concern about specific database implementations or access methods. It not only provides an abstracting data gateway, but is implemented using Kubernetes, making it ideal for developers building modern, microservices-based applications.

Stargate is a modern API layer that enables developers to appreciate the benefits of performance, scalability, and availability of Cassandra. The painful learning curve is replaced by immediate productivity. It allows site reliability engineers (SREs) to consolidate different NoSQL workloads — like document and key-value — on Cassandra.

 

Figure 1: Stargate is a modern API layer that reduces the learning curve and lets developers become productive with Cassandra immediately.

Stargate supports another valuable outcome: It puts ops and dev teams back on the same page when choosing platforms. Ops teams will like Cassandra as the versatile database that can support bread-and-butter scale-outs, fault-tolerant use cases, and fast-to-market schemaless applications. 

They can use Cassandra as a platform to consolidate database sprawl. This is an easy decision for dev teams to support because the new freedom of choice Cassandra with Stargate provides allows them to focus on what they do best. They can create innovative applications without spending time learning about the ins and outs of NoSQL.

Cassandra clearly continues to innovate in a commitment to openness. Based on its ability to support cloud-native applications and with Stargate to abstract away most of the complexity once associated with its use. With the recent release of Cassandra 4.0, it just keeps getting better.

Evaluating Cassandra today requires a bit of a paradigm shift. The context of APIs available to make it easier to use than ever before redefines the fundamental reality of how developers are using Cassandra. More and more developers find enormous value in Cassandra, especially when they need to build fast, cloud-native applications.

Check out our YouTube channel for tutorials and follow DataStax Developers on Twitter for the latest news about our developer community.

Resources

  1. Apache Cassandra Open Source NoSQL Database
  2. Stargate
  3. Get a Head Start on Your App Development with Flexible DataStax Stargate APIs
  4. Accessing Cassandra with the Stargate REST API
  5. Accessing Cassandra with the Stargate Document API
  6. Accessing Cassandra with the Stargate GraphQL API
  7. CQL for Apache Cassandra 3.0
  8. Qualify Your Database Needs with DataStax Astra Stargate REST API
  9. Create and Use a Document Database with Stargate Document API and Astra DB in 15 Minutes
  10. How to get just the data you need with the Stargate GraphQL API in a simple coding scenario
  11. Say Goodbye to Native Drivers with Stargate gRPC API in Java
  12. The Future of Cloud-Native Databases Begins with Apache Cassandra 4.0

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.