You are reading content from Scuttlebutt
@luandro %5aAyPBdh2o+6ibJVN6w8/hgY1mdwASTEtcUeyemEMSc=.sha256

Me and @Hiure have been exploring #ssb-browser and "client-server" solutions for using SSB on local community contexts. Why would we want to go back to client-server?

Well, many users in the communities we live have such old devices that even ssb-browser might be a problem (we need to do more actual testing). Another thought we had was that it's better to encourage people to share buying single-board computers then better phones. The client-server architecture also gives the UX that most users expect to have.

Like #cashless we've started exploring the #feedless way of running SSB completely on the server. @rchaves created his own publishAs method, which is completely different from @Dominic's ssb-identities. It consists of passing an id's secret to the function, which then uses ssb.getLatest to get a feed's "latest state" and uses it to ssb.add a new message to the database.

I like this way as it keeps things simple, the db is kept safely on the pub machine. We can have different pubs following each other to create more data redundancy. This way we'll be using SSB more like a federation of pubs then p2p. But we're looking for a progressive experience where every type of device (including a Kindle) can participate, and as data-awareness happens a person can progress to having more responsibility over their data.

But feedless has gotten outdated, so I'd like to achieve something similar using ssb-db2 and ideally #ssb-crut as well. But when I tried migrating the publishAs method to ssb-db2 I got a warning stating that I shouldn't use ssb.add this way as it's risking a fork. Makes sense but... Is there a better way of achieving this? @arj @andrestaltz

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
@luandro %GVWSCY0qrG5e8wCNudLJHlUKWvaixwpcPwTxolRTiFQ=.sha256

That's a really interesting experiment @nichoth!! Wasn't aware of Fauna and never thought of using Netlify in such a way. The method you describe is very similar to how feedless does it, and makes a lot of sense.

That's a great way to achieve this on ssb-db2 @cblgh. I can easily imagine using ssb-keys and ssb-validate to form the appropriate message on the client. But I get confused on how to achieve "passing the signed data onto the pub for publishing to the appropriate feed".

On ssb-db that seems easy enough with the ssb.add method:

Append a raw message to the local log.

But on ssb-db2 add works a bit different:

Validate and add a message value (without id and timestamp) to the database.

Clearly can't append a message which isn't yours. We'd need to instantiate a new ssb-db2 for each id.

There's a ssb.addOOO method:

Validate without checking the previous link and add to db

But after creating a valid message with ssb-validate and passing it too addOOO still get error:

refusing to addOOO() because the old log still exists. This is to protect your feed from forking into an irrecoverable state.

Still donno how to add messages to ssb-db2.

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
@Anders %1yaEYk1mYIzJHajUc6MiZ8i7q91SyYFtVCj8LbKbvv4=.sha256

Yeah I like what @cblgh wrote. add should work fine for adding messages from any feed. That is the same way it works if you get a message over the network, like with EBT. The pub that you add the message to needs to have the latest messages, but that shouldn't be much of a problem considering the pubs would be highly connected and replicate messages often.

This because the old log still exists is because:

sbot.db2migrate && sbot.db2migrate.doesOldLogExist()

meaning you migrated the old log but then you need to make the switch to only use db2, you do this by moving away your old log. Not sure what profile you are using, if you still want to use stuff like patchwork which uses db1, then you should be able to use the same add method in db1.

User has not chosen to be hosted publicly
User has not chosen to be hosted publicly
Join Scuttlebutt now