Replies: 3 comments 1 reply
-
I love the fat marker sketch I'm seeing there @sgwilym! (Fan of Shape Up?) That's actually the first thought that came to mind. I could be interested in a process, that instead of necessarily starting with the form of microblogging / existing solutions, starts with a process to uncover what we want (and the affordances, the elements) and building from there. Basically, if we're building from ground zero already, it can't hurt! |
Beta Was this translation helpful? Give feedback.
-
If you’re writing an application with Earthstar, you’re probably going to use a document schema. The name ‘document schema’ makes it sound fancy, but it’s just a pattern you use for organising your documents so you can easily get them. For example, a document schema for keeping recipes could just be that your recipes all have paths that follow this template:
So the document schema is just:
This is a really simple example that would be suited to a share with a single user, interacting with their data through something like Earthstar’s filesystem sync. But it wouldn’t work well with lots of users. Why? Firstly, there’s no permissions in these paths. Anyone can edit anyone else’s recipes, and maybe not everyone’s cool with that. This is something we can remedy with Earthstar’s ‘owned paths’ concept. Secondly, each recipe’s data is being stored non-atomically in a single document: the title; ingredients; steps; all of it. This can be a problem with many users working together, as Earthstar has no fancy conflict resolution, and uses the rule of ‘last write wins’. If one user were to edit the tile of the recipe, and another user edited the list of ingredients at the same time, one users edits would be clobbered. But we can reduce the likelihood of data conflicts by breaking up data into separate, atomic documents. This also makes it easier to build clients which view and edit this data. So you could say designing a good document schema is about considering three things:
|
Beta Was this translation helpful? Give feedback.
-
I'm going to apply the stuff I said about document schemas to sketch out a microblogging schema for Earthstar. Here's a few assumptions about what features microblogging should have:
Posts can be writtenThe template for a new microblog root post:
Let's break this template into segments:
Media can be attached to postsThe template for attachments to a microblog post:
The first four segments are the same as the one above. But now we have two new segments instead of
Replies can be made to postsThe template for replies to a microblog:
This path starts with
Media can also be attached to repliesThe template for replies to a microblog:
The last feature. The first five parts of this template are the same as the last, but using the same format for root attachments at the end:
This is kind of based on what we learned about structuring paths in the Letterbox app: you want to be able to grab structurally similar things (e.g. replies) in as few queries as possible, and with as little filtering and sorting of paths as possible. This is admittedly a weakness of designing schemas like this for Earthstar: the schema often has assumptions about how the UI will work in it (e.g. we will get all root threads first, then use the values we learnt from that to find replies, etc.). There are open issues about addressing this. And that's not even getting into other stuff you need for a good UI, like indexing and pagination — which we'll probably have to do client-side in some way. |
Beta Was this translation helpful? Give feedback.
-
I'm all tied up with Earthstar core protocol stuff, and I really miss making ordinary people can use.
But maybe if we put our heads together we can keep things from hitting a standstil on that front? One usecase I think Earthstar could do well is microblogging (i.e. sharing small bits of text + media), so you can have multiple private twitters/instagrams.
I've visited this idea before with the Lobby app (source). You'd add different shares to the app, and get an overview of all the latest posts from them.
The format was basically just this: you'd set documents with the plaintext of your message, and write it to a path with the template
/lobby/~{authorAddress}/{timestamp}.txt
. And the posts could be ephemeral too, so they'd disappear after a set amount of time.There are a few features I'd like to add to a future microblogging convention:
These microblogs wouldn't be constrained to Earthstar clients, either: you could configure replica servers to repost them to Twitter or Mastodon so you could go all POSSE. Or maybe you surface them to your personal website.
So what's this discussion about?
I'd love to learn some patterns we could export to doing this for other applications e.g. user profiles.
And also to just have some fun brainstorming what could be. It's important to really do stuff, and it's important to imagine what could be.
Beta Was this translation helpful? Give feedback.
All reactions