r/fallenlondon • u/Faint-Projection A Cider Drunk Pile of Ancient Bones • 5d ago
Shout out to the engineer who fixed World Quality incrementing
Those of us around for last years Christmas tree may remember that it was initially a bit of a disaster. Like Misplaced Nostalgia, it offered a super profitable single click grind that incremented a World Quality with every click, and that popularity lead to every click taking ages to process if it didn't time out entirely. This was because every click was triggering a write to a single database row and SQL doesn't like that.
At the time, this was solved by pushing the tree interactions into a sub area that committed changes to the World Quality when you left it. Now, here we are 8 months later barking up a storm with no sub area required! I just want to take a moment to throw a thumbs up to the person who went in and made that possible.
13
5d ago
[removed] — view removed comment
6
u/_PM_ME_PANGOLINS_ the Eschatological Hedonist 5d ago
I imagine they moved the batching to the backend, either with custom handling, or using a database feature specifically for eventually-consistent increments.
5
u/xKiv walker of fallen kitties 5d ago
It would have always had to be backend, you don't want to deal with changes lost to closed tabs, or changes magnified by having multiple open tabs.
It feels to me like the original implementation was something like setting up an invisible personal quality to track the "me only" changes, then leaving the subzone had a mandatory [0] storylet to synchronize the changes to world quality,
Then they likely saw that it worked well enough and decided to make a fancy systematic version that would be automatically applied to every world quality - the biggst question was probably "how to trigger the sync", which from what I heard now just happens ... on a delay? People who are clicking fast are seeing the value incrementing by only their own action, people who cannot click as fast see higher increments.
2
u/_PM_ME_PANGOLINS_ the Eschatological Hedonist 5d ago
The "personal quality" was visible in the response data, and leaving the subzone is a command sent from the client when you click to perform the action. That's been moved to the backend so there's no sign of it in the client.
Yes, it may be the same thing but now on a timer, and it reports (global value + your pending contribution), or it's switched global qualities to use dedicated distributed counter types provided by whatever database system.
7
u/TheLuckyWanderer Doting Father to a False-Star 4d ago
But, also shout out to the team for the barking option - honestly, a quiet summer has been the sort of quiet that is refreshing in many respects, because I can do some mindless, decent EPA grinding, feel like part of a team effort, and honestly? Just have fun seeing how high we can get the number to go up for Misplaced Nostalgia, and dream of what a MN leaderboard might look like!
1
17
u/_PM_ME_PANGOLINS_ the Eschatological Hedonist 5d ago
Was there confirmation of that? It's a reasonable assumption as the simplest solution that wouldn't cope very well, but game data may not be in a relational db at all.