toc icon indicating copy to clipboard operation
toc copied to clipboard

Implement and test simultaneous login with separate telehash id for each device

Open lewisl9029 opened this issue 10 years ago • 5 comments

Looks like theres no need to have separate telehash id per device if we have a shared storage medium.

https://github.com/telehash/telehash.org/blob/master/v2/faq.md Can one hashname be used in two places at once? - As two completely distinct/decoupled entities, no, it would cause conflicting line handshakes depending on whichever hashname responded first. If implemented so that there is some shared private state/storage mechanism between the instances where line information is held and coordinated, then yes a hashname can be available at many different network locations. For example, one hashname can be used from many datacenters simultaneously as long as they all use the same distributed database for line state.

lewisl9029 avatar May 29 '15 08:05 lewisl9029

Should wait until #152 is done to avoid wasted work.

lewisl9029 avatar May 30 '15 07:05 lewisl9029

Try a simpler, less robust approach using remotestorage flags:

  1. Generate random clientId for each client stored locally
  2. Set explicit client status in remotestorage on login/logoff, Counter per client that increments while online for implicit status (to detect unclean disconnects)
  3. Don't actually connect to the telehash network if another client is online and and incrementing counter
  4. Online client sends and receives, syncs state to offline clients using remotestorage

lewisl9029 avatar Jun 09 '15 08:06 lewisl9029

See if doing a delete on all session properties would disconnect the telehash session

lewisl9029 avatar Jun 18 '15 07:06 lewisl9029

Seems too error prone to implement since shared session state isn't actually supported by telehash v2. In fact, there doesn't even seem to be a documented way to disconnect a client, which is necessary for the alternative approach above.

Opened #191 as an alternative.

lewisl9029 avatar Jul 13 '15 09:07 lewisl9029

Reopening to keep in mind that we still want to have this eventually.

Having a separate telehash id per device is going to involve a pretty thorough overhaul of the entire messaging stack though, so it's probably a good idea to work through some of the lower hanging fruits first.

lewisl9029 avatar Aug 02 '15 08:08 lewisl9029