Repository navigation
A release about what happens when MemoryStore is not there: a dead server's keys are taken even without
its beat, and a session with no snapshot now writes as often as Config always said it did.
Documentation: https://xopoiii.github.io/KeepBlox/
Added
- Carry is measured, in
bench/adapters/CarryAdapter.luau, pinned inbench/download.luau: an
adapter that runs Carry the way its README says, from the engine's player list, with one opcode for
the game's data, saves acknowledged at the service boundary, and the kick Carry ends a session with
reported asended. Its results are in the appendix Measured separately ofbench/Benchmarks.md:
no violations, every rejoin after a crash fails while the dead server's 300 s lease runs out, and 61
reads and 61 writes per player-hour against KeepBlox's 13 and 13. - A lock kept in a version's metadata is checked by the ledger:
Adapter.Format.locktakes the
version's metadata as well as its value, so a library like Carry, whose value is a buffer and whose
owner is theJobIdin the metadata, is held toforeign-write.tests/unit/Ledger.luauproves it
over a buffer value. noBeat: MemoryStore gives no answer and the data store dies longer than a load may take. A
release keeps retrying and lands when the store answers again, so the play is not lost even though no
snapshot covers the session (tests/scenario/KeepBlox.luau).stranded: the data store is still down when a shutdown runs out of time. The last beat carries
the session, and the newcomer recovers it, so a shutdown during an outage loses at most one beat
(tests/scenario/KeepBlox.luau).noBeatSteal: the setting and the config table say how long a newcomer watches a lease with no
beat before it takes the key, and how a slowerrenewFallbackraises it.types/index.d.tscarries
it too.bench/Runmeasures the codec beside the write: JSON encode and decode, and the Zstandard above
compress.above, for a 10 KB, 100 KB and 1 MB profile.
Fixed
- Without MemoryStore, a crashed owner left its key held for good. A load watched a lease that did
not move fordeath(605 s), far past its ownloadTimeout(120 s), and every attempt started the
watch over, so no load could ever take the key. Now a record whose own write time
(DataStoreKeyInfo.UpdatedTime, the service's clock rather than another server's) isdeathold is
taken at once, and a record that is still fresh is taken afternoBeatSteal(60 s): an owner without
a beat writes everyrenewFallback(30 s), so that much silence is a dead owner. A live owner that
only cannot be reached hands over at its fallback write and is not taken
(tests/scenario/KeepBlox.luau:noBeatCrash,noBeatSoon,noBeatPartitioned). - Without MemoryStore, a session wrote at
renew(300 s) instead ofrenewFallback(30 s). The
fallback deadline was set only at the end of a beat, and the beat returns at once when MemoryStore is
unavailable, so a crash with MemoryStore down could lose five minutes of play against the 30 seconds
Configpromises. The fallback now runs whether or not a beat can (src/Upkeep.luau,
tests/unit/Fallback.luau). - The fake
DataStoreKeyInfomethods read from the instance they are called on.GetMetadataand
GetUserIdsanswered from the KeyInfo they were made for, so a library that localized one
(local GetMetadata = info.GetMetadata) and called it with a later KeyInfo got the first version's
metadata. Carry lost every session hand-over to it.
Changed
- The simulator gives
workspace, withGetServerTimeNowon the experience's clock rather than
the server's own skewed one, as the engine does. - The schema guide says what a field added without a version bump does to older servers: they
refuse the load with"schema", so a rollout raises the version or keeps the recordopen. - The guide to large profiles says what compression costs: a compressed save encodes the profile
one more time, because the check's text is a fingerprint, not JSON. - The guide to what users of other libraries run into names Carry, with the results the benchmark
measures.
Evidence
- 521 specs pass on LuneBlox 0.12.2 (
sh scripts/run-tests.sh), and the package check finds all 63
files ofsrc/in both Wally and pesde. bench/Report 20regeneratedbench/Benchmarks.md: 0 ledger violations for KeepBlox in every
scenario, and Carry measured under Measured separately.- Without MemoryStore, 20 seeds: a dead owner whose record is older than
deathis taken in 0.4 s
(11 steps lost); one whose record is still fresh in 64.7 s (11 steps lost); a live owner cut off from
MessagingService hands over in 28.3 s and loses nothing; a shutdown during an outage recovers in 0.7 s
with 4 steps lost. The ordinary crash path is unchanged: 9.1 s and 4 steps. - Each new guarantee is seen failing once against a deliberately broken build: without the
UpdatedTimerule the old-record case waits 44 s; withoutnoBeatSteal5 of 5 rejoins are locked
out; withnoBeatStealat 5 s a live owner is taken and 17 steps of its play are lost. - Gates:
type-check, selene, stylua,--!strict, the 300-line limit, English-only, version and
package checks are green; the docs build with all internal links valid; CIcheck,docsand CodeQL
passed on the pull request. - Live checks: not run for this release. The behaviour that changed is exercised in the simulator
only;tests/livewas not run in the test experience this time.
Known, not fixed
- If the owner vouches for a MemoryStore beat that this server cannot read (a partial MemoryStore
failure), the conservativedeath(605 s) still applies: a live owner that writes everyrenew
cannot be told from a dead one any sooner without risking its session. The owner hands over at its
next write, so the key is not held for good, and the next load succeeds. - The benchmarks still do not compare CPU time between libraries;
bench/Runmeasures KeepBlox's own
write and codec costs. Carry's claim about buffers is answered by those numbers, not by a comparison
on Roblox itself.
Install
- Wally:
KeepBlox = "xopoiii/keepblox@0.10.0"under[server-dependencies]. - pesde:
pesde add xopoiii/keepblox@0.10.0. - Without a package manager:
KeepBlox.rbxmbelow.