sanjar-notes / backend

Backend web development fundamentals
0 stars 0 forks source link

P2p communication, without a server. Use backbone as a network layer mostly #42

Open sanjarcode opened 1 year ago

sanjarcode commented 1 year ago

Context

I want an app where my cursor position is shown to the person I'm video calling (say we're going through some code on their browser). It's one way comm, but how do I send my cursor coordinates without them 'listening' or the other way around.

The issue is I don't want to create a chrome plugin with a 'server' app that you need to install

Questions

  1. Is it possible to run a server inside a browser tab? Maybe only a temporary one.
  2. Reliable direct ping - Even if I do install a server app (in addition to the browser extension), how would I ping their server. Ik both are connected to the backbone via ISP, but are they reliably pingable? I don't wish to add a centralized server - that's a privacy issues and also that I need to pay for it.

Explore

  1. How p2p works, without a server?
  2. Pros and cons of being addressable but not having a dedicated server connected to the backbone. Scope: latency, cost, bottlenecks
  3. Handshake structures if this is possible?
  4. How do torrents work? See the protocol
  5. How websockets can work in such a system?
sanjarcode commented 1 year ago

When solved, make the app.

sanjarcode commented 1 year ago

fun bit: https://youtu.be/Dek5HtNdIHY?si=Nbqnu-lF81uRMgPL&t=1m2s (10 sec)