ssbc / ssb-db

A database of unforgeable append-only feeds, optimized for efficient replication for peer to peer protocols
https://scuttlebot.io/
MIT License
1.17k stars 75 forks source link

addUnboxer is not a function #282

Closed christianbundy closed 4 years ago

christianbundy commented 4 years ago

It looks like we aren't exposing the addUnboxer() method over MuxRPC. Should we be? I was thinking yes, but I don't think we can pass functions over MuxRPC unless we're stringifying them. I haven't done any testing, so I could be way off, but my guess is that we have three options:

Anyone have a feel for the right move here? FWIW this is me trying to add SSB-Identities to Oasis.

cc: @staltz @mixmix @dominictarr @arj03

mixmix commented 4 years ago

I don't think addUnboxer remotely is a good idea at all, because :

Can we talk about ssb-identities and what you're trying to do? AFAIK that code is beta.. as in has seen some use but not been stress tested

christianbundy commented 4 years ago

Hi! I was trying to use client-side plugins over MuxRPC, so I'd be loading SSB-Identities in the client rather than in the server. The problem is that adding an identities requires adding an unboxer, which I can't do remotely over MuxRPC. This basically means that any 'lessbot' has to be both a database and an identity management service, you can't do identity management on the client-side.

This is still a problem, but I'm planning to drop most of the existing Secret-Stack/MuxRPC infrastructure (including SSB-Identities) so I think this is fine to close.