You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Async) 1:1 connection (shared directly via qrcode or async via email/messenger etc)
This is a single-use channel - As soon as 2 people have connected, the channel is not needed anymore.
long-living channel (minimum TTL hours or days)
dynamic TTL extension not required, but okay
channel can be closed before minimum TTL is reached when it has been used
(Async) Social recovery (shared directly via qrcode or async via email/messenger etc)
This is a multi-use channel - During lifetime of the channel multiple people can join it and upload recovery info
long-living channel (minimum TTL hours or days)
dynamic TTL, depending on amount of data to transfer
TTL should be extended with every upload
(Live) Add/sync device (shared directly via QRCode)
Short-living channel. Minimum TTL can be low, as only one person is interacting with the channel
dynamic TTL, depending on amount of data to transfer
TTL should be extended with every upload
serverside handling of channel TTL:
Client can provide a minimum TTL value when creating (uploading first file) a channel
Service should set default TTL of 15 minutes if client does not provide minimum TTL
Channel service should keep a channel open at least until minimum TTL is reached, even if it is not used at all
Channel service should extend channel TTL whenever a new file is uploaded:
if remaining TTL is less than 10 minutes, new TTL of "now + 10 minutes" is set
If remaining TTL is > 10 minutes nothing changes
Client information
Since channel TTL gets changed dynamically, client does not know if a channel is expired on the server. To fix this, the service needs to be changed:
It should respond with a 404 error when client requests listing of an unknown/expired channel (Current behaviour: Service returns HTTP 200 with empty array of channel entries)
It should set a custom HTTP header in the response containing the current TTL of the channel (both when listing and retrieving entries)
This way the client can locally close/leave expired channels and stay informed about the current TTL of a channel.
The text was updated successfully, but these errors were encountered:
Thanks @TripleSpeeder for creating a thorough spec that covers all the current important use cases. It seems correct to me. I would like to also hear @abramsymons thoughts.
About TTL extension when a file is uploaded:
Channel service should not need to have different behaviour depending on type of channel. So even if not required in all usecases it should always be okay to extend the channel lifetime with each upload.
Channel service needs to handle these scenarios:
(Live) Group/Star connection (shared directly via qrcode or chat)
This is a multi-use channel - During lifetime of the channel multiple people can join it and connect
(Async) 1:1 connection (shared directly via qrcode or async via email/messenger etc)
This is a single-use channel - As soon as 2 people have connected, the channel is not needed anymore.
(Async) Social recovery (shared directly via qrcode or async via email/messenger etc)
This is a multi-use channel - During lifetime of the channel multiple people can join it and upload recovery info
(Live) Add/sync device (shared directly via QRCode)
serverside handling of channel TTL:
Client can provide a minimum TTL value when creating (uploading first file) a channel
Channel service should keep a channel open at least until minimum TTL is reached, even if it is not used at all
Channel service should extend channel TTL whenever a new file is uploaded:
Client information
Since channel TTL gets changed dynamically, client does not know if a channel is expired on the server. To fix this, the service needs to be changed:
This way the client can locally close/leave expired channels and stay informed about the current TTL of a channel.
The text was updated successfully, but these errors were encountered: