Skip to content
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

How can I enable *both* a client and server? #5

Open
christianbundy opened this issue Dec 3, 2019 · 3 comments
Open

How can I enable *both* a client and server? #5

christianbundy opened this issue Dec 3, 2019 · 3 comments

Comments

@christianbundy
Copy link
Contributor

I've tried to add both the client and server as secret-stack plugins but instead I saw:

plugin named:tunnel is already loaded, skipping

My use-case is that Oasis works as both a user-facing client and as a public SSB viewer, so I'd like to be able to use both.

@staltz
Copy link
Owner

staltz commented Dec 3, 2019

Hmm, this is a tricky one. It's not a matter of trivially merging the two plugins. The server maintains a list of endpoints (clients), so if the server is also a client it would have to add itself to that.

Depending on your use case you might want to try pure ssb-tunnel, which is a superset of this implementation. Another idea is to build an alternative plugin that merges client and server plugins into one.

@christianbundy
Copy link
Contributor Author

Hmm, does the pure ssb-tunnel provide rooms, or is it just a socket?

I suppose maybe this should be put another way: is it possible for conventional pubs to replicate content through rooms? Or do they have to choose between being a client and a server?

@staltz
Copy link
Owner

staltz commented Dec 4, 2019

Hmm, does the pure ssb-tunnel provide rooms, or is it just a socket?

Installing ssb-tunnel will allow you to connect to Bob via Carla, with a multiserver address like tunnel:carlaID:bobID, it will also allow you to become such a bridge so that others can connect to Bob via the multiserver address tunnel:myID:bobID.

What ssb-tunnel doesn't have that ssb-room has are two APIs: (1) isRoom (returns a boolean), and (this is the most important one) endpoints (returns an array of everyone else connected to the room).

I suppose maybe this should be put another way: is it possible for conventional pubs to replicate content through rooms? Or do they have to choose between being a client and a server?

I don't quite understand the question, do you want a pub to connect to a room? I wouldn't do that because then the pub "looks like a person", but yes it's possible if the pub installs the plugin ssb-room/tunnel/client. Or do you want a pub to also be a room? That would actually make a lot of sense, it's basically a normal pub that also allows its currently connected clients to connect to each other.

What I'm wondering is really what is the use case of having both room client and room server on the same node. You mentioned "both user-facing client and public SSB viewer", but none of these use cases requires a room server plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants