This tutorial walks you through developing and deploying a multi-region web application built on CockroachDB, using Flask, SQLAlchemy, CockroachCloud, and Google Cloud Platform services.
The following sections make up the tutorial:
- MovR: An Example Multi-Region Use-Case
- Create a Multi-Region Database Schema
- Set Up a Virtual Environment for Developing Multi-Region Applications
- Develop a Multi-Region Web Application
- Deploy a Multi-Region Web Application
Throughout the tutorial, we reference the source code for an example web application for the fictional vehicle-sharing company MovR. The source code for this application is open source and available on GitHub, in the movr-flask repo. The code is well-commented, with docstrings defined at the beginning of each class and function definition. The repo's README also includes instructions on debugging and deploying the application using Google Cloud services. Those instructions are reproduced in Setting Up a Virtual Environment for Developing Multi-Region Applications and Deploying a Multi-Region Web Application.
For a live demo of the deployed MovR Flask application, see https://movr.cloud.