Closed tegefaulkes closed 2 years ago
Looks ike the proxy domain is using a object map for tracking locking. We can switch this over to a LockBox
.
The Connection
constructor takes some parameters for configuration of the connection.
keepAliveTimeoutTime = 20000,
endTime = 1000,
punchIntervalTime = 1000,
keepAliveIntervalTime = 1000,
These should be configurable from the config file.
Don't directly import them from the config. I believe these are meant to be injected by PolykeyAgent
. In fact they should be done directly by injecting config into PolykeyAgent
construction or during start. Which is only done by the CLI commands that reference the config.ts
.
It was either that or that PolykeyAgent.ts
directly references config.ts
.
Although, I do use some constants from config.ts
inside the keys domain that aren't supposed to change...
Ok actually I remember now. The config.ts
is supposed to be constants that don't actually change. Or only change with the source code.
Parameters that are supposed to change due to runtime conditions are not supposed to be in config.ts
, and instead are passed in directly from CLI/env variables and then to do the constructor and start parameters.
So implementation is done by we have 1 more test to do here:
So at the very least 1 day for the reviewing everything, and 1 day to fix the above bug.
@tegefaulkes make sure to update the spec with what has changed in the interface. That they all take Timer
object, and any other changes to the behaviour.
Specification
The
Proxy
domain needs to be updated to usetimedCancellable
and better support cancellability. This means that any methods that create connections needs to support cancellation. Robust testing needs to be added to test if cancelled connections are gracefully handled from both the forward and reverse side of the connection.Additional context
Tasks
Proxy
methods needs to support cancellation via the abort signalProxy
methods need to be updated to use thetimedCancellabe
decorator.Proxy
tests need to be expanded to test a wide range of cancellation and connection failure conditions.