Skip to content

Commit d4ed25d

Browse files
authored
Add persistent UDP stream (#1271)
Follow up on #1266 which never got any reviews, so this PR is a bit bulky. In addition to the things in #1266, this adds a quinn-based UDP server and client implementation that is meant for agents (clients) to use to connect to relays (servers) so that the relay can track the connection status of each agent. This essentially replaces the usage of corrosion's client implementation for mutations, as that would have needed a parallel channel so that the relays could determine the up status of each agent, so this just combines the connection with the mutations themselves. The DB schema has changes, as the `servers` table has 2 new columns, `contributors` and `cont_time`. `contributors` is a JSONB object where each key is the IP address of an agent that has contributed to it. When the connection to an agent is lost, it is removed as a contributor from all the servers. We can then run a garbage collection task that can remove servers with no contributors, if they have not been updated in whatever amount of time we want to. This adds some basic tests for the various DB operations and the quinn stream.
1 parent b961287 commit d4ed25d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3592
-534
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
7575
- name: Build
7676
run: cargo build -p qt -p quilkin -p quilkin-xds --tests
77-
- run: cargo nextest run --no-tests=pass -p qt -p quilkin -p quilkin-xds
77+
- run: cargo nextest run --no-tests=pass -p qt -p quilkin -p quilkin-xds -p corrosion
7878
- name: Validate Quilkin's clap arguments
7979
run: |
8080
set +e # don't fail on error, we expect the command to fail since we aren't providing arguments

0 commit comments

Comments
 (0)