-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question]SSB Spec? #154
Comments
hey @qwertyuiop924, you might be interested in https://github.com/ssbc/docs, published on https://ssbc.github.io/docs/ and https://scuttlebot.io. 😃 do you want to expand further on what you have in mind? myself and probably others would be interested to hear. |
Well, I was wondering if the actual Secure Scuttlebutt protocol was documented, such that it could be implemented in another programming language without digging through the source. You explain some of it, like identities, but the majority of the protocol is entirely unspecified, meaning that you have to dig through the source to get that information. To contrast, your peers (dat, IPFS, Matrix, etc.) and the majority of widely adopted protocols today (HTTP, SMTP, LDAP, SSH, Telnet, IMAP, POP, etc.) have rigourous specifications of the protocol (on their website for the former, as RFCs for the latter), detailing all, or at least most, of what you need to know to create a working implementation of the protocol. Most of these protocols (all save dat, AFAICT) have multiple implementations, which function well together, so you can choose whichever one you want: this isn't a coincedence. Right now, if you want to use SSB, you have to use Node. I don't hate Node or anything, but plenty of people do, and there are uses to which it is ill-suited. I would rather that it would be possible to use SSB in other languages as well, which would have the addtional benefit of ensuring that the success or failure of the protocol isn't tied to the success or failure of any one language or runtime. With a formally defined spec, it becomes dramatically easier for anyone who wishes to implement the SSB protocol to do so. Possible difficulties for you in doing this is the fact that I gather you use many external libraries in the protocol itself: IIRC, an external lib is used for LAN discovery in Scuttlebot. If you wanted to specify your protocol, you'd have to specify what these libraries did as part of the spec, as they are part of your protocol on the wire. And you'd probably want to specify Scuttlebot, as it is downstack from most actual uses of SSB. Hoped this helped explain. |
hey @qwertyuiop924, you're totally right. i too wish there was a formal specification to explain the protocol in great detail. the problem is the protocol has iterated quickly based on rapid prototyping of our working software and writing good specifications is really difficult. so, do you want to help document what you find lacking? if you have any specific questions about the protocol, feel free to ask here or on the SSB network (using patchwork or patchbay).
even without a formal spec, here's a proof-of-concept go implementation thanks to @cryptix. 😄 |
Neat. Really, I just wish the protocol was better defined. Like, for instance, what's muxrpc got to do with SSB? How are SSB messages formatted? All that stuff. If I dig up the answers, I might even put in a PR to document it (noting that it's unstable, and subject to change, naturally). |
secret-handshake and muxrpc don't have much to do with ssb per-se but it transports the gossip communication. |
Ah. So they're downstack from ssb? That explains a lot. |
@qwertyuiop924 yeah, maintaining multiple protocols at this current point in development would slow us down a lot. Each change would have to be synchronized over multiple implementations, but I completely agree that this is important to eventually have, but not yet. what language do you prefer? which is direction is downstack? muxrpc and secret-handshake are dependencies of ssb. I'm happy to answer any questions you have if you would like to organize those answers into documentation |
@qwertyuiop924 re downstack: |
@cryptix just to fill out your comparison a little more clearly, |
I get it, and am willing to wait. Downstack means below the component in the tech stack, so yes, dependancies are downstack. As is node, the OS, the BIOS, and the hardware itself. Favorite language? Scheme, closely followed by CL, Lua, JS, and C |
I agree with @qwertyuiop924, SSB really needs an official specification (even if that is still a moving target). The current documentation is too high level and mostly focused on Scuttlebot. It does not cover lower level things a developer, in another language, would need to know. Things like ...
I have been trying to build a mobile client for SSB, and it has been very difficult to understand how everything works together. However, having said all that, I was able to eventually write a barebones client that answers some of these questions. It gets rid of most of the dependencies and simplifies the logic so that the protocol is clearer. I am posting it here in case anyone else is looking to write a client outside of the Node ecosphere. https://github.com/GrokBB/Nebula/blob/master/doc/reference/ssb-client.js This process was much more difficult than it should have been, especially with the amount of dependencies I had to go through to understand everything. There are some things I still don't understand, and some parts I will have to come back to later (like the different message types). So an official specification would be greatly appreciated :) |
Dang, that is really cool @BrianOtto. I'll just chime in as well: I would really like to see a spec eventually so I can try and implement something for Erlang or Elixir. |
I agree we need a spec, I just think we need a volunteer for that (instead of pre-appointing someone). |
See also: #181 |
I have started to write up what I know here ... https://github.com/ssbc/secure-scuttlebutt/wiki/Getting-Started I will add more as time permits. Feel free to review and correct any errors, or add more details! |
Is the protocol still moving fast? |
Since it hasn't been linked here yet: Scuttlebutt Protocol Guide
i'm not aware of any breaking change to the network layer yet. |
This issue might be never closed unless we consider the protocol guide (link by cryptix above) done as version 1. More actionable issues can be opened, regarding that guide. In particular, the issues should be opened in that repo: https://github.com/ssbc/scuttlebutt-protocol-guide (Hope people are fine with closing this issue) |
@andrewtj the protocol is being developed, but we try to do so without breaking things. we do not intend to support legacy protocols for ever, but we do intend to design for graceful upgrades. There is some emerging stuff that is not in that guide, but that covers everything currently "mainstream" ssb |
I'm interested in writing a erlang pub. Would also be interested in a full spec, and helping improve it as possible, even if it is flux |
@CrowdHailer yup, see the protocol guide: https://github.com/ssbc/scuttlebutt-protocol-guide |
@CrowdHailer also if you are doing erlang stuff, also talk to @jiangplus who tells me he's working on exlir port |
@dominictarr thanks for the link. I have actually found the protocol guide and opened an issue asking for the improvement of adding concrete examples for all the steps. @jiangplus Would be interested in seeing what you have done if it is on github. I am actually an elixir developer and am only using erlang as an experiment. I would be quite keen to contribute to an elixir version |
Moid (@Sur8RwcDh6kBjub8pLZpHNWDfuuRpYVyCHrVo+TdA/4=.ed25519 on ssb) also did some work with ssb in erlang: https://viewer.scuttlebot.io/%25d5gv%2FqcOJiI2ow7VWpZ20LJASksEOtP4asjW28nMyvw%3D.sha256 |
I am interested in using SSB in a platform/language-agnostic environment. Is there any sort of specification of the SSB protocol, for implementation in other environmentd?
The text was updated successfully, but these errors were encountered: