Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

New message channel implementations #650

Open
AdamISZ opened this issue Oct 30, 2016 · 2 comments
Open

New message channel implementations #650

AdamISZ opened this issue Oct 30, 2016 · 2 comments

Comments

@AdamISZ
Copy link
Member

AdamISZ commented Oct 30, 2016

IRC obviously has its pluses and minuses, but I'm mainly writing this to advertise the fact that it should be very easy to write new MessageChannel implementations. See here.

By subclassing MessageChannel and implementing those functions, you can run Joinmarket via something else: any server that can handle routing of messages between clients. I did a very primitive version over websockets, just to test it, seemed OK. I also tried matrix (see matrix.org) but found it hard to get it to work with a reasonable level of speed.

The most useful feature such a new implementation could have, it seems to me, is good scalability: the ability to handle hundreds of clients at once, that, while their bandwidth requirement over time is small, require fast bursts of several kB for a few seconds occasionally. Thanks for any help on this.

@chris-belcher
Copy link
Collaborator

So if we used a p2p network we might have the issue that makers will be the only long-running peers and they have a strong incentive not to relay other maker's offers.

It's worth checking how bitsquare does things, since you'd think they have a similar issue that the only long running peers are liquidity-providers and they won't want to relay competing offers.

There might be some clever idea involving hashing things as commitments so makers can't leave out offers without the taker knowing.

@eduard6
Copy link
Contributor

eduard6 commented Mar 25, 2017

A few random comments:

  • XMPP is usually mentioned when scalable communication protocols are talked about. It requires a server but there are some public servers that are open over the internet and Tor. I think you create a channel like on IRC but the protocol is more efficient and scalable so there shouldn't be any problem with rate limits. There are a lot of XMPP Python libraries.

  • It is possible to run an XMPP server also. There are companies that do hosted XMPP servers (no maintenance needed). Setting up a Tor gateway looks like a couple lines in a config file.

Might not be needed for JM to know anything about Tor. But if it does:

  • The Tor Project maintains an official Python library called Stem. Other than having a running Tor daemon on the system it has no dependencies.
  • Another mature Python library for Tor is txtorcon. It uses Twisted.

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

No branches or pull requests

3 participants