CobbledSync
CobbledSync is a from-scratch Redis/Mongo storage implementation for Cobblemon designed for syncing data on cross-server networks
CobbledSync is a high-performance, cross-server Cobblemon sync solution that replaces Cobblemon's default storage layer with a Redis+MongoDB backend - designed for speed, reliability, and atomicity. CobbledSync stores, provides, and syncs Cobblemon data (Parties/PCs/Pokedex/Player Data) across multiple servers. CS is different to existing (public) "syncing mods" because it entirely replaces Cobblemon's storage implementation, instead of working around it. CS uses a Redis first approach for speed and reliability (atomic transactions), with data persisted to MongoDB for permanent storage
CobbledSync fixes a number of key issues with existing products:
Performance: CS matches the performance of standard Cobblemon setups using local NBT/JSON storage. It leverages aggressive caching without creating stale data and runs as much logic off of the main Minecraft thread as possible.
Reliability: CS replaces Cobblemon's storage implementation with one designed for cross-server, synced setups. It makes use of multi-document atomic saves and smart updates, prevents stale cache writes and inconsistent Party/PC saves - eliminating data desyncs.
Tested at scale: CS releases are tested extensively on a real-world cross-server network (Roanoke). It's nigh on impossible to truly test this type of mod in a dev environment, being tested on a real network before being released to clients reduces issues/oversights dramatically.
Installation / Setup
CobbledSync is a part of our cross-server library of mods. It requires Crib to run, and is only available to Patrons. You can read more about our pricing/mod library here. Like our other cross-server mods, CS requires a Redis and MongoDB server to function.
CobbledSync is a drop-in replacement for Pebbles Sync (or any other mod that shares persistent data storage with Cobblemon's MongoDB implementation). It requires no configuration by default, as it pulls database settings from Crib.
Read about migrating to CobbledSync from either Pebble's cobblemon-sync or local storage.
Why is it better than the alternatives?
CobbledSync is the only publicly available syncing mod that fully replaces Cobblemon's storage implementation. Existing products, like Pebble's cobblemon-sync, build on top of Cobblemon's base MongoDB layer and try to fight stale data issues through hacks and cache purging - this doesn't fix the root issue (design) and causes significant lag.
In Cobblemon, PCs and Parties are stored separately - even though they're tightly linked to each other. By default, Cobblemon saves all "dirty" PC/Parties every 30 seconds (a dirty PC/Party being one that has changed since it was last saved). Theoretically that means if a save fails, the player is only rolled back 30 seconds - not a big deal.
But in practice, desyncs happen when only one of the two stores saves successfully. For example:
A player moves their entire party into the PC.
The Party saves, but the PC doesn’t.
Result: an empty Party, and no Pokémon in the PC.
Or the reverse happens:
The PC saves, but the Party doesn’t.
Result: the Party is duplicated.
CobbledSync fixes this by treating the PC and Party as a single unit when changed together, atomically saving both in one Redis transaction, and clearing caches across the network if needed. This guarantees consistency between PCs and Parties.
The other major source of desyncs come from Pastures. When a Pasture is loaded, all Pokemon inside of it are loaded via their owner's PC. It's likely that while the PC is loaded a change is made (i.e. tethering state of Pokemon in pasture). This will then save the PC, potentially overwriting changes the player made on a different server.
Pebble's cobblemon-sync tries to fix this by regularly clearing the PC cache, but this causes major performance issues as the PC data has to be reloaded every time it's cleared. This problem is exacerbated by pastures with multiple Pokemon from different players. If the pasture is in a high traffic area / spawn chunks (like with communal breeding centres), the reloading of each PC is constant, tanking TPS. CobbledSync fixes this by blocking false writes, avoiding the stale data issue, letting us rely on caching to avoid the lag issues without causing desyncs.

Last updated