Skip to content

Comments

refactor: split rpc into actor/core/common layers#87

Open
afterburn wants to merge 5 commits intov7from
refactor/arch
Open

refactor: split rpc into actor/core/common layers#87
afterburn wants to merge 5 commits intov7from
refactor/arch

Conversation

@afterburn
Copy link
Contributor

This PR splits the monolithic rpc module 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 rpc

Extracted RoutingMaintenance and DhtStatistics from 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.

@afterburn afterburn force-pushed the refactor/arch branch 4 times, most recently from 7c12f32 to b1985d3 Compare February 6, 2026 14:58
@afterburn afterburn marked this pull request as ready for review February 6, 2026 15:40
@afterburn afterburn requested a review from 86667 February 11, 2026 10:17
@afterburn afterburn changed the base branch from main to v7 February 18, 2026 12:10
Copy link

@86667 86667 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor - much cleaner. A few small comments

@86667
Copy link

86667 commented Feb 19, 2026

Also some docs on running benchmarks in the README and in the /benchmarks folder itself describing what each one does, what it is testing exactly and how this data can be used to mitigate regressions

@afterburn afterburn requested a review from 86667 February 19, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants