rbx-data-crossserver
Skill0 starsChanged 3 months agoMITView on GitHub
Cross-server state that survives contact with real traffic — MessagingService within its 1 KB / per-minute limits, MemoryStore for shared short-lived state, OrderedDataStore for global leaderboards, UpdateAsync counters for everything permanent. Use when the user says "global announcement", "cross-server event", "server list", "matchmaking queue", "global leaderboard", or when a leaderboard shows stale or missing entries at scale. Do not use for per-player saves — load rbx-data-profilestore instead — or for moving players between servers — load rbx-platform-teleport.
In this repository253 other files it gives its agents.
- rbx-abtestSkill
- rbx-accessibilitySkill
- rbx-analytics-eventsSkill
- rbx-analytics-funnelsSkill
- rbx-analytics-readingSkill
- rbx-animationSkill
- rbx-anim-cutscenesSkill
- rbx-anim-npcSkill
- rbx-anim-proceduralSkill
- rbx-anim-rigsSkill
- rbx-anim-tweenSkill
- rbx-architectureSkill
- rbx-assets-audioSkill
- rbx-assets-id-policySkill
- rbx-assets-sanitizeSkill
- rbx-assetsSkill
- rbx-assets-toolboxSkill
- rbx-assets-webSkill
- rbx-audio-feedback-mapSkill
- rbx-audio-mixingSkill
- rbx-audio-musicSkill
- rbx-audio-sfxSkill
- rbx-audioSkill
- rbx-audio-spatialSkill
- rbx-badges-groupsSkill
- rbx-build-compositionSkill
- rbx-build-detailingSkill
- rbx-build-greyboxSkill
- rbx-buildingSkill
- rbx-build-interiorsSkill
- rbx-build-kitbashSkill
- rbx-build-landscapeSkill
- rbx-build-propsSkill
- rbx-build-scaleSkill
- rbx-build-structuresSkill
- rbx-camera-controllersSkill
- rbx-camera-cutsceneSkill
- rbx-camera-shakeSkill
- rbx-chat-moderationSkill
- rbx-ciSkill
- rbx-combat-abilitiesSkill
- rbx-combat-hitregSkill
- rbx-combat-meleeSkill
- rbx-combat-rangedSkill
- rbx-combatSkill
- rbx-combat-statusSkill
- rbx-complianceSkill
- rbx-comprehendSkill
- rbx-controlsSkill
- rbx-data-profilestoreSkill
- rbx-data-recoverySkill
- rbx-data-schemaSkill
- rbx-data-sessionlockSkill
- rbx-dataSkill
- rbx-design-difficultySkill
- rbx-design-loopSkill
- rbx-design-sheetSkill
- rbx-design-socialSkill
- rbx-economy-currenciesSkill
- rbx-economy-gachaSkill
- The first 60 shown.
The file
Files
rbx-data-crossserver
When to load
Anything one server must tell, share with, or rank against other servers: live events, shout systems, server browsers, matchmaking, global leaderboards, world/guild state.
Pick the channel by lifetime
| Data | Channel |
| Right now, ephemeral ("2× event started", shouts) | MessagingService |
| Minutes–days, shared, mutable (queues, event scores, server registry) | MemoryStore |
| Permanent ranking by one integer | OrderedDataStore |
| Permanent shared record (guilds, global counters, season config) | GlobalDataStore + UpdateAsync |
Mixing these up is the root of most cross-server bugs: MessagingService is not storage, MemoryStore is not permanent, DataStore is not real-time.
MessagingService
Fire-and-forget pub/sub: no delivery guarantee, no ordering, no persistence — a server that is down or over quota simply never hears the message. Design every consumer as "poke, then read the truth from a store".
- Limits: 1 KB per message (after JSON encoding); sends per server 150 + 60 × players per minute; subscriptions per server 5 + 2 × players; receives per topic 10 + 20 × players per second. Topic names ≤ 80 characters.
pcallbothPublishAsyncandSubscribeAsync; the subscribe callback runs on its own thread and an error there kills the subscription silently.- Multiplex: one topic per system, a
typefield inside the payload — not one topic per event kind, or the subscription budget dies first. message.Sentis the send timestamp: drop anything older than your tolerance (10 s is sane for event starts) instead of acting on late replays.
MemoryStore
Shared mutable state with automatic expiry: SortedMap (registries, live-event scores), Queue (matchmaking), HashMap (flat key-value). Item ≤ 32 KB, key ≤ 128 characters, TTL mandatory and capped at 3,888,000 s (45 days). The experience-wide request quota is 1000 + 100 × concurrent users per minute — generous, but a per-Heartbeat poll from every server still eats it; poll shared keys every 5–10 s, not per frame. Everything in it evaporates at TTL: treat it as a cache over DataStore truth, never the only copy of anything a player paid for.
OrderedDataStore leaderboards
Integer values only (decimals: store score × 100); keys are strings — tostring(UserId).
- Writers: each server writes only its own players' scores (
SetAsync, one writer per key, on a 60–120 s loop and on PlayerRemoving). No cross-server write contention by construction. - Reader: ONE
GetSortedAsync(false, 100)per server per refresh interval (120 s), result broadcast to clients via one RemoteEvent. The budget is 5 + 2 × players per minute — a per-player or per-request fetch pattern exhausts it immediately. - Page through
GetCurrentPage/IsFinished/AdvanceToNextPageAsync;GetNameFromUserIdAsyncinsidepcallper row (it fails for deleted accounts — skip the row, don't kill the board). - All-time + weekly boards: suffix the store name with the period (
Coins_AllTime,Coins_2026w34) so resets are a name change, not a mass delete.
Sharp edges
- CRITICAL — Granting anything of value via MessagingService alone ("gift arrived" message mutates currency): missed message = vanished grant, replayed handler = dupe. Fix: persist the grant in a DataStore/pending queue first; the message is only a "check the store now" poke, and the handler is idempotent.
- HIGH —
SetAsyncon shared global state (guild rosters, counters): two servers read-modify-write and one update evaporates. Fix:UpdateAsynctransform, always. - HIGH — Leaderboard fetch per player or per UI open:
GetSortedAsyncbudget of 5 + 2 × players/min collapses and the board goes blank at peak CCU — the classic "works at 3 players, dead at 300". Fix: one server-level fetch on a timer, replicate the table. - MEDIUM — MemoryStore as the only home of event progress: TTL hits mid-event and scores reset. Fix: checkpoint to DataStore every 60 s; MemoryStore holds the live view.
- MEDIUM — Trusting MessagingService for time-critical sync (round starts): latency is variable seconds. Fix: publish a shared timestamp, each server counts down locally.
Load with
rbx-data-profilestore (the permanent truth the channels poke at), rbx-liveops-events
(event systems built on these rails), rbx-platform-teleport (follow-friend and server-browser
joins), rbx-data-schema (shapes for guild/world records).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

