Doing this for fun. Watch me go!
- Active vs Inactive state is implicitly defined, using a timestamp-expiration mechanism (inspired by how Chubby handles leases)
- Inactive: expiration prior to
now()
- Active: expiration in the future
- Inactive: expiration prior to
- Abrupt cancels (i.e. in cases of denial, or a user-initiated cancel) are a two-phase process
- The subscription server kills the renewal routine
- SQLite Update request, setting expiration time to
now()
- In the worst case of arbitrary failure, the client believes its lease active, until either (1) the existing timestamp expires, or (2) a subsequent renewal is rejected
- Successful renewal routines update the expiration time upon ACK