diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-05-02 16:37:29 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-05-02 16:37:29 +0300 |
| commit | ef72b74ec34e95a38890d542cda298dd6565d5ad (patch) | |
| tree | 63fe96b24a8534e8dd2d88b1ca3d69b21c502d3e | |
| parent | daca0e6b68d32d885face00d68df5b5cb00e098b (diff) | |
Start replacing browser with a chat demo
| -rw-r--r-- | ARCHITECTURE.md | 8 | ||||
| -rw-r--r-- | demo/app.py (renamed from browser/app.py) | 0 | ||||
| -rw-r--r-- | demo/requirements.txt (renamed from browser/requirements.txt) | 0 | ||||
| -rw-r--r-- | demo/static/InclusiveSans-Regular.ttf (renamed from browser/static/InclusiveSans-Regular.ttf) | bin | 57124 -> 57124 bytes | |||
| -rw-r--r-- | demo/static/htmp.js (renamed from browser/static/htmp.js) | 0 | ||||
| -rw-r--r-- | demo/static/styles.css (renamed from browser/static/styles.css) | 0 | ||||
| -rw-r--r-- | demo/templates/base.html.j2 (renamed from browser/templates/base.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_aside.html.j2 (renamed from browser/templates/frag_aside.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_aside_link.html.j2 (renamed from browser/templates/frag_aside_link.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_error.html.j2 (renamed from browser/templates/frag_error.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_form_delete.html.j2 (renamed from browser/templates/frag_form_delete.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_form_find.html.j2 (renamed from browser/templates/frag_form_find.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_form_range.html.j2 (renamed from browser/templates/frag_form_range.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_form_upsert.html.j2 (renamed from browser/templates/frag_form_upsert.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/frag_results.html.j2 (renamed from browser/templates/frag_results.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/page_error.html.j2 (renamed from browser/templates/page_error.html.j2) | 0 | ||||
| -rw-r--r-- | demo/templates/page_main.html.j2 (renamed from browser/templates/page_main.html.j2) | 0 |
17 files changed, 1 insertions, 7 deletions
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index a34330a..bf622e7 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -381,10 +381,4 @@ When the active segment changes, the process should reopen the files between the The schema handling up to now has been in a weird spot: the DB requires a schema, i.e. a mapping from fields (types with bound `F: Eq`) to database types (`Type`), but does not persist this information anywhere. Every initialization of the DB might have a different view of the schema. This is fine if the readers are all instances of a single piece software, but if the DB is accessed by multiple different applications, the schema must be somehow communicated between them out-of-band. This is not ideal, of course. -I tried removing the schema completely. All validation is outsourced to the user. This works, but has even more quirks, mostly stemming from the fact that now the database has no idea what the data is supposed to look like. - -I started implementing a database browser application for demoing purposes, and realized that the schema must be persisted in some way, since otherwise the browser app would have to either 1) infer the schema from the data, or 2) require the user to input the schema somehow. Both of these are kind of unsuitable for the feel I'm going for with this project. - -My current idea is to store the schema in a file in the data directory upon first initialization. The schema file contains a mapping from field names to types. The schema file is read upon DB initialization and used to validate the data. - -The user can change the schema only by adding new nullable fields. This is the only schema evolution action that is both backwards and forwards compatible, which is a nice property to have. Adding nullability to an existing field is backwards compatible, but not forwards compatible. The compatibility mode (BACKWARDS, FULL) might be a good thing to expose to the user. +I removed the schema completely. All validation is outsourced to the user. This works, but has some quirks, mostly stemming from the fact that now the database has no idea what the data is supposed to look like. diff --git a/browser/app.py b/demo/app.py index be79432..be79432 100644 --- a/browser/app.py +++ b/demo/app.py diff --git a/browser/requirements.txt b/demo/requirements.txt index b6b9bff..b6b9bff 100644 --- a/browser/requirements.txt +++ b/demo/requirements.txt diff --git a/browser/static/InclusiveSans-Regular.ttf b/demo/static/InclusiveSans-Regular.ttf Binary files differindex 3a30e79..3a30e79 100644 --- a/browser/static/InclusiveSans-Regular.ttf +++ b/demo/static/InclusiveSans-Regular.ttf diff --git a/browser/static/htmp.js b/demo/static/htmp.js index 27d963b..27d963b 100644 --- a/browser/static/htmp.js +++ b/demo/static/htmp.js diff --git a/browser/static/styles.css b/demo/static/styles.css index 82bed74..82bed74 100644 --- a/browser/static/styles.css +++ b/demo/static/styles.css diff --git a/browser/templates/base.html.j2 b/demo/templates/base.html.j2 index 47b3f6c..47b3f6c 100644 --- a/browser/templates/base.html.j2 +++ b/demo/templates/base.html.j2 diff --git a/browser/templates/frag_aside.html.j2 b/demo/templates/frag_aside.html.j2 index 6c5658f..6c5658f 100644 --- a/browser/templates/frag_aside.html.j2 +++ b/demo/templates/frag_aside.html.j2 diff --git a/browser/templates/frag_aside_link.html.j2 b/demo/templates/frag_aside_link.html.j2 index 9cd6041..9cd6041 100644 --- a/browser/templates/frag_aside_link.html.j2 +++ b/demo/templates/frag_aside_link.html.j2 diff --git a/browser/templates/frag_error.html.j2 b/demo/templates/frag_error.html.j2 index c5034cd..c5034cd 100644 --- a/browser/templates/frag_error.html.j2 +++ b/demo/templates/frag_error.html.j2 diff --git a/browser/templates/frag_form_delete.html.j2 b/demo/templates/frag_form_delete.html.j2 index 22306c1..22306c1 100644 --- a/browser/templates/frag_form_delete.html.j2 +++ b/demo/templates/frag_form_delete.html.j2 diff --git a/browser/templates/frag_form_find.html.j2 b/demo/templates/frag_form_find.html.j2 index cadd44b..cadd44b 100644 --- a/browser/templates/frag_form_find.html.j2 +++ b/demo/templates/frag_form_find.html.j2 diff --git a/browser/templates/frag_form_range.html.j2 b/demo/templates/frag_form_range.html.j2 index 84b8024..84b8024 100644 --- a/browser/templates/frag_form_range.html.j2 +++ b/demo/templates/frag_form_range.html.j2 diff --git a/browser/templates/frag_form_upsert.html.j2 b/demo/templates/frag_form_upsert.html.j2 index 68820f5..68820f5 100644 --- a/browser/templates/frag_form_upsert.html.j2 +++ b/demo/templates/frag_form_upsert.html.j2 diff --git a/browser/templates/frag_results.html.j2 b/demo/templates/frag_results.html.j2 index bfb54e9..bfb54e9 100644 --- a/browser/templates/frag_results.html.j2 +++ b/demo/templates/frag_results.html.j2 diff --git a/browser/templates/page_error.html.j2 b/demo/templates/page_error.html.j2 index 3233283..3233283 100644 --- a/browser/templates/page_error.html.j2 +++ b/demo/templates/page_error.html.j2 diff --git a/browser/templates/page_main.html.j2 b/demo/templates/page_main.html.j2 index 907275f..907275f 100644 --- a/browser/templates/page_main.html.j2 +++ b/demo/templates/page_main.html.j2 |
