Blob Content II: Return of the Multiblob
This is still a hack but it turns out I might have implemented async codecs for flumelog-offset, which lets us use multiblob the way the gods intended it. I'm sure there are bugs, but this seems to be working well enough that I think I'm planning to use it as my daily driver. I won't be posting blob content messages regularly, but I want to see if I can find any new failure modes.
Testing
Let me know if you end up testing this out! I don't think there's any risk of breaking your feed with this version of blob content, but don't trust me. Please let me know if this gives you any trouble.
Patchbay
I'm running a branch of Patchbay on the SSBC repo called @christianbundy/master
if you'd like to test it out, just bear in mind that this is pretty experimental.
git pull origin @christianbundy/master
Not Patchbay
I think this should be relatively easy to plug into an existing client by just running npm i --save https://github.com/ssbc/secure-scuttlebutt#blob-unboxer
and staying up-to-date with npm update
.
Feedback
The first round of feedback was super helpful in:
- pointing out my misunderstandings (especially @dominic's test)
- pushing me in the right direction
- helping me think about failure modes (especially @aljoscha's questions)
- making me feel warm and fuzzy and such
So for that, thank you. I'd really love some more feedback on this latest iteration if you've got the time. I'm going to include some notes below that might be good points to start discussion. Really looking forward to hearing more thoughts!
Notes
Good
- you can now view blob content messages (!)
- all the hard stuff is handled by multiblob (!!)
- it doesn't break your feed anymore (!!!)
Bad
- if you receive a blob after the blob content message:
- it will remain hidden as a "private" message
- the only workaround I've found is restarting sbot
- the only way to publish messages is `sbot publish --type 'blob' --blob '&abcdef.sha256'
Ugly
- the changes to secure-scuttlebutt are experimental
- the changes to flumelog-offset are experimental
???
- benchmarks are showing no performance changes from the codec change(s)
console.error
wasn't working withoutconsole = require('console')
- I'm super curious whether private blob messages work -- anyone want to try?
Next
- I'd like to
bikesheddecide on a name for the post type- I was originally thinking
blob_content
but got sidetracked trying to understand why underscores are often used in post types (at least for #ssb-chess) - I'm a bit surprised that the
blob
type had never been used (within 2 hops) - I'd imagine
blob
is probably fine unless there are other objections
- I was originally thinking
- working with the actual API instead of forking secure-scuttlebutt
- this is dependent on the async codec code being merged into flumelog-offset and secure-scuttlebutt
- is there a difference between secure-scuttlebutt plugins and scuttlebot plugins?
- I'm unclear on how this would actually be implemented or used by client authors
- working through the two "bad" bits mentioned above
- it would be nice to not have to restart sbot when a blob comes after the corresponding message
- it would be nice to be able to post from a non-CLI client
- probably heaps of other stuff, I'd love some feedback on what to work on next