title | summary | toc | docs_area |
---|---|---|---|
MovR |
The MovR application uses CockroachDB to store information about vehicles, users, and rides. |
true |
develop |
MovR is a fictional vehicle-sharing company created to demonstrate CockroachDB's features.
The MovR example consists of the following:
- The
movr
dataset, which contains rows of data that populate tables in themovr
database. Themovr
dataset is built intocockroach demo
andcockroach workload
. - The MovR application, a fully-functional vehicle-sharing application, written in Python. All of MovR application source code is open-source, and available on the movr GitHub repository.
{% include {{ page.version.version }}/misc/movr-schema.md %}
You can use the cockroach demo
and cockroach workload
commands to load the movr
database and dataset into a CockroachDB cluster.
cockroach demo
opens a SQL shell to a temporary, in-memory cluster. To open a SQL shell to a demo cluster with the movr
database preloaded and set as the current database, use the following command:
{% include_cached copy-clipboard.html %}
$ cockroach demo movr
cockroach workload
loads sample datasets and workloads into running clusters. To load the movr
database and some sample data into a running cluster, do the following:
-
Use
cockroach workload
to load themovr
dataset:Secure Insecure{% include_cached copy-clipboard.html %}
$ cockroach workload init movr 'postgresql://root@localhost:26257?sslcert=certs%2Fclient.root.crt&sslkey=certs%2Fclient.root.key&sslmode=verify-full&sslrootcert=certs%2Fca.crt'
{% include_cached copy-clipboard.html %}
$ cockroach workload init movr 'postgresql://root@localhost:26257?sslmode=disable'
-
Use
cockroach sql
to open an interactive SQL shell and setmovr
as the current database:{% include_cached copy-clipboard.html %}
$ cockroach sql --certs-dir=certs --host=localhost:26257
{% include_cached copy-clipboard.html %}
> USE movr;
{% include_cached copy-clipboard.html %}
$ cockroach sql --insecure --host=localhost:26257
{% include_cached copy-clipboard.html %}
> USE movr;
{% include {{ page.version.version }}/misc/movr-workflow.md %}
For a tutorial on running MovR against a multi-region cluster, using two important multi-region data topologies to get very low latency reads and writes, see Low Latency, Multi-Region Deployment.
For a tutorial on developing and deploying a globally-available web application for MovR, use the following docs: