-
Notifications
You must be signed in to change notification settings - Fork 123
TeleHash Role
TeleHash is the lightweight P2P DHT protocol that originally inspired the creation of the Locker Project. It will play an essential role in how lockers connect and exchange data between themselves and external apps.
A person's locker can live anywhere on the net, including mobile devices and home devices behind NATs, anywhere that is a generally online/available endpoint (and can also dynamically move around to different parts). Due to this freedom, a locker can't be traditional well known http endpoint and instead uses TeleHash to be always reachable anywhere.
In order to be found, every locker uses the DHT to listen to ("tap") requests for it's public key and (optionally) any of it's social/contact identifiers (@jeremie, xmpp:[email protected], fb:13563463467, etc). Any other locker or app attempting to contact it via any of those identifiers will use the DHT and send ("dial") a signed connection request, which the receiving locker can check the signature of the sender and decide wether or not to respond.
Since both lockers could often be behind NATs and unable to use TCP, TeleHash facilitates opening a UDP mapping between them ("pop"), from which the lockers will need to use socket tunneling over UDP (like UDT or enet) to establish a HTTP connection path. It's TBD if the encryption should be handled inside the socket (SSL) or outside the socket (part of the tunneling).
Since every locker will be participating on the DHT it can also be used for other purposes, like sending lightweight notifications to lockers when data that is shared with them changes (a new photo appeared in a shared album). It can also be used for public style apps, such as broadcasting a status update to anyone listening.
Importantly, by being built on TeleHash, in the case of a partially broken network (hardware failure, disasters, misconfigurations, or intentional blocking) as long as local parts of a network are operational (local wifi mesh, neighborhoods, or regions) then the TeleHash DHT ring will use whatever nodes are available and all lockers on those networks will still work and be able to contact and share with each other.
- clean up and test TeleHash node implementation (ongoing)
- have locker core start a switch and tap it's public key (in progress)
- create a simple app that will look up and contact another locker
- implement the socket tunneling
- simple app using tunneled http requests to exchange data with another locker