-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent migration stage 2 #535
Conversation
#525 (comment) needs to be addressed here. |
ICE still needs to be re-implemented here. I've already marked out in the code where it needs to be. |
What happened to the previous ICE? |
There was some refactoring of the connection code. Mostly moving multi connection logic inside of the |
55d7116
to
bd7822f
Compare
#527 is done. Looking at either removing uws or fixing vaults cloning/pulling next. I think removing |
I suggest when working on ws to factor out to js-ws. |
Just wanted to mention this. There's no issue tracking this atm, because MatrixAI/js-rpc#2 is actually a much larger issue addressing all forms of binary usage including error management. Instead, the only thing that needs to be done here is ensuring that there is leading message on both ends even when dropping to raw streams. This should be done as part of fixing up the vault/git RPC calls. I don't think it's necessary to create an issue for this... since it's already part of fixing up vaults work. |
The path
|
I'm putting ESM on the backburner for now due to problems with workers. It's quite likely we will need to entirely replace the threadsjs with our own implementation. So for now there's quite a few libraries that are fully ESM native, you can't really upgrade to them atm (actually I'm not entirely sure what happens if a CJS project tries to import it, the goal was to be fully ESM). Instead I'm going to focus on CLI review. The priorities will be local traversal, solidifying the design of the signalling, CLI CI, testnet testing. We can come back to the ESM stuff soon, and hopefully get a better build. |
Added a reverse response message to RPC raw streams. This is provided as part of the return for the raw handler. with the return type as |
Can you abstract around the PK CLI shouldn't be depending on that directly. |
PK should be exporting any necessary functions for creating NodeIds: MatrixAI/Polykey-CLI#4 (comment) Currently the PK CLI does this: const invalidNodeId = IdInternal.fromString<NodeId>('INVALIDID');
function generateRandomNodeId(): NodeId {
const random = keysUtils.getRandomBytes(16).toString('hex');
return IdInternal.fromString<NodeId>(random);
} This sort of code seems like something that PK can provide. PK CLI then doesn't need The generation of NodeID is used in these tests:
I suggest that...
|
The The |
I'll make some changes to And see what I can do for the QUIC type... and you can rebase on top. But you should remove |
Functions that is in PK that produce
Whereas... the function used in PK CLI tests is basically just:
This It looks like this:
If the string is logged out, it is not necessarily printable characters. I could try changing the tests so that instead of doing that, it would use the However I think it is more efficient to provide a function that simply takes a random 32 byte string and produces a We can easily do something like:
To address #532, these 2 functions should exist in |
I'm going to do |
Ok regarding network configuration, I'm going to need to do on this branch. I'm proposing something like this: networkConfig: {
/**
* Agent host defaults to `::` dual stack.
* This is because the agent service is supposed to be public.
*/
agentHost: '::',
agentPort: 0,
/**
* Client host defaults to `localhost`.
* This will depend on the OS configuration.
* Usually it will be IPv4 `127.0.0.1` or IPv6 `::1`.
* This is because the client service is private most of the time.
*/
clientHost: 'localhost',
clientPort: 0,
/**
* If using dual stack `::`, then this forces only IPv6 bindings.
*/
ipv6Only: false,
/**
* Agent service transport keep alive interval time.
* This the maxmum time between keep alive messages.
* See the transport layer for further details.
*/
agentKeepAliveIntervalTime: 10_000, // 10 seconds
/**
* Agent service transport max idle timeout.
* This is the maximum time that a connection can be idle.
* See the transport layer for further details.
*/
agentMaxIdleTimeout: 60_000, // 1 minute
/**
* Client service transport parameters.
*/
clientMaxReadableStreamBytes: 1_000_000_000, // About 1 GB
clientMaxIdleTimeout: 120, // 2 minutes
clientPingIntervalTime: 1_000, // 1 second
clientPingTimeoutTimeTime: 10_000, // 10 seconds
/**
* Controls the stream parser buffer limit.
* This is the maximum number of bytes that the stream parser
* will buffer before rejecting the RPC call.
*/
clientParserBufferByteLimit: 1_000_000, // About 1MB
clientHandlerTimeoutTime: 60_000, // 1 minute
clientHandlerTimeoutGraceTime: 2_000, // 2 seconds
}, The client parameters aren't entirely properly namespaced, and I want to remove the Right now until |
9c26b16
to
854f4ba
Compare
Rebased on top. Remember to sync up @tegefaulkes tomorrow. |
There are 2 types in The The Now that |
I've pushed WIP commits for the above removal of configuration. It needs further work in The way I think about it, if the transport layer of QUIC is inside Not sure, need to examine the rest of this. |
* Related #527 [ci skip]
* Related #527 [ci skip]
* Related #527 [ci skip]
* Related #527 [ci skip]
* Related #527 [ci skip]
* Related #540 [ci skip]
* Related #540 [ci skip]
* Related #540 [ci skip]
* Related #540 [ci skip]
…` and related env variables that are all migrated to Polykey-CLI
[ci skip]
[ci skip]
8ac935e
to
c0fad60
Compare
Pending CI but ready to merge. |
Description
The following tests were disabled in #534 and need to be fixed and re-enabled here.
this
when using function expressions'Related issues
rpc
handlers abstract arrow function properties. js-rpc#5NodeConnectionManager
manages remote initiated connections #527Issues Fixed
NodeConnectionManager
manages remote initiated connections #527uws
withws
#540TLSconfig
forWebSocketServer
#511Tasks
1. Makerpc
handlers abstract arrow function properties. js-rpc#52. Pagination Deployment to Service Handlers and CLI Commands and Domain Collections #237NodeConnectionManager
manages remote initiated connections #527uws
withws
#540TLSconfig
forWebSocketServer
#5116. AllowNodeManager
to start lazily without network entry procedure #461commander
dependency as it is no longer used.9. F&F signalling. Don't wait for signalling to complete before ending RPC call. Also upgrade signalling to coalesce signalling attempts. Also have the relaying node fill in all connection information.10.MDNS
integration andNodeGraph
structure expansion #537 Local discovery with MDNS and node graph expansion to handle extra metadata.Final checklist