Mixed Compute and Storage Engine

Doing stuff based on time, reacting to messages, and coordinating human behavior brings compute to the table in a fun and almost complete way. Previously, we've mentioned global fields within the living document, but we need more. We need containers of data, and the best container of data ever is: the table.

In Praise of Databases#

The way a table works is you first define a record

record MyRecord {
public string name;
}

and then define a table:

table<MyRecord> my_records;

Tables are not directly exported to people, and instead require a formula to yield data. We can do that via the iterate expression

public formula records_by_name = iterate my_records order by name asc;

We leverage the messaging abilities to ingest to the table. The "<-" operator ingests data into tables and free form records.

message AddRecord {
string name;
}
channel my_channel(client who, AddRecord msg) {
my_records <- msg;
}

TODO:

  • talk about more stuff

Mental Model: Tiny Personal Databases#

TODO