Comment on page
A truly composable data layer for Urbit (and beyond).
The goal of bedrock is to make data composability easy by building a userspace agent where
stateis stored with a consistent interface that other agents or front-end clients can interact with, allowing developers of one application to surface data from another application in a repeatable way. Previous attempts at Urbit composability have been stymied by the fact that each agent writes its own data interface and thus each integration must be custom.
Bedrock takes the view that databases are a good technology and models its concepts off of proven solutions, like
idsetc. Doing this makes caching solutions using sqlite3 (or your preferred technology) much easier, which enables responsive performance that users demand and Urbit often lacks.
Bedrock modifies the typical database idea by being distributed-by-default, though of course you can use it "by yourself" like a normal database. To this end, we require every row to belong to a "path" which is essentially a set of peers who should keep in sync with that data, and some meta-data rules about who can modify what. We use the one-at-a-time subscriptions pattern to keep peers up to date so that peers who go offline for long periods of time do not impose an ever increasing memory burden of "unsent pokes."
Bedrock provides a core set of "common" types for the typical social primitives that many apps will require and re-invent over and over. Things like
commentare relatively easy to provide and should prove useful, but a more interesting feature is
relaywhich is essentially a re-tweet for any arbitrary piece of data. We make use of the newly-release remote-scry functionality within Urbit to make this work. The possibility of an "Urbit feed" app that aggregates across many data-types and applications becomes a reality.
Bedrock also has a "thread-poke" interface to provide users with a more convenient/typical API experience of synchronous request/response cycle as opposed to the default Urbit model of separation between those things (which we also support).