-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
API link in README is outdated #705
Comments
I think a good place to link to might be right here, since this kind of explains the compounded API situation between the two... https://github.com/ssbc/ssb-db#secretstackuserequiressb-db--secretstackapp |
Alternatively, maybe the readme could link to the various APIs for all of the plugins used? I'd strongly agree that ssb-db should be the priority, since that's the most common, but it'd be cool to know which plugins are included in this distro. |
ssb-db is it, from what I can tell. Lines 3 to 9 in c66ecf9
|
It's confusing, but you get different behavior depending on whether you call from JS or the CLI.
There's been discussion about spinning |
oooh, yah. Just realizing that myself too haha. |
Well hmm, that IS very confusing ... Is it possible to dig up links to where this discussion about that idea was taking place? |
We need to rip out |
What interesting is that if you take out ssb-cli from here, not much is left. What is the value add of ssb-server at that point? Can either of you outline the specifics of how you'd approach the separation? |
I thought about this more this morning and remembered some stuff. I think @dominictarr's vision for this module is to be a secret-stack "distro", so you can: $ npm install ssb-server And then easily: const createApp = require('ssb-server')
.use('ssb-master')
.use('ssb-gossip')
.use('ssb-local')
// etc
const app = createApp() Note that in this model you don't actually install the plugins yourself, so you're relying on ssb-server installing them for you. Being very candid, I understand the benefits of this model but I don't really like reaching into my deep dependencies to summon plugins, so I've been using this module for two separate things:
I've taken a bit of time this morning to sketch out an idea of what I'd like SSB-CLI to look like, if anyone is interested in sharing feedback. I've basically taken ssb-client and glued it to yargs, and it seems to be working well so far. Anyway, hopefully that's a helpful stew of context, feelings, and a prototype of what I think a solution should look like. Happy to answer questions, and of course, happy to yield NPM's |
@christianbundy because ssb-server is a distribution you should use it via the command only. |
@christianbundy i caught wind on ssb that you've been moving forward with that yargs strategy. Is that accurate. How do you think that might affect this project. Do you hope to replace bin.js? Or coexist? I don't really have an opinion, but am here to offer/hold the perspective of a relative newb, and opt for things based on how well theyd achieve/improve accessibility of ssb dev tools |
I find your distinction helpful @dominictarr . I recently created a small project that imported ssb-server, but I think I should import secretstack instead, since it's the library |
We definitely would want to document this |
Cool, thanks for the extra context @dominictarr. Maybe we should remove the
Aside: I'm a bit anxious that this may be taken the wrong way, so please reach out if anything feels wrong or rude. Most of the SSB libraries are maintained by everyone because we all depend on them, but when it comes to the end-user interfaces (Patchwork, Patchbay, Oasis, SSB-Server, etc), the responsibility usually falls on one or few maintainers. We're all friends and there's tons of cross-pollination, but we have our own styles and it's common to write an alternative implementation instead of asking a maintainer to merge code they aren't excited about. In this case, I think Dominic is the maintainer for this module, and I don't think he'd be very excited about my SSB-CLI (Yargs, ESLint, promises, etc), so I sketched it out as a separate module instead of trying to replace In summary: I don't want to step on any toes and I don't want to replace Dominic's vision of SSB-Server, but I'd also like to avoid asking Dominic to maintain a bunch of code he's unexcited about. I think the best solution is to just maintain an alternative implementation that I'm more excited about, but it adds some complexity for people learning the stack. I'm not sure how to solve that problem. :/ |
removing module.exports wouldn't be a bad idea, but might mean we'd have to rewrite some tests. hmm, actually I think I may have started that already so fewer things depend directly on ssb-server even for the tests. If we completed that we could remove module.exports from this. |
heh, the plot thickens. Now I see ssbc/ssb-bin , so @dominictarr that is a ripping out of So is Doesn't seem a problem at all to have two different cli client options going though! |
@Connoropolous correct. I think ssb-server should be ssb-server, ssb-bin can be a generic ssb client, that will work with any server distribution if it exposes a local server, which it usually does. patchwork, patchbay, for example both bundle their own ssb server distribution. |
so, by this reasoning, I've done roughly a sensible thing to do by switching from a |
@Connoropolous yup |
I've moved to secret-stack but had been feeling guilty. I'm honestly surprised that ssb-server is intended to only be cli. I think it's good. My main focus right now is writing documentation which is helps people know how to get started. I'm pumped for this |
When you say "I've moved to secret-stack" is that for new projects, or have you switched for older projects you'd worked on as well? |
@mixmix don't feel guilty, but PLEASE add |
I'm thinking of going back to the |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? |
Whatever the result of this issue in ssb-db is, the result of that work should be linked to as a primary API reference for this project...
ssbc/ssb-db#271
The text was updated successfully, but these errors were encountered: