LAPS implements MOQT client side connections to support both publishers and subscribers.
LAPS is a relay implementation that implements MOQT for clients with distributed scale spanning a global footprint.
Relay protocol peering between relays uses a different protocol than MOQT that ensures low latency data forwarding with often less than 1ms added per relay hop. The protocol architecture and design document provides indepth details.
Current MOQT version supported is draft-14.
Join the #laps channel on quicdev Slack to connect with developers and contributors of LAPS.
Note
Access to the quicdev Slack workspace requires an invitation. To request an invite, please follow the instructions under "Implementing QUIC" on quicwg.org.
A developer playground for interoperability testing with Media over QUIC Transport (MOQT) applications.
Specifications:
- Maintenance Window: Daily restart at 00:01 UTC
- Instance: AWS
t4g.micro(2 vCPUs, 1GB RAM) - Transport: Native QUIC on port
33437
Intended for:
- MOQT application development and interop testing
- Protocol compliance verification
Not suitable for:
- Performance/stress testing
- Production workloads
- Relay-to-relay protocol development
Important
For relay implementation discussions, contact the team via Slack. See relay-protocol documentation.
---
title: Pubic Relay Topology
---
flowchart TD
EAST["us-east-2.relay.quicr.org"] <--> WEST["us-west-2.relay.quicr.org"]
EAST <--> EUC["eu-central-1.relay.quicr.org"]
classDef nodeClass fill:#949494,color:#3d3d3d,stroke:#8f8f8f,stroke-width:2px
class WEST,EAST,EUC nodeClass
Architecture: Flat mesh topology with full peering between nodes. Additional regions available upon request.
Endpoints:
| Region | URL |
|---|---|
| Anycast (recommended) | moq://relay.quicr.org:33437 |
| US West (Oregon) | moq://us-west-2.relay.quicr.org:33437 |
| US East (Ohio) | moq://us-east-2.relay.quicr.org:33437 |
| EU Central (Frankfurt) | moq://eu-central-1.relay.quicr.org:33437 |
Tip
Use anycast endpoint for automatic region selection. Use region-specific endpoints for testing cross-region behavior.
Version is defined in CMakeLists.txt under the project command for laps.
In code, the version_config.h file is generated. Each binary, library and docker container tag will have
this version.
The last octet of the version should be incremented on any change, unless it's the first version (zero) of a
major.minor change.
MacOS command line tools are required. If you get errors on a Mac, run the below.
xcode-select --install
make build
Run relay:
make cert
cd build/src
./lapsRelay
To build an image, make sure to have docker running.
amd64 image
make image-amd64
arm64 image
make image-arm64
Laps can be built using clang/llvm only. Review debian.clang.Dockerfile for details on how to build using debian bookworm with clang/llvm only.
Before running the docker build, you MUST first run the below to update the dependencies. This cannot be performed during the docker build process due to the use of private repos.
git submodule update --init --recursive
On Intel:
docker run --rm -it laps-amd64:latest /bin/bash
On Mac silicon:
docker run --rm -it laps-arm64:latest /bin/bash
make image-amd64
NOTE: you can use duo-sso cli to get an API KEY/SECRET using your CEC login to AWS. Length of duration needs to be 3600 seconds or less.
The below will login to ECR, TAG the image build in the previous step and finally push it.
export AWS_ACCESS_KEY_ID=<your key id>
export AWS_SECRET_ACCESS_KEY=<your secret key>
make publish-image
The current build supports Raspberry Pi Debian Lite Bookworm
Follow the PI imager instructions at https://www.raspberrypi.com/software/ to install base image.
Remove the Pi SD card and put it into a reader that you can use to copy the image from your laptop/desktop.
Warning
Before performing the below, backup your existing data on the raspberry Pi if needed.
Note
The below normally takes less than 15 minutes
- Power off your existing raspberry Pi and eject the SD card
- Connect the SD card to laptop/desktop
- Run "Raspberry Pi Imager"
- Click "CHOOSE DEVICE" and select your Raspberry Pi version of 3, 4 or 5"
- Click "CHOOSE OS"
- In popup, select "Raspberry Pi OS (other)"
- Scroll down to and select on "Raspberry Pi OS Lite (64-bit)"
- Clock on "CHOOSE STORAGE"
- Click in the bottom right settings icon
- Select and set the hostname to something unique to you
- Select "Enable SSH"
- Select "Use password authentication"
- Select and set username and password
- Scroll down and select and set locale settings
- Click "SAVE"
- Click "WRITE"
- Select "YES" if prompted to apply image customization settings
- Select "YES" to erase the current SD disk.
- The disk should be ejected and put back into the raspberry pi
- Power on the raspberry Pi. It will use DHCP with SSH enabled.
Note
The raspberry Pi will use DHCP to get an IP address via the wired connection.
MDNS can be used to access the device using the hostname you configured.
For example, my hostname is set to "tievens-pi" using
the mdns name ssh pi@tievens-pi.local
You will need docker installed to run the below.
make image-pi
After you have build/installed your Pi, you will need to SSH to it and run the below to setup the build environment.
sudo apt-get update
sudo apt-get install -y make cmake openssl golang wget git ca-certificates
Important
Create a key so that you can then update your github account with this key. This is required since laps and some of the submoudules are private repos.
# Hit enter through the prompts
ssh-keygen
cat ~/.ssh/<output_of_ssh-keygen>.pub
Goto github, under settings, then under SSH and GPG keys, add a new SSH key with the contents of the above
output of the <output_of_ssh-keygen>.pub.
Clone laps
git clone git@github.com:Quicr/laps.git
Warning
Run the below initially and before doing builds to make sure you have all submodules and latest code
git pull
git submodule update --init --recursive
# optionally do the below
make cclean
# Build
export CFLAGS="-Wno-error=stringop-overflow"
export CXXFLAGS="-Wno-error=stringop-overflow"
BUILD_JOBS=3 make build
The docker built binary will be created as ./build-pi/lapsRelay
The natively built binary will be created as ./build/lapsRelay
Copy the image:
scp ./build-pi/lapsRelay <user>@<ip or hostname.local>:
Important
Before or after copying the install-relay.sh script, you SHOULD
edit the file and update the Environment=<var=value> lines based on your config/deployment.
The defaults should work, but you might need to update them.
Copy the install-relay.sh script:
scp ./scripts/install-relay.sh <user>@<ip or hostname.local>:
The install-relay script will install or upgrade existing laps relay.
Note
You will be prompted for your password to run sudo comments.
bash ~/install-relay.sh
Example:
tim@raspberrypi:~ $ bash install-relay.sh
Shutting down lapsRelay
Updating systemd unit file /etc/systemd/system/laps.service
Copying ~/lapsRelay to /usr/local/laps/lapsRelay
● laps.service - Latency Aware Publish Subscriber (LAPS) relay
Loaded: loaded (/etc/systemd/system/laps.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2024-01-26 16:20:12 PST; 101ms ago
Docs: https://github.com/quicr/laps
Main PID: 147676 (lapsRelay)
Tasks: 12 (limit: 779)
CPU: 50ms
CGroup: /system.slice/laps.service
└─147676 /usr/local/laps/lapsRelay
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.669225 [DEBUG] [PMGR] [QUIC] packet_loop_port_update
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.670094 [INFO] [PMGR] [QUIC] Starting transport callback notifier thread
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.676149 [INFO] [PEER] [QUIC] Setting idle timeout to 30000ms
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.676290 [INFO] [PEER] [QUIC] Setting wifi shadow RTT to 1us
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.677026 [INFO] [PEER] [QUIC] Connecting to server relay.us-west-2.quicr.ctgpoc.com:33439
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.677423 [INFO] [PEER] [QUIC] Starting transport callback notifier thread
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.745799 [INFO] [PEER] [QUIC] Created new connection context for conn_id: 367620619648
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.746410 [INFO] [PEER] [QUIC] conn_id: 367620619648 data_ctx_id: 1 create new stream with stream_id: 6
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.746557 [INFO] [PEER] Control stream ID 1
Jan 26 16:20:12 raspberrypi lapsRelay[147676]: 2024-01-26T16:20:12.746769 [INFO] [CMGR] Starting client manager id 33435
RUN 'systemctl status laps.service' to get status of service
RUN 'journalctl -u laps.service -f' to tail laps relay log
See docs/discovery.md for details on how to setup and use mDNS