refactor: split rpc into actor/core/common layers#87
Conversation
7c12f32 to
b1985d3
Compare
b1985d3 to
5f30c6d
Compare
86667
left a comment
There was a problem hiding this comment.
Nice refactor - much cleaner. A few small comments
|
Also some docs on running benchmarks in the README and in the |
SeverinAlexB
left a comment
There was a problem hiding this comment.
I did not fully review the PR but I assume @86667 already did a good job in reviewing the main code changes.
About the benchmarks: @afterburn you are responsible to double check any AI generated code before anybody reviews so it holds up to its promises. The benchmarks are clearly not up to this standard and need to be fully rewritten.
I do like the initiative though and we do need better tests in mainline. Benchmarks like this are very important to provide feedback for humans and AIs. Especially for this reason, merging such sloppy benchmarks would be a disaster.
I suggest you create a separate PR for these benchmarks.
|
@SeverinAlexB removed benches from this PR, will address all the feedback you had for the benches in separate PR. |
This PR splits the monolithic
rpcmodule into three layers:actor/- I/O orchestration (socket, tick loop, message dispatch)core/- core logic (iterative queries, put queries, server, routing maintenance, DHT statistics)common/closest_nodes- moved shared data structure out of rpcExtracted
RoutingMaintenanceandDhtStatisticsfrom inline logic in the rpc tick loop into their own modules.There are no public API changes and no performance regressions (benchmarked it using benchmarks in this repo and against
pubky-homeserver). Added 4 benchmarks for ongoing regression tracking.