10 Application development with ScyllaDB
This chapter covers
- Creating a Flask application to connect to your cluster using the Scylla driver
- Building an API that executes queries against ScyllaDB
- Tuning the driver’s consistency, load-balancing, and query retry behavior
- Authenticating and authorizing connections to the cluster
On top of every database is at least one application that interacts with it. Maybe it’s an API, or perhaps a data analytics system. An API needs to provide an interface for users to create, store, and remove data via HTTP requests. A data analytics system may query the entire database—you’ll see how to approach this problem in chapter 12—to transfer data into another system for further aggregation. By building an application on top of the cluster, you allow a database to provide its benefits beyond people who understand its schema and how to write a database query.
In this chapter, you’ll learn how to use ScyllaDB in an application. By using the database driver, a software library for connecting to a database, you’ll build a small Python application that queries ScyllaDB by exposing an API. Along the way, you’ll learn how to best configure the driver for production systems and how to tackle some real-world application and database concerns: authentication and authorization. However, before you can connect to your database, it’s time to set up the application.