If a blob is plaintext, I think it definitely makes sense to be able to search inside of it.
I think this extends to anything with a syntax. The current prototype is a JSON blob unboxer, but we can sidestep JSON message verification and JSON signing format for everything in value.content
and experiment with any syntax we'd like (like SDN?). No more arbitrarily nested JSON, we just have to agree on what's appended to the feed and we can remain #against-consensus for everything else.
{
"key": "%key.sha256",
"value": {
"previous": "%previous.sha256,
"sequence": 42,
"author": "@feed.ed25519",
"timestamp": 8675309,
"hash": "sha256",
"content": {
"type": "blob",
"blob": "&blob"
}
"signature": "abcdef.sig.ed25519"
}
}
You can always resort to replicating nothing but metadata.
I think this would be really neat, so you could set up a system where you:
- Download the metadata of anyone within 3 hops
- Download blobs posted by anyone within 2 hops
- Download blobs linked by anyone within 1 hop
I think this may have some feature overlap with #ssb-ooo, but I'm not familiar enough to have any strong intuitions or opinions.
Having to attempt parsing of all blobs and creating indexes if parsing succeeds would be a huge (computationally) commitment.
This ties into two problems I'd love feedback on:
How should unboxers work together? Originally the code just used the first unboxer that returned something truthy, so I made a small change that allows unboxers to be chained. Unfortunately, this means that they have a canonical order, so we have to choose between _unbox(blobs.get(x))
or blobs.get(_unbox(x))
. I think the former is the correct answer for now, but if other unboxers are added in the future this may get complicated.
More importantly: what's the right way to add an unboxer? I'm sure this experiment shouldn't be baked into the secure-scuttlebutt package, so I'd like to use the db.addUnboxer()
API. Does this mean writing a plugin for secure-scuttlebutt? Or maybe a scuttlebot plugin? Or is this the sort of thing that goes straight into the client? My goal is to get this experiment working in my "fork" of Patchbay.