turtledb-com
v0.0.18
Published
Live data presented everywhere (with history)
Downloads
33
Readme
turtledb-com
Live data presented everywhere (with history)
THIS PROJECT IS NOT PRODUCTION READY
Please interpret this README.md as speculative fiction. There are several critical tasks remaining before the example will work.
- I'm evaluating the cost effectiveness of hosting companies (opening a port to my s3-peer isn't included in digital ocean's "app" concept)
- service worker crashes (easily remedied with chrome://serviceworker-internals but... yeah, that's not production)
- memory leaks (were expected and not problematic for development but... need abatement before actual users)
Overview
The name "turtledb-com" is a reference to this "Turtles All the Way Down" idiom.
turtledb-com is a version control database, a protocol, and a service provider. It includes a light-weight built-in display framework.
turtledb-com is a version control database
In this project, a Turtle is an encoded JavaScript value. Turtle encoding isn't compact but it allows us to describe Turtles as combinations of previously encoded Turtles. Turtles are encoded by appending a new head (potentially) referencing the previous Turtles. A Commit special type of Turtle that is signed by the owner of a stream and includes an additional meta-Turtle describing the new Turtle-state.
turtledb-com is a protocol
Turtles can be streamed just by sending their bytes. Because new Turtles are always combinations of previous Turtles we are only sending new/missing sub-Turtles. As more Turtles are streamed our dictionary of sub-Turtles grows. As the dictionary grows, the efficiency of the protocol increases.
turtledb-com is a service provider
turtledb-com as a service provides a file-system for virtual computers described in JavaScript, HTML, and CSS.
turtledb.com is the built-in service provider designed to handle realistic-levels of human-scale usage for free.
Realistic-levels of human-scale usage
Using a keyboard, maximum human-scale data output is around 18 baud (212 wpm). 1MB / 18 baud == 16+ hours. Realistically though... unless we're in data-entry, our data output is a few kB/day of highly-repetetive text.
Usage example
Create and clone your Turtle
- Go to turtledb.com and login
- open a new folder in a terminal that has node installed
npx --package=turtledb-com fspeer
(you'll be prompeted to login)- open your new folder with the IDE of your choice
Modify your Turtle
- edit /components/start.js
- save
- notice that your log-in page includes your change
Deeper dive documentation (TODO)
- Encoding/decoding
- The Recaller
- Uint8ArrayLayerPointer and Committer
h``
andrender()
- how the start page works
What's running on the server
- The server is a digital ocean droplet running ubuntu.
- node 22 (https://joshtronic.com/2024/05/26/ubuntu-nodejs-22-install/)
- yarn and PM2 installed globally
- nginx and certbot (https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04)
- the turtledb-com repo (https://github.com/turtledb-com/turtledb-com)