Content Deep Dive
Party.Server — New API for a programmable primitive
Blog post from PartyKit
Post Details
Company
Date Published
Author
Jani Eväkallio
Word Count
1,831
Language
English
Hacker News Points
-
Source URL
Summary
The new Party.Server API simplifies developing real-time, collaborative, multiplayer applications using PartyKit. Parties are globally distributed, stateful, programmable, and on-demand web servers powered by Cloudflare Durable Objects. The API includes classes for server instances, lifecycle methods such as onStart, onConnect, onClose, onError, and onMessage, request handlers like onRequest and static onBeforeRequest, onBeforeConnect, and onFetch methods. Additionally, the API supports hibernation for cost-effective scaling and better connection management with tagged connections. The naming has been updated to clarify the distinction between "parties" and "rooms".