Python functions as REST objects, with clustering, load balancing and state replication; no containers or orchestration.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-primitive.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Dan Q Consolidate duplicate QUICKSTARTs on the top-level file 503f830 7 months ago History
__init__.py · 1001 bytes · 36 lines
1"""
2Storage backends for the Object Primitive System.
3
4This module contains storage adapters for different backends:
5- TSV: Tab-separated values (human-readable, grep-able)
6- FileSystem: Direct file storage
7- SQLite: Embedded SQL database
8- PostgreSQL: Production SQL database
9- Redis: In-memory cache/store
10- S3: Object storage
11- Custom: Pluggable custom storage
12
13Objects are stored with:
14- Source code (current and all versions)
15- Logs (self-logging, TSV format)
16- Metadata (creation time, author, etc.)
17- Data (state, if stateful)
18
19Philosophy:
20 Storage is swappable. Database goes evil? Swap it.
21 TSV today, PostgreSQL tomorrow, ??? next year.
22 The endpoint doesn't know or care where data lives.
23
24 Start with TSV (simple, grep-able).
25 Graduate to databases only when needed.
26 Always be able to swap back.
27"""
28
29__all__ = [
30 # To be implemented in Phase 3+
31 # "TSVStorage",
32 # "FileSystemStorage",
33 # "SQLiteStorage",
34 # "PostgreSQLStorage",
35 # "RedisStorage",
36]