ssbc / ssb-client

client library to scuttlebot
47 stars 26 forks source link

Make it easier to load config using the ssb_appname pattern #14

Closed pfrazee closed 8 years ago

pfrazee commented 9 years ago

Most of sbot ecosystem is controlled by the ssb_appname env var, which tells you which dot-dir in the home to store data and load config.

It would be super handy if you could just specify the appname in ssb-client:

ssbClient('myappname', function (err, sbot) {
  // ...
})

cc @dominictarr @nhq

dominictarr commented 9 years ago

since this is for clients there may be a better way to do this. @nhq are you running mutlple sbot instances on a) the same computer b) within the same process? and are you connecting to multilpe instances from the same? If describe what you are trying to do we can fix the right problem.

NHQ commented 9 years ago

@dominictarr yes, multi sbots, each a separate network, separate keypair identities, same computer, different processes.

dominictarr commented 9 years ago

@nhq but can you describe what you are trying to do?

NHQ commented 9 years ago

@dominictarr

I want to create my own sbot network, for easy p2p messaging between nodes. In this case, for INFINITE CHRISTMAS.

BTW, I was wrong above, they are not each a separate network (duh), but the network is not the same we're all using now with Patchwork. I guess this is merely an abstraction. I reckon that "separate networks" could relay each other without problem.

Ultimately, this would be solved if sbot could manage multiple identities. OTOH, having them run on different processes might be favorable for performance as various "networks" become busy.

Basically, I think an app should be it's own network, on some level, so peers won't have odd messages from other apps coming thru (unless that node is specifically a generic-relay for any sbot app).

dominictarr commented 8 years ago

this would have solved @du5t's recent problem