Skip to content
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

API: Split peer.py #68

Closed
JurgenR opened this issue Oct 2, 2023 · 3 comments · Fixed by #70
Closed

API: Split peer.py #68

JurgenR opened this issue Oct 2, 2023 · 3 comments · Fixed by #70
Assignees
Labels
enhancement New feature or request

Comments

@JurgenR
Copy link
Owner

JurgenR commented Oct 2, 2023

Split peer.py functionality into modules:

  • search.manager or just move it into search.py : everything related in peer.py related to searching
  • distributed.py : everything related to distributed network

There's also other search related things that could move from other things to this new search manager:

  • state.py : received_searches and search_requests fields
  • server.py : the wishlist task could be moved to the new search module
  • server.py : should query, query_room be moved to here as well?

Note: I have yet to understand if there might be an impact: peer.py currently also passes search requests on the children so the distributed.py needs to keep listening for search requests

@JurgenR JurgenR added the enhancement New feature or request label Oct 2, 2023
@JurgenR JurgenR self-assigned this Oct 2, 2023
@JurgenR
Copy link
Owner Author

JurgenR commented Oct 2, 2023

What to do with generic peer requests (PeerUserInfoRequest etc?)

@JurgenR
Copy link
Owner Author

JurgenR commented Oct 2, 2023

Debating whether the managers should be functionality focused instead of focused on the type of messages they receive

@JurgenR
Copy link
Owner Author

JurgenR commented Oct 5, 2023

Splitted into a SearchManager and DistributedNetwork class. There's 3 messages that remain in PeerManager:

  • PeerSharesRequest
  • PeerDirectoryContentsRequest
  • PeerUserInfoRequest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant