Search
Close this search box.

Cassandra.API: Version 1.0

Earlier this year, our team at Anant was tasked with creating an application to work with DataStax Astra, their new database-as-a-service. It is Apache Cassandra in the cloud which lets you spin up a database within minutes, bypassing all the work that a manual install and deployments requires. It offers enterprise-level reliability, security, and management and you also have the option to Deploy dedicated clusters on AWS or GCP. Now, a few months down the road we have finally finished work on Cassandra.API and we are ready to present the full application.

Project Goals

We had three feature goals for this project:

  1. Create, migrate & document a REST API for one Object type powered by a DataStax Astra Cloud Instance
  2. Create, migrate & document adding additional REST endpoints and an Admin Area to manage Objects
  3. Port and document a end-user web interface for Leaves App

Feature Summaries

Feature 1

In this feature we accomplished 3 different tasks. First we created a data migrator that connected to Astra and transferred data from our Leaves api. After getting data into our Astra database, we then created two APIs for developers to use: Node JS and Python. When it comes to code, everyone has their own background and preference so we wanted to give users an option to use something they are more comfortable with. In the future, we might be able to create more APIs in different languages to hopefully attract even more users. These APIs allow you to communicate with your Astra instance. Lastly, we also created a set of Unit tests, CQL and Postman, that verify data is in your database via REST. We have a blog post that reviews and explains feature 1 in its entirety.

Feature 2

In this feature, we added W/R functionality the APIs that we created in feature 1. First, we created a leaves data model which tells the application how it should structure any new data that is added through the APIs. Then we implemented a processor that takes a new item and populates the record with content. It leverages the existing scraper and after an item is added, the processor scrapes data to emulate the data we have in our Leaves Wallabag API. Similar to feature 1, we included a set of Postman tests that verify that your API successfully added new data to your Astra database. We also have a blog post explaining feature 2 in its entirety.

Feature 3

For the last feature, we set out to create a CRUD user interface using an open source admin kit. The goal of this was to provide users with an alternative view of their database as some may prefer to see data in table format. We decided to use the Devias Kit and we were able to successfully branch the interface and connect it to Astra. Once running, you can edit and delete records from your Astra database and you have the freedom to change the columns and colors of your table as desired. Once again, you can then run a set of unit tests to verify the changes you made via REST. There is also a blog post that explains this feature in its entirety.

Resources

First, we have blog posts that cover each feature in detail:

Cassandra.API Blog Post: Part 1

Cassandra.API Blog Post: Part 2

Next, we have blog posts that show how the project and our knowledge of the tools created progressed as time went on:

Building a REST API with DataStax Astra using Node & Python: Part 1

Building a REST API with DataStax Astra using Node & Python: Part 2

We created a video to walk you through the documentation of the project, to prevent any users from getting lost:

Here is a video recording of Rahul Singh giving a workshop with DataStax Developers on our Cassandra.API application:

Then we have a short demo of the CRUD user interface:

Finally, here is a bit more context on the familiarity we have with the technologies used in this project:

Cassandra.Link

Cassandra.Link is a knowledge base that we created for all things Apache Cassandra. Our goal with Cassandra.Link was to not only fill the gap of Planet Cassandra, but to bring the Cassandra community together. Feel free to reach out if you wish to collaborate with us on this project in any capacity.

Anant Corporation Events

Check out our events page to keep up with our upcoming and past webinars; as well as, any future virtual or in-person meetups.

We are a technology company that specializes in building business platforms. If you have any questions about the tools discussed in this post or about any of our services, feel free to send us an email!

Photo by Markus Winkler on Unsplash