Difficulty: Beginner
Estimated Time: 15 minutes

Do you want to see a reactive version of the Spring Pet Clinic project? Then, you're at the right place!

This scenario focuses on what the final Reactive Spring Pet Clinic app looks like so you can see where we are going.

What is Reactive Programming? Reactive Programming is a declarative programming paradigm. It uses non-blocking data streams that propagate changes. You can read more about how the DataStax Cassandra driver supports reactive programming here.

Check out the later scenarios to learn how to do Spring reactive programming and see how we created this app.

Here are the components of the Reactive Pet Clinic app:

drawing

We'll deploy the app, step-by-step, from the bottom up.

Let's get started!

ver 0.002

This scenario showed you how to run the example Reactive Spring Pet Clinic app.

In this scenario, we:

  • Set up the Astra Cassandra database
  • Deployed the reactive backend API server
  • Accessed the backend API server with Swagger UI
  • Deployed the UI app

Now that you see what the app looks like, you may want to explore other scenarios that explain how to create a reactive API.

Reactive Spring Pet Clinic Example

Step 1 of 3

Set up an Astra Cassandra Database

The first step is to set up the database. We'll use Apache Cassandra™ as a service on Astra because it's a world-class database that is easy to set up. If you don't have an Astra account, take 30 seconds to set one up - it's free.

To deploy the database, open a tab in your browser to astra.datastax.com.


NOTE: If you already have an Astra database, you can just use it! We'll show you in the next step how to customize the app for an existing Astra database.


When you log in the first time you'll find yourself looking at the main Astra details screen that looks like the image below. Fill in the fields with these values:

  • Compute size: Select free tier
  • Location: Select a region near you
  • Database name: petclinic
  • Keyspace name: spring_petclinic
  • Database username: astra
  • Database password: astra2020

First time create database screen

Once you have filled in the form, click on the launch Database button near the bottom. Then, click on the View Database button on the pop-up. View Database

It may take a few minutes for the database to deploy, but you'll get an email when it's ready and you will see the status change to Active.

Active Database

Wow, it's really easy to set up Cassandra using Astra!