Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approved
No active review issues are reported for the optional Goose integration.
No open issues 🎉
What changed in this PR
Adds Goose as an optional implementation in the shared Campfire verification and benchmark harness without changing the default app list.
Changes:
- Accepts
goosein--appsand records its HTTP, cache, cable and job topology. - Omits
response_cache_mbfor Goose, matching C and C++. - Documents
GOOSE_IMAGEand explicit Goose selection.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| README.md | Documents Goose support, image override and optional selection. |
| bench/compare.rb | Allows Goose and records its implementation-specific topology. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds once-campfire-goose, a port of Campfire to Goose, as an optional
gooseapp. Select it with--apps rust,gooseandGOOSE_IMAGE(defaultonce-campfire-goose:app; source checkout../once-campfire-goose). It is not in the default app list.Prebuilt images for amd64 and arm64 are on GHCR, so you don't have to build the Goose compiler:
GOOSE_IMAGE=ghcr.io/kaitk/once-campfire-goose:sha-9f52b4d, with../once-campfire-goosechecked out at9f52b4d, the revision measured below.The change:
goosein the allowed apps;CAMPFIRE_HTTP_THREADSloops (default 4), theCAMPFIRE_HTTP_BACKEND(defaultepoll), whetherCAMPFIRE_CACHEleaves the response cache on, native cable, and in-process delivery and media threads for jobs. Likecandcpp, it records noresponse_cache_mb;ruby bin/checkpasses on this branch itself, without #11, and so does the preflight for--apps rails,rust,goosewith Rust'smainimage and a Rails image built from once-campfiremain.Why Goose
Goose is a young systems language. Its compiler and packages are public, and the app's Dockerfile builds them from source at pinned revisions, so anyone can rebuild the image. The port follows Campfire's Rails code at once-campfire
main(a05ee90, November 2), which includes everything in the0aa339dthis harness measures and the fixes its browser smoke checks. It uses Rails' SQLite schema and migrates the harness's90b3300seed asdb:preparedoes, and it uses Rails' storage layout, signed and encrypted cookies, signed IDs and Active Storage keys, and Rails' public pages. Uploads use libvips and ffmpeg, as Rails does, and the image terminates TLS with ACME certificates itself, as Thruster does.Each area is compared against a Rails image built from
a05ee90, response by response and as parsed HTML: sign-in and setup, rooms and Pings, messages and bots, search and paging, profiles and account settings, uploads, TLS, and what Rails' middleware answers (ETags and conditional GETs, default headers, Content-Security-Policy and Vary, exception pages, static files, Active Storage's proxies and direct uploads). Every compared response matches but three: a page rendered for a Turbo frame leaves out thecsrf-paramandcsrf-tokenmeta tags that turbo-rails' frame layout still writes, which nothing reads now that forgery protection checksSec-Fetch-SiteandOrigin. That and the other deliberate differences are listed in the port's parity notes. Jobs run on in-process threads; on SIGTERM the server finishes requests in flight and its queued jobs for up to 8 seconds, as the Rust and Jai ports drain theirs.Run on our host
An AMD Ryzen 7 5800X3D (8 cores, 16 threads) under WSL2 on Windows 11 Pro, not bare-metal Linux: Ubuntu 26.04.1, 15.6 GiB visible to WSL, Docker Engine 29.1.3 inside WSL. The apps ran on CPUs 8-11 and the load generator on CPUs 12-15; 3 rotated rounds, 16 clients, 8 seconds per route. Rails built from once-campfire
main(a05ee90); Rust's newest published image (main,6dae2fd); Jai from #11's published image (ghcr.io/lucasmeijer/once-campfire-jai:2ecd487), with #11 merged into this branch locally for this run only. The preflight passed for--apps rails,rust,jai,goose. Requests/sec, median of 3 rounds:No errors, invalid or non-200 responses for any app, and every round's write audit verified for all four (22.6 million Goose requests). With
--mixed-write-rate 10, the room page: Rails 737, Rust 17,426, Jai 154,989, Goose 161,445, again with no invalid responses and every audit verified.The load generator, on 4 CPUs, used 385% of 400% during Goose's and Jai's page routes, so Goose/Jai there is the client's ceiling and Goose/Rust and Goose/Rails are lower bounds. Posting is bound by the servers (44% of the generator's CPU for Goose, 55% for Jai).
With the load generator on 12 CPUs, where it used under half of them, Goose read 1.02–1.08× as fast as Jai.
Memory, from a separate 2-round run sampling each container's cgroup once a second, page cache warm. Anonymous memory (page-cache pages are charged to whichever container read them first, so file memory doesn't compare); Rails' container holds Puma, Redis and Resque:
* Goose sets up each of its four HTTP workers' compression state and buffers when it starts, rather than on first use, and starts all 26 of its threads; that is most of the difference from Jai at idle. It could be made lazy, but it doesn't grow under load, so we've left it for now.
Per process in the main run, peak resident memory (VmHWM) was 34.5 MiB for Goose, 98.1 for Jai and 113.8 for Rust, whose peaks come while posting.
As the Jai PR says, the page routes reward a cache of finished pages, and every implementation here, Rails' own included, now has one. The post row is the one that reflects production.
The harness's browser smoke test (
browser/smoke.mjsatec02deb, unmodified, in Playwright's Chromium) passes against the same image.Three notes from running it
latestimage tag points to an older build (24c8597, September 29), which fails this harness's preflight on search order;main(6dae2fd) passes. We measuredmain.90b3300, predates Read the newest search matches off the index instead of sorting them all once-campfire#304, so a Rails image built from it fails the preflight's search check (search: differs from seed SQL): it orders results bycreated_at, where the contract, Rails since that PR, Rust and Jai order them by id.chmodthroughdocker execcomes only once the app is up; Rails' migration then fails the preflight with "attempt to write a readonly database". Make each run's copy of the seed writable before the app starts #12 addresses it. We ran withfixtures/defaultmade writable by everyone andumask 000.🤖 Generated with Claude Code