cloudflare / orange

https://demo.orange.cloudflare.dev/
Other
1.56k stars 215 forks source link

partyserver and friends #57

Closed threepointone closed 4 months ago

threepointone commented 4 months ago

This PR looks like a lot, but is actually quite straightforward, and removes more code than it adds. Happy to do a 1:1 walkthrough before it lands.

threepointone commented 4 months ago

one of the problems with this PR is that it loses state of tracks on reconnection. I'll fix this before landing.

danecando commented 4 months ago

I've been messing around building some stuff based around this repo and one of the things I spent some time on was using partykit instead of a plain durable object. I landed on and started to work on just pulling some code from partykit so I'm really excited to see that it looks like you're publishing a library that just provides the partykit server abstraction without the entire party. Is this something you plan on open sourcing soon? (I see you published an npm package for now)

Also - love partykit and the work you've done. Excited to see you contributing to this project!

Edit: The reason I decided not to just use partykit was that I'm building a workers project and I needed the servers to share development data (KV, etc). It didn't seem like it would be trivial to make that work correct me if I'm wrong about that

threepointone commented 4 months ago

Hi @danecando!

Yup, PartyServer will be open sourced soon, first testing it in production apps (like this one!). I'll also write up migration docs (hopefully painless/automated) and plans for the future. Like you, I'm building it so folks can use it in workers projects along with all their other bindings/resources.