summaryrefslogtreecommitdiff
path: root/requirements/architecture/ard-001.md
blob: 1a63eacca162495bfb4c43d3ee7595992e6c519c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ard-001: SQLite for desktop storage

Satisfied by: task-012

## Problem

Schist needs a desktop GUI, and this desktop GUI needs a storage medium, in
order to store domain entities, such as transactions, buckets, pipes and drips.

## Options

- SQLite
- Bespoke file storage
- NoSQL database
- Other SQL database

## Decision

Schist's desktop GUI will persist domain data in an SQLite file.

SQLite is well-supported in Rust via the rusqlite crate, and we are going to be
writing the desktop GUI in Rust as a result of ard-000.

SQLite is distinctive in that it runs in-memory but stores data in a file. The
main motivation for having databases running as separate processes is that it
enables horizontal scalability, but for a single-user app running locally, this
is not a major concern.

Resilience is easy and transparent in SQLite. It lives in a file on the user's
hard drive. If they want extra resilience, they can back up their hard drive.

There is no need to take on the complexity of managing bespoke file storage.