A PHORBAS store is an associative 1:1 binary key to binary content data storage abstraction. Keys are binary as a result of cryptographic hashing from PHORBAS Opaque, and content is binary as a result of encryption. The store handles the principles of Persistent, Binary key/content, Addressable, and Store.
- PHORBAS Opaque handles the principle of Hashed, Opaque, and Addressable.
- PHORBAS HAMT handles the principle of Replicable.
- See
test/api_example.mjs
. - Store API docs
docs/store_api.md
. - Backend storage API docs
docs/bkc_api.md
.
Technology / Library | Implementation | |
---|---|---|
✅ | JS Map (NodeJS) new Map() |
impl: code/js_map.jsy test: test/unittest.node.mjs |
✅ | JS Map (Web) new Map() |
impl: code/js_map.jsy test: test/unittest.web.mjs |
✅ | Browser IndexedDB API globalThis.indexedDB.open() |
impl: code/web/web_db.jsy test: test/unittest.web.mjs |
✅ | Browser Fetch API globalThis.fetch() |
impl: code/web/web_fetch.jsy test: test/unittest.web.mjs |
✅ | Browser Service Worker Cache API globalThis.caches.open() |
impl: code/web/web_cache.jsy test: test/unittest.web.mjs |
✅ | Node FS API require('fs') |
impl: code/local/fs.jsy test: test/int--fsp/integ-test.mjs |
✅ | Node FS Promises API require('fs').promises |
impl: code/local/fsp.jsy test: test/int--fsp/integ-test.mjs |
✅ | Web FS API lightning-fs from isomorphic-git |
impl: code/local/fsp.jsy test: test/unittest.web.mjs |
✅ | Web FSP Promises API lightning-fs from isomorphic-git |
impl: code/local/fsp.jsy test: test/unittest.web.mjs |
✅ | LMDB node-lmdb |
impl: code/nosql/lmdb.jsy test: test/int--level/integ-test.mjs |
Also see SQLite and Level-based adapters for local / embedded alternatives.
Technology / Library | Implementation | |
---|---|---|
✅ | MinIO minio |
impl: code/nosql/minio.jsy test: test/int--s3api/integ-test.mjs |
✅ | AWS S3 or compatible aws4fetch |
impl: code/nosql/s3_aws4fetch.jsy test: test/unittest.web.mjs |
Also see s3leveldown
Level-based adapter.
SQL and Knex adapter
Technology / Library | Implementation | |
---|---|---|
✅ | SQLite node-sqlite3 |
impl: code/sql/sqlite.jsy test: test/int--sqlite3/integ-test.mjs |
✅ | SQLite knex.js |
impl: code/sql/knex.jsy test: test/int--sqlite3/integ-test.mjs |
✅ | PostgreSQL knex.js |
impl: code/sql/knex.jsy test: test/int--postgres/integ-test.mjs |
✅ | CockroachDB knex.js |
impl: code/sql/knex.jsy test: test/int--postgres/integ-test.mjs |
❌ | CrateDB knex.js |
impl: code/sql/knex.jsy test: test/int--postgres/integ-test.mjs note: Crate SQL lacks BLOB in-table support |
✅ | MariaDB knex.js |
impl: code/sql/knex.jsy test: test/int--mysql/integ-test.mjs note: Uses MEDIUMBLOB |
✅ | MySQL knex.js |
impl: code/sql/knex.jsy test: test/int--mysql/integ-test.mjs note: Uses MEDIUMBLOB |
✅ | Microsoft SQL Server knex.js |
impl: code/sql/knex.jsy test: test/int--mssql-server/integ-test.mjs |
Level adapter
Technology / Library | Implementation | |
---|---|---|
✅ | LevelDB leveldown |
impl: code/adapter/level.jsy test: test/int--level/integ-test.mjs |
✅ | memdown memdown |
impl: code/adapter/level.jsy test: test/int--level/integ-test.mjs |
✅ | subleveldown sharing subleveldown |
impl: code/adapter/level.jsy test: test/int--level/integ-test.mjs |
✅ | RocksDB rocksdb |
impl: code/adapter/level.jsy test: test/int--level/integ-test.mjs |
✅ | Medea medeadown |
impl: code/adapter/level.jsy test: test/int--level/integ-test.mjs |
✅ | Redis redisdown |
impl: code/adapter/level.jsy test: test/int--redis/integ-test.mjs |
✅ | AWS S3 or compatible s3leveldown |
impl: code/adapter/level.jsy test: test/int--s3api/integ-test.mjs |
✅ | SQLite level and |
impl: code/adapter/level.jsy test: test/int--sqlite3/integ-test.mjs |
Keyv adapter
Technology / Library | Implementation | |
---|---|---|
✅ | JavaScript Map keyv and new Map() |
impl: code/adapter/keyv.jsy test: test/unittest.node.mjs |
One file keyv and keyv-file |
impl: code/adapter/keyv.jsy test: test/int--fsp/integ-test.mjs Stored in a single JSON file with binary values encode in base64 |
|
✅ | Memcache keyv and keyv-memcache |
impl: code/adapter/keyv.jsy test: test/int--memcache/integ-test.mjs |
✅ | MongoDB keyv and @keyv/mongo |
impl: code/adapter/keyv.jsy test: test/int--mongodb/integ-test.mjs |
✅ | SQLite keyv and @keyv/sqlite |
impl: code/adapter/keyv.jsy test: test/int--sqlite3/integ-test.mjs |
❌ | PostgreSQL keyv and @keyv/postgres |
impl: code/adapter/keyv.jsy test: test/int--postgres/integ-test.mjs ❌ note: Failed |
❌ | MariaDB keyv and @keyv/mysql |
impl: code/adapter/keyv.jsy test: test/int--mysql/integ-test.mjs ❌ note: Failed to store large blobs |
❌ | MySQL keyv and @keyv/mysql |
impl: code/adapter/keyv.jsy test: test/int--mysql/integ-test.mjs ❌ note: Failed to store large blobs |
The PHORBAS project implements a persistent binary data storage scheme that accomodates opaque (encrypted) information. It is inspired by binary content addressable data storage, replication features of CouchDB, the opaque data storage of Tahoe-LAFS, the eventual consistency of CRDTs, and persistent Hash array mapped trie data structures.
Phorbas appears in in Greek mythology and is connected to "giving pasture" -- in this case, safe pasture to for data storage.
P - Persistent
H - Hashed
O - Opaque
R - Replicable
B - Binary key/content
A - Addressable
S - Store
Due to the opaque nature of the data storage, the storage is not queryable like a database. It is similar to IPFS with a less ambitious goal of being a pratical data storage scheme for data for embedding into other projects.