I paired up with David Jones-Gilardi of DataStax to go through one of the workshops they have put together (with Ania Kubów, who has a video you should watch as well) that does a good job of showcasing how nicely DataStax Astra pairs up with the Jamstack approach. Here’s the gist:
- DataStax Astra is hosted Apache Cassandra, a powerful database technology used by most of the biggest players on the web. Astra makes it wildly easy to work with, hosting it, give you a nice dashboard for managing things, a GraphQL playground for it, serverless APIs, and more. We spin up a database cluster exactly as you would in this video, and see it right through GraphQL mutations in the playground (at first), and then through a
.csv
upload in the dashboard later. - Pairing those APIs with cloud functions is a natural fit, meaning you can access your data on an otherwise static site easily. Netlify makes it easy to create and deploy cloud functions.
- The front end of the site is a basic React setup: components that run queries to fetch data and build themselves based on that data. The data fetching here happens through the cloud functions.
It’s pretty satisfying to watch all this come together! I’ve been saying for years that front-end development is getting amazingly powerful (see: “The All-Powerful Front-End Developer” and “ooooops I guess we’re* full-stack developers now”) and this feels like that is coming to fruition in ways even beyond what I was imagining.
I like how there is a see-saw-like effect with this. As we see in this video, we’re able not only to fetch our own data and craft our own queries, but we don’t even do any back-end development at all. We spin up and deal with the entire database and APIs ourselves, as JavaScript-focused front-end developers. That’s a hell of a lot more responsibility (one side of the see-saw went up), which we’re able to do partially because some other things got a lot easier (the other side of the see-saw went down).
Those easier things: making and managing databases, deployment CI/CD for free, easy creation and deployment of cloud functions, infinite scalability with zero work, CDN-backed hosting with zero work, SSL with zero work, etc. All those things took much more time and effort before, and now we can re-focus that time and effort on other things.
Heck, in this video, David doesn’t even use any local software other than a web browser. All code editing was done in Gitpod, which spins up a VS Code instance for you right in the browser, with a fully functioning terminal included, where he uses the Netlify Dev CLI to do some fancy stuff.
Ready to check out Astra for yourself? Use code CSSTRICKS200
for $200 of Astra credits when signing up!