{"id":17350341,"url":"https://github.com/meskill/web-transport-ping-pong","last_synced_at":"2025-08-09T09:32:34.272Z","repository":{"id":174723227,"uuid":"652305753","full_name":"meskill/web-transport-ping-pong","owner":"meskill","description":"Test task repository for the Rust developer job","archived":false,"fork":false,"pushed_at":"2023-06-15T06:31:51.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T02:01:41.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meskill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-11T18:22:45.000Z","updated_at":"2023-12-22T05:17:54.000Z","dependencies_parsed_at":"2023-07-16T17:16:46.974Z","dependency_job_id":null,"html_url":"https://github.com/meskill/web-transport-ping-pong","commit_stats":null,"previous_names":["meskill/web-transport-ping-pong"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meskill%2Fweb-transport-ping-pong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meskill%2Fweb-transport-ping-pong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meskill%2Fweb-transport-ping-pong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meskill%2Fweb-transport-ping-pong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meskill","download_url":"https://codeload.github.com/meskill/web-transport-ping-pong/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245841760,"owners_count":20681196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T17:06:35.395Z","updated_at":"2025-03-27T12:19:15.004Z","avatar_url":"https://github.com/meskill.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebTransport Ping-Pong App\n\n## Description\n\nCreate a client-server ping-pong application with the following specs:\n\n![client-server](assets/client-server.png)\n\nEssential Requirements:\n- Preferably the Client should be written in RUST, but feel free to use any other language\nyou are comfortable with or believe is best for this operation.\n- The Server should be written in Python\n- Communication protocol should be in WebTransport\n- Provide some unit test coverage for both sides to demonstrate your skill in unit testing\n\nDesirable Requirements:\n- Make the communication channel secure or suggest what security measures you would\nimplement given more time.\n- Provide a plan for Kubernetes deployment\n- Provide a plan/design for an auto-recovery mechanism for both sides (in case of a\ntemporary connection failure). Feel free to implement that if you have enough time.\n- Provide integration tests\n- Can you think of a way for the client to auto-discover the server without the need to point\nit to the exact server endpoint?\n\n## Solution\n\nPrerequisites:\n- `rust 1.70`\n\n### Run example\n\n1. Go to `crates/server` and execute `cargo run` to start server\n2. Go to `crates/client` and execute `cargo run` to run client\n\n### Run Tests\n\nExecute `cargo test` from repository root.\n\n### Security concerns\n\nThe WebTransport protocol comes with the security in mind - [specification](https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/#name-security-considerations-20). So is the implementation in this repo with the help of `wtransport` crate:\n\n- it requires using tls or similar security protocols. To showcase this the current repo uses self-signed certificates that should be replaced with valid certificate from certificate authority\n- it prevents from establishing connection and sharing sensitive information through errors in case of the server is not supporting WebTransport protocol\n\nAdditional considerations to improve security:\n- WebTransport protocol requires the client to provide the origin value from which connection was initiated (yet not implemented by used crate). That value might be used on server to handle only requests only from certain origins\n- protocol may use client certificates (yet not implemented by used crate) to provide additional authentication capabilities\n- protocol may use URI to describe server endpoints (yet not implemented by sed crate) to add additional validation in browsers through CSP\n- depending on the use of communication and whether it should be available in public internet we can restrict server and client inside private network that won't be available from the internet.\n\n### Auto-discover mechanism\n\nCurrent, implementation requires the client to provide ip address of the server in order to connect.\n\nTo simplify management for the ip address we might use DNS-based solution to resolve url of the server to different ips. Depending on the requirements it could be global internet DNS or private DNS such as Kubernetes DNS.\n\n### Kubernetes deployment\n\n1. Use `client.Dockerfile`, `server.Dockerfile` to build images for client and server respectively\n2. Use `client.yaml`, `server.yaml` to push deploys to kubernetes cluster\n3. Additionally, apply changes to k8s configs to increase number of replicas or specify required resources for the deploys\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeskill%2Fweb-transport-ping-pong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeskill%2Fweb-transport-ping-pong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeskill%2Fweb-transport-ping-pong/lists"}