Stargate selects Quarkus for its V2 implementation
This article gives a brief overview of Stargate, why it needed to change, and why Quarkus was chosen for its next implementation. See the references section for additional links to more detailed information.
What is Stargate?
Stargate, created in 2020, is a data API gateway that transforms Apache Cassandra, an Open Source NoSQL database, into a JSON Document database. Stargate exposes Cassandra through a broad range of APIs, including JSON, CQL, GraphQL, REST, and gRPC, bringing modular, service-oriented, and cloud native architectures into the Cassandra ecosystem in a non-invasive way.
Stargate helps companies like Netflix, Yelp, Netlify, PrepLadder, SHIELD, and more, take advantage of the power of Cassandra. Stargate allows applications to interact with Cassandra in a driverless fashion, making it consumable by almost any kind of application on any technology stack. Stargate supports Cassandra’s traditional CQL interface and HTTP APIs, while offering a high-performance gRPC implementation that’s as fast as a native driver but with less network management configuration.
Stargate V2 Requirements
Stargate V2 needed to modernize its tech stack from its more monolithic V1 predecessor, which used Dropwizard for exposing HTTP endpoints. Stargate V2 was a chance to refactor everything from the ground-up, which meant choosing a new core framework to build upon.
The framework of choice had to meet a few key requirements:
-
The learning curve had to be forgiving. The last thing Stargate wanted to do was introduce a new framework which no one wanted to adopt. The framework had to be something the whole team could get behind and pick up effortlessly.
-
Many features needed to be available out-of-the-box. This way, features could be assembled by using existing building blocks.
-
Excellent gRPC support. gRPC was a core foundational feature for Stargate V2, so excellent gRPC support was a must-have.
-
Great performance. Blazing-fast performance was required in order to attain performance as fast as a native driver.
-
Reactive support. Support for non-blocking I/O is key to Stargate.
なぜQuarkusなのか?
Spring Boot, Micronaut, and Quarkus were the initial front-runners for framework of choice. A table listing all the features important to Stargate was created along with scores for each framework. Each framework was compared in terms of supported JDK version(s), dependency management, configuration, container image building, reactive support, observability, security, and community involvement.
Spring Boot was eliminated from contention early on because of a few major factors that were important to Stargate:
-
Lack of official support for gRPC.
-
Native image support was still experimental and Stargate could not wait for it to become generally available.
The Stargate team also considered the health of the Quarkus ecosystem, in particular the amount and accuracy of available documentation, always a key consideration when adopting a new open source technology. Ivan Senic explains:
Before fully adopting Quarkus, we performed a trial to get a hands-on feel, and we discovered that it was the right framework for Stargate. Quarkus has excellent documentation full of detailed guides for all extensions, letting you clearly understand how to achieve your goal and clearly shows configuration properties.
-Ivan Senic, Software Engineer, DataStax
Some additional factors that led to the decision included:
-
gRPC Support: gRPC is a first-class citizen in Quarkus. This was a key requirement for Stargate that Quarkus fulfills.
-
JDK 17: Quarkus fully supports Java 17.
-
Integration testing: Stargate needed a framework that could perform integration testing in custom environments with external dependencies, such as a Cassandra cluster.
-
Observability: Quarkus has out-of-the-box metrics and tracing integration for both HTTP and gRPC.
-
Community: Quarkus has a vibrant community and moves fast, so any issues or enhancements to Quarkus itself can be implemented quickly.
-
Inter-extension compatibility: Quarkus extensions integrate with one another, creating a unified development experience.
-
Developer Joy: Quarkus Dev mode, live coding, and continuous testing increase developer productivity and make a developer more productive.
Wrap Up
Stargate needs to provide an API that performs just as fast as a native Cassandra driver. In order to accomplish this, Stargate relies on Quarkus’ Supersonic and Subatomic capabilities, as well as a vast ecosystem of extensions. Stargate will continue to evolve and adopt more Quarkus.