66
77[ ![ ci main] ( https://github.com/openmoq/moqx/actions/workflows/ci-main.yml/badge.svg )] ( https://github.com/openmoq/moqx/actions/workflows/ci-main.yml )
88[ ![ Latest release] ( https://img.shields.io/github/v/release/openmoq/moqx?display_name=tag&sort=semver&logo=github )] ( https://github.com/openmoq/moqx/releases/latest )
9- [ ![ License] ( https://img.shields.io/github/license/openmoq/moqx )] ( LICENSE )
9+ [ ![ License] ( https://img.shields.io/github/license/openmoq/moqx )] ( / LICENSE)
1010[ ![ Last commit] ( https://img.shields.io/github/last-commit/openmoq/moqx )] ( https://github.com/openmoq/moqx/commits/main )
1111[ ![ Open issues] ( https://img.shields.io/github/issues/openmoq/moqx )] ( https://github.com/openmoq/moqx/issues )
1212[ ![ Open PRs] ( https://img.shields.io/github/issues-pr/openmoq/moqx )] ( https://github.com/openmoq/moqx/pulls )
@@ -22,66 +22,55 @@ The OpenMOQ Relay — a MoQT relay server based on
2222
2323## Architecture
2424
25- For the underlying moxygen library architecture (session model, data plane,
26- threading, transport abstraction), see
27- [ deps/moxygen/ARCHITECTURE.md] ( deps/moxygen/ARCHITECTURE.md ) .
25+ ` MoqxRelay ` is a hard fork of moxygen's
26+ [ ` MoQRelay ` ] ( https://github.com/openmoq/moxygen/blob/main/moxygen/relay/MoQRelay.h ) ,
27+ so the relay core can evolve independently while the lower-level moxygen pieces
28+ stay libraries:
2829
29- ` MoqxRelay ` is a hard fork of moxygen's ` MoQRelay ` . We copy the relay core into
30- moqx so we can evolve it independently (threading model, custom cache miss
31- handling, chained caches, etc.) while still using moxygen's lower-level
32- building blocks as libraries:
30+ - ** MoQForwarder** — fan-out engine
31+ - ** MoqxCache** — object cache
32+ - ** MoQSession / MoQServer / MoQRelaySession** — session/server infrastructure.
3333
34- - ** MoQForwarder** — fan-out engine, used as-is from moxygen for now. May need
35- to fork in the future to accommodate threading model differences.
36- - ** MoqxCache** — object cache, hard-forked from moxygen. Customizable for moqx-specific functionality.
37- and chained cache support may be upstreamed to openmoq/moxygen or maintained
38- in our fork.
39- - ** MoQSession / MoQServer / MoQRelaySession** — session and server
40- infrastructure, used as libraries.
34+ ` MoqxRelayServer ` extends ` MoQServer ` to wire ` MoqxRelay ` in as the
35+ publish/subscribe handler. For moxygen's own architecture, see its
36+ [ ARCHITECTURE.md] ( https://github.com/openmoq/moxygen/blob/main/ARCHITECTURE.md ) .
4137
42- ` MoqxRelayServer ` extends ` MoQServer ` to wire up ` MoqxRelay ` as the publish/subscribe
43- handler and create ` MoQRelaySession ` instances for incoming connections.
38+ ## Quick Start
4439
45- ## Documentation
40+ Standard CMake preset build (CMake 3.23+, C++20, Ninja).
4641
47- - [ docs/metrics.md] ( docs/metrics.md ) — Prometheus metrics reference
42+ ``` bash
43+ scripts/install-system-deps.sh # toolchain + system libs
44+ scripts/configure.sh --moxygen prebuilt-with-fallback # get a moxygen, configure
45+ scripts/build.sh # cmake --build build/default
46+ scripts/test.sh # ctest over build/default
47+ ```
4848
49- ## Design Documents
49+ ` build.sh ` and ` test.sh ` are thin wrappers that add a job count derived from
50+ cores and free RAM ([ /scripts/lib/jobs.sh] ( /scripts/lib/jobs.sh ) ).
5051
51- - [ design/ci-architecture.md] ( design/ci-architecture.md ) — CI pipelines, upstream sync, auto-deploy
52- - [ design/configuration.md] ( design/configuration.md ) — relay config file reference
53- - [ design/gummy-bear.md] ( design/gummy-bear.md ) — cache and forwarding design
54- - [ design/hot-reloading.md] ( design/hot-reloading.md ) — hot config reload
55- - [ design/miss-handler.md] ( design/miss-handler.md ) — cache miss handling
52+ Profiles (` default ` | ` san ` | ` tsan ` ) are each script's first argument and map to
53+ ` build/<profile> ` . ` --moxygen ` picks where moxygen comes from:
5654
57- ## Quick Start
55+ | Goal | Command |
56+ | ------| ---------|
57+ | Build it | ` scripts/configure.sh --moxygen prebuilt-with-fallback && scripts/build.sh ` |
58+ | Download only, never compile moxygen | ` scripts/configure.sh --moxygen prebuilt && scripts/build.sh ` |
59+ | Compile moxygen / any rev or platform | ` scripts/configure.sh --moxygen from-source && scripts/build.sh ` |
60+ | Local moxygen checkout | ` scripts/configure.sh --moxygen from-source --moxygen-dir /path && scripts/build.sh ` |
5861
59- > ** Prerequisite: CMake 3.22+ is required.** All current targets ship a
60- > new-enough version out of the box: Ubuntu 22.04+, Debian 12+, recent
61- > macOS Homebrew. Verify with ` cmake --version ` . ` build.sh ` aborts early
62- > if cmake is missing or too old (override with ` MOQX_SKIP_CMAKE_CHECK=1 `
63- > if you know what you're doing).
62+ The three modes, the raw-cmake equivalents, and how to pick:
63+ [ /BUILD.md] ( /BUILD.md#how-dependencies-work ) .
6464
65- ``` bash
66- git clone https://github.com/openmoq/moqx.git && cd moqx
67- git submodule update --init --recursive
68- sudo deps/moxygen/standalone/install-system-deps.sh # system libs (both modes)
65+ Pins live in [ /cmake/dependencies.cmake] ( /cmake/dependencies.cmake ) .
6966
70- ./scripts/build.sh setup # download prebuilt deps (~1 min)
71- ./scripts/build.sh # build
72- ./scripts/build.sh test # test
73- ```
67+ ` ccache ` is used automatically when it is on ` PATH ` .
7468
75- System libraries are needed in ** both** dependency modes — the moxygen
76- tarball ships folly/fizz/mvfst/proxygen statically, but its CMake config
77- still does ` find_dependency(fmt, Glog, ...) ` and folly itself transitively
78- needs OpenSSL/Boost. ` build.sh setup ` 's system-dep check only fires when
79- falling back to source, but the build step needs the libs regardless.
69+ ## Docs
8070
81- See [ BUILD.md] ( BUILD.md ) for full build and test instructions (dependency
82- modes, sanitizer profiles, Docker), and [ RUNNING.md] ( RUNNING.md ) for relay
83- operations.
71+ - Build [ /BUILD.md] ( /BUILD.md ) · Run [ /RUNNING.md] ( /RUNNING.md ) · Metrics [ /docs/metrics.md] ( /docs/metrics.md )
72+ - Design: [ /design/] ( /design )
8473
8574## License
8675
87- Apache 2.0 — see [ LICENSE] ( LICENSE ) .
76+ Apache 2.0 — see [ / LICENSE] ( / LICENSE) .
0 commit comments