1
0
Fork 1

Fetch servers in parallel #35

Open
opened 1 year ago by gravel · 0 comments
gravel commented 1 year ago
Collaborator

Fetching server information in parallel using php-curl would greatly speed up the polling time.

Proposed set-up:

Phase 1 (Fetching rooms) and Phase 2 (Fetching public keys) are done sequentially, as they depend on one another and have different handlers, so state management can be avoided in favour of code order.

In either phase, requests are bundled in fixed-size groups using a dedicated static function of CommunityServer. After partial or full processing of a bundle, the resulting data is stored. After a request bundle finishes or times out, the next bundle is processed.

Once all Phase 1 bundles are processed, Phase 2 bundles are created and begin to fire. After that, reachable servers are collected, as in poll_reachable.

Fetching server information in parallel using php-curl would greatly speed up the polling time. Proposed set-up: Phase 1 (Fetching rooms) and Phase 2 (Fetching public keys) are done sequentially, as they depend on one another and have different handlers, so state management can be avoided in favour of code order. In either phase, requests are bundled in fixed-size groups using a dedicated static function of `CommunityServer`. After partial or full processing of a bundle, the resulting data is stored. After a request bundle finishes or times out, the next bundle is processed. Once all Phase 1 bundles are processed, Phase 2 bundles are created and begin to fire. After that, reachable servers are collected, as in `poll_reachable`.
This repo is archived. You cannot comment on issues.
No Label
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SomeGuy/sessioncommunities.online#35
Loading…
There is no content yet.