Skip to content

KeepBlox 0.10.0

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Nov 09:17
b57edc5

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 in bench/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 as ended. Its results are in the appendix Measured separately of bench/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.lock takes the
    version's metadata as well as its value, so a library like Carry, whose value is a buffer and whose
    owner is the JobId in the metadata, is held to foreign-write. tests/unit/Ledger.luau proves 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 slower renewFallback raises it. types/index.d.ts carries
    it too.
  • bench/Run measures 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 for death (605 s), far past its own loadTimeout (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) is death old is
    taken at once, and a record that is still fresh is taken after noBeatSteal (60 s): an owner without
    a beat writes every renewFallback (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 of renewFallback (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
    Config promises. The fallback now runs whether or not a beat can (src/Upkeep.luau,
    tests/unit/Fallback.luau).
  • The fake DataStoreKeyInfo methods read from the instance they are called on. GetMetadata and
    GetUserIds answered 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, with GetServerTimeNow on 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 record open.
  • 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 of src/ in both Wally and pesde.
  • bench/Report 20 regenerated bench/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 death is 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
    UpdatedTime rule the old-record case waits 44 s; without noBeatSteal 5 of 5 rejoins are locked
    out; with noBeatSteal at 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; CI check, docs and CodeQL
    passed on the pull request.
  • Live checks: not run for this release. The behaviour that changed is exercised in the simulator
    only; tests/live was 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 conservative death (605 s) still applies: a live owner that writes every renew
    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/Run measures 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.rbxm below.