Repository navigation
Move the party server from hosted PartyKit to partyserver on Workers - #677
Merged
Merged
Conversation
Hosted PartyKit has been taken offline. The room server is now a SQLite-backed Durable Object (`Main`) routed by partyserver at the same /parties/main/<room> paths, so partysocket on the client is unchanged. - snapshot-store: R2 through the SNAPSHOTS binding instead of signed S3 requests; same bucket and key layout, so rooms already saved there hydrate from it on first visit - drop aws4fetch, the R2_* secrets, LOCAL_SNAPSHOT_URL and the local snapshot store script; wrangler dev simulates the binding locally - storage value limit is now 2 MB (gzip kept) - client host is a build-time PARTY_HOST, defaulting to ddr-card-draw-party.psoplayer.workers.dev - yarn start:backend runs wrangler dev on :1999; new yarn deploy:party; watch:room wraps wrangler tail - worker code typechecks against workers-types via tsconfig.worker.json Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Custom domain route in wrangler.jsonc, and the production default for PARTY_HOST in webpack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Hosted PartyKit has been taken offline, so event mode needs a new home. This ports the room server to
partyserverrunning on our own Cloudflare account as a SQLite-backed Durable Object.What changed
src/party/server.tsis nowclass Main extends Server<Env>. The sync protocol, hydration, coalesced writes and?debugare unchanged; the diff is mostly renames (this.room.*→this.name/this.ctx.storage/this.broadcast) plus partyserver's swappedonMessage(connection, message)arguments.src/party/worker.ts+wrangler.jsonc. URLs keep the/parties/main/<room>shape, so partysocket on the client is untouched.snapshot-store.tsuses theSNAPSHOTSbinding instead of signed S3 requests. Same bucket (ddr-tools-persistence) and key layout, so rooms already saved to R2 hydrate from it on first visit. Rooms that only ever lived in PartyKit room storage are gone.aws4fetch, theR2_*secrets,LOCAL_SNAPSHOT_URLandscripts/local-snapshot-store.mjs;wrangler devsimulates the binding locally.live.ddr.tools(custom domain route inwrangler.jsonc). The client host is a build-timePARTY_HOSTin webpack, defaulting to it in production.yarn start:backend→wrangler dev --port 1999; newyarn deploy:party;watch:roomwrapswrangler tail; worker code typechecks viatsconfig.worker.json(added tovalidate:types:ts)..env.templateand the verify skill updated.Testing
yarn validatepasses.wrangler dev: websocket round trip writes to DO storage and R2; an R2-only room at seq 42 hydrated withsource: remoteand continued at 43; a backend restart restored from DO storage.?debugshowedseq == persistedSeq, no warnings.watch:roomagainst a live deploy is untested.Deploy
yarn deploy:party(first deploy creates the DO namespace and thelive.ddr.toolsDNS record + certificate).*.partykit.dev.ddr-tools-apival at the new host if it reads room state.🤖 Generated with Claude Code