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

Investigate if joining forces with Tox makes sense #766

Open
NullVoxPopuli opened this issue Apr 26, 2020 · 2 comments
Open

Investigate if joining forces with Tox makes sense #766

NullVoxPopuli opened this issue Apr 26, 2020 · 2 comments

Comments

@NullVoxPopuli
Copy link
Owner

NullVoxPopuli commented Apr 26, 2020

Tox seems to have similar goals as emberclear, so a partnership may be mutually beneficial.

  • No storage / history
  • Push as much into the hands of clients as possible
  • Totally distributed, nodes/servers act more as relays than anything... minimal code
  • Fully end-to-end encrypted

Right now, the "Tox Core" is written in C: https://github.com/TokTok/c-toxcore.
In order to prepare for the Web, a few things need exploration:

  • can this C project be compiled to WASM
  • Rust implementation in progress - depending on timeline, this could be compiled to WASM with less hoops to jump through
  • Needs to support TCP connections and TCP relays (the web only runs on TCP)
  • Needs to support TURN/STUN for WebRTC versions of Video/Audio chat

Specific needs of emberclear from a protocol or "core" implementation:

  • Ephemeral Connections for Login Transfers and destroyable chats
  • Web Frontend relies on "Workers" to try to optimize the main thread for resposiveness
    • Today, emberclear's crypto all happens in a worker, and eventually the socket connections and data management would benefit from living in a worker as well
    • If Tox is adopted, being able to communicate with it via a worker would be ideal.
  • Channels / Group Chats
    • Need moderation
    • (at the time of writing this), a prototype of a decentralized democracy system is being implemented
    • Optional password protection

Future goals of emberclear that would like to be seen in Tox:

  • browser data encrypted at-rest
  • relay would need to support push notifications for mobile devices using the PWA version of emberclear so that users may receive messages while the app is not in focus on their phone / tablet / etc
  • complete transparency of relays
    • expose logs / activity
    • map of what's connected to what
      • would need to figure out privacy issues since currently users are contacted via public key
@iphydf
Copy link

iphydf commented Apr 26, 2020

Some thoughts:

  • Tox supports running on TCP using TCP relays. It also supports HTTP and SOCKS5 proxies, so adding another proxy-type that's websockets should be pretty straightforward.
  • Talking to tox via a worker connection should be pretty easy as well. You'd need to bind whatever it is that does the worker protocol to the tox public API. That should be sufficient.
  • Password protection for groups exists in the prototype.
  • Browser data should be handled by the application, not toxcore. Toxcore just does the network I/O and crypto, and some ephemeral state management.
  • Push notifications will need a bit of work, because they require that the relay knows a bit more about the client.

Future thoughts:

  • If you want to store things like "friends" and share them across devices, we need a way to link devices and sync between them.

@NullVoxPopuli
Copy link
Owner Author

If you want to store things like "friends" and share them across devices, we need a way to link devices and sync between them.

I'm about to finish this capability here: #733
Statecharts have been a huge help with getting me through all the data flows / edge cases / etc.

another proxy-type that's websockets should be pretty straightforward

excellent. emberclear currently uses Phoenix "Channels", which is a little more than websockets, but I'm sure there are other abstractions out there that could be implemented with the proper fallbacks.

Everything else makes sense, thanks for the info!

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