Open gpicron opened 1 year ago
I think it is mandatory to layer the protocol. If you want to merge all for SSB2, no problem for me.
@gpicron can you expand on the above?
fwiw i regard the contents of point 5 as opinions (bipf/ssb-bfe are not intended as external standards).
and so here's my opinion: if the dependencies in particular are core to your project and easy enough to implement from scratch then it doesn't matter that they aren't industrial-grade. sometimes this even helps adoption, at least when it comes to niche environments (lora being one such niche); uxn is a very good recent example of how easy portability causes software to spread across unlikely environments.
that said i agree that it could be interesting to re-evaluate at this stage: are these dependencies core pieces or can they be simplified somehow?
@cblgh most of I wrote is my subjective opinion. I don't pretend to have have the truth ;-) So comment, disagree with me. No problem.
I was not meaning that those SSB only standards have no value. At some point they were created and explored. Exploration is key for innovation. But as we talk about of building SSB2, with the intention to have clear and documented specifications, I think we should re-evaluate their added value with regards to existing, mature, documented and largely implemented and tested existing one outside SSB world. That avoid us some work and give us more time to focus on what make more value in SSB.
Uxn is a excellent example. Re-exploring what seems to be acquire with another point of view, but the inventor also explored also as much as possible of what was invented in the past to take the lessons of it. That why I believe so much that SSB has principles to redefine the way digital information is own and diffused and ultimately replace TCP/IP and Unix socket model which implies server oriented architecture and centralisation.
SSB is general exploration of that. We learned a lot from it. Now we are thinking about a new generation, we must take the lesson learns. One is the non-clearly specified protocol is reducing the adoption. Another is that we are not enough taking I think the lessons learned from other explorations. For instance, space industry has to deal with long delays, intermittent, low bandwidth, opportunistic and secure data transmissions between low cpu power devices from the beginning, they slowly specified and matured a standard, DTN BP7, since 2003. Actually, if you take the time to read the specs, look at some video and implementation, you will find that they implement 80% of the data diffusion model that SSB offer. Building on top of DTN architecture would reduce our work by 80% and let us focus on the added values.
One of the weakness of SSB today is the fact of relying on long term key pairs. In a few years, most of the crypto algorithm used today will be obsolete (if they are not yet). The only real way to fight against that is to have the ability to rotate often keys, especially when they are used often. For instance, we should use different keys for network peer identification and feed writer signature.
I am somewhat favorable of doing this, but I think it's not a pressing problem. And if/when it becomes a pressing problem, we can launch new software that will then create a new feed with the new keys. This is tough, because on one hand we are currently experiencing storage sustainability problems because some 6 years ago Dominic probably thought that ever-increasing feeds are "not a pressing problem". On the other hand, there is only so many problems we can solve at once, that if we aim at solving all of the imaginable problems in the future, we will make little progress in any of them. So what I need to do is map all these problems and try to classify them by importance.
I think it is mandatory to layer the protocol. If you want to merge all for SSB2, no problem for me. This will be a Social Media protocol on TCP. I misunderstood the intent, I will stop here on SSB2 and continue on my path. It may be also possible that I misread the doc.
For me, we must think in layers and concerns of each layer and responsibility and try decouple them as much as possible, then focus on efficiency of each.
I understand the separation of concerns you want, and I like that too. BIPF encoding in minibutt is kind of cheating with ssb-db2 because that's the database encoding we use. Arj loves performance, so it might be tough to sell this separation of concerns. I don't mind BIPF that much, because it's a solved problem for us, but it may indeed be a minor obstacle for other implementors. This doesn't sound like a big problem to me, just a minor problem. Again, I might have to take the time to classify problems by importance.
That said, if we limit the size of each feed to 100MB max, and if replicate AOT only followed feeds, then performance is not that important anymore, because scale is so small. In that sense, we could relax performance tricks and aim for simplicity of implementation. I think JSON is fine. I think protobufs are fine. That's for the transport layer, of course. We can continue to use BIPF in ssb-db2 because it's optimized for reads of hierarchically-structured records.
standards
Some time ago cryptix recommended to replace Secret Handshake (SHS) with Noise. I was against it only for the reason of avoiding a breaking change in the network, thus a community split. But other than that, I'm favorable of using state of the art tools and standards.
But it's not so simple, we already have SHS working perfectly well in the (current) SSB stack, and using Noise would not be a matter of just plug-and-play, it would require re-adapting several parts of the SSB JS stack. It's not a clear win, because with SHS / muxrpc / secret-stack / BIPF / BFE etc we can just keep on using them in production because these parts are actually not broken, and thus they are a "problem" that rank very low on my "importance scale" (I should really make this list of problems). We have to be very careful not to let SSB2 become "let's reform absolutely everything about SSB" because that's not the original motivator, and the more goals we add, the thinner we spread ourselves, and the lower our chances of making a change for real users. So we'll need a really moderate approach here where we fix what's really broken, and take the opportunity to add some "low-hanging fruit" breaking changes.
Thanks for your input @gpicron, really appreciated.
What if instead upon creating a new Feed ...
This then becomes very similar to meta feeds, and there is a lot of complexity in such a model. We did model some of this key seperation including network identity and fusion identity.
I think it is mandatory to layer the protocol
I think this should be more clear in the document, right now there is a bunch of stuff related to replication as well that ideally should not be here, but for now are here just to make things a bit more clear of how this could be used in practice. I'm not against separating the layers. I just need to experiment a bit more to get a better idea.
Also I very much agree on the don't reinvent the whole thing. There is value in that, but that is a much larger project and I'm not sure if we have the resources for that. At least I don't. There are some things from SSB that works really well, like rooms. It would be a shame not to leverage some of that existing code and infrastructure. Also it's a way to scope this. That should be clear from the get go of the protocol. I'm of the opinion that the protocol layer are sort of "easy" part in that you can invent different ones with different properties and use that higher up. Like p2panda is a great way to leverage lipmaalink for building efficient replication of documents. What I was mainly trying to achive here was a very simple protocol for social media data where multi-device and edit/delete is a core part of the protocol. And I do think all of these p2p projects can learn from each other and influence each other. It's not a winner takes all.
This then becomes very similar to meta feeds, and there is a lot of complexity in such a model. We did model some of this key seperation including network identity and fusion identity.
Yes it is, but I think without being strictly modelled as a tree with link to leaf. But instead of being a message on a meta feed you must replicate, this is a message that is the first message of a feed. There is potentially a link to some creator signing key, and creator may inform of its existence in another feed, but there is no direct coupling.
It also generalize the replication algorithm and implies for 2 peers to sync there knowledge of DAG's rooted at some message both for feed, thread, crdts, etc. And it makes creating Feed cheap. You can have several Feed with the same writer key. You can rotate the writer key/algorithm.
Also I very much agree on the don't reinvent the whole thing. There is value in that, but that is a much larger project and I'm not sure if we have the resources for that. At least I don't.
This is a bit the chicken and the egg. Having our own standards make use isolated and difficult to find resources.
Let's take an example. If we decide that in the principle we disconnected the network identity from feed author on the device.
What it mean in term of changes in the current stack for a first version ? Adding an optional RPC to be called by the client telling the server the feed key. That remain backward compatible.
Added value: not so much, a bit of improvement on the confidentiality and traceability, but not much.
What it allows: we can decide to support in parallel to SHS/BoxStream libp2p connectivity without breaking. It allows to add with some of the side services of that framework (discovery, DHT, NAT traversals), etc. Lot of useful features that we don't have specify and implement. This make SSB better known by the libp2p community. We can think at implementing EBT principles as a alternative PubSub implementation https://github.com/libp2p/specs/tree/master/pubsub. This potentially open the door for collaboration and financing from a wider community.
Generally speaking, I think the simplicity is in the separation of concerns.
Some random though
One of the weakness of SSB today is the fact of relying on long term key pairs. In a few years, most of the crypto algorithm used today will be obsolete (if they are not yet). The only real way to fight against that is to have the ability to rotate often keys, especially when they are used often. For instance, we should use different keys for network peer identification and feed writer signature.
What if instead upon creating a new Feed, the root message would be a Feed Metadata Bundle containing:
I think it is mandatory to layer the protocol. If you want to merge all for SSB2, no problem for me. This will be a Social Media protocol on TCP. I misunderstood the intent, I will stop here on SSB2 and continue on my path. It may be also possible that I misread the doc.
For me, we must think in layers and concerns of each layer and responsibility and try decouple them as much as possible, then focus on efficiency of each. There are
standards: It is interesting to define new "standard" when it brings a meaningful added value. But... It takes a lot of time to derive a good specification, a reference implementation, a consensus and a kind of recognition that permit interoperability.
Sorry this is a bit random. But the most important for me is that I want to clarify the direction you want to take for SSB2 elaboration to determine how much time I will personally invest in SSB2 effort.