In this scenario, you'll:
- Register for an Astra account if you don't have one
- Create a serverless database
- Build a React Application Tiktok Clone
📚 Datastax: Cassandra, Astra and Stargate
Top Level Overview of the Astra Stack
🔵 Cassandra: is the NoSQL Open Source Database which is the foundation of the stack. Cassandra powers many extremely large and demanding databases for enterprises around the world, and is the best option for companies needing scalability and performance.
🔵 Astra: provides a serverless instance of Cassandra. This comes with a free $25 credit, providing a significant amount of data and transactions. You're charged only for what you use, and there's no credit card needed.
🔵 Stargate: is an open source engine to provide APIs for Cassandra databases. It's available free for your use, and comes with every Astra instance.
Cassandra Details## Cassandra Details 🔵 NoSQL: Cassandra is a NoSQL database. Unlike many other systems, by default it requires a schema (the Stargate Document API does not require a schema). There is a CQL query language for working with Cassandra. CQL does not handle joins, and transactions are unbelievably fast. 🔵 Nodes: Cassandra is designed to be distributed. You decide how many nodes you need, and you can introduce them into your instance without any downtime. Each node can handle thousands of transactions per second per core, and every node can handle any query. Nodes keep each other up to date by something called "gossiping", making sure your data stays current. 🔵 Datacenters: Cassandra can have many nodes per datacenter, and as many data centers as you like. 🔵 Use cases: Here's a high level overview of the use cases where Cassandra really shines.
🔵 Serverless: Scale up or down without doing any work. Just work with your data, and leave the ops to us.
🔵 Free tier: We replaced our free tier with a $25/month credit which gets you a great deal of bandwidth and storage for experimenting and running small applications.
🔵 Stargate: All Cassandra instances come with Stargate included.
Ok, let's move on and get into our first lab, where we get our Astra instance.
So you made it! Amazing job!
What's next? Here are some links for you:
Building a TikTok clone with Astra and Stargate (Node.js)
⚒️ Create your Astra instance
Exercise time: ~10 minutes
In this step, we will:
- Create an Astra database to store data
We will cover:
- Register and Sign In to Astra
- Configure and create your database
- Let Astra Start Up
One of the first things we need to do is hook up the "plumbing" of our application to talk to our back-end services, namely, our Cassandra database with Astra. Once this is in place, we are connected and ready to go with the services we need to power our app.
We will be making use of the Document API and REST API to connect to our Astra database. The Stargate API framework allows developers the freedom to access Astra with a variety of APIs. The REST and GraphQL APIs make it easy to interact with standard Cassandra databases. With the Document API, you can save and search schemaless JSON documents in Cassandra. No need to use SQL, CQL, or any database drivers to talk to the data layer. Just code and move on.
ahem...for those of you familiar with Apache Cassandra, yes, I just said you could skip data modeling.
1. Register and Sign In to Astra
If you are new to AstraThe
ASTRAservice is available at url https://astra.datastax.com.
ASTRAis the simplest way to run Cassandra with zero operations at all - just push the button and get your cluster.
Astraoffers $25 credit/month and requires no credit card to setup. That $25 gives you a lot of storage space and transactions, and you have no worries of being accidentally charged. ### ✅ Step 1a. Use the dialogs to create an account You can use your
✅ 4. Select a cloud provider: You can use either GCP or AWS. Chose a region that's geographically close to you. ✅ 5. Click
If you already have an account
Let Astra Start Up
Honestly, there's not much to do here, but wait a couple minutes for your Astra database to start up. Once completed, you will have a fully managed Apache Cassandra database ready to rock and power your app.
You will see your new database
Initializing in the Dashboard.
The status will change to
Active when the database is ready, this will only take 2-3 minutes and you will also receive an email when it is ready.