Spritely Goblins v0.18.0: Sleepy actors!
Dave Thompson and Christine Lemmer-Webber —![]()
We’re excited to announce the release of Spritely Goblins 0.18.0! This release features a new caching layer called “sleepy actors”, OCapN protocol updates, and numerous bug fixes. So get cozy by the fire, pull out a steaming cup of tea, and let’s have a nice relaxing read about this exciting new Goblins release!
Sleepy actors
Remember when we introduced persistence back in Goblins 0.13.0? You’re not sure? Okay, as a quick refresher, Goblins’ persistence system is able to serialize a running Goblins program for you and wake it back up later! Pretty cool!
Goblins is pretty smart about only saving the changes that need to change. But... if we can save actors to disk, do we really need them to be “awake” all at once? What if we let them take a little nap, and just woke them up when it’s time for them to do something? Then they could go back to bed when they aren’t needed anymore!
Well that’s exactly what we’ve built! Sleepy actors are a new, optional caching layer has been added to the core of Goblins. Actors may now go to sleep or be woken up depending on a customizable caching algorithm known as a “sleep strategy”. When an actor goes to sleep, it is saved to the vat’s persistence store but its reference remains live. When an asleep actor receives a message, its state is restored from the vat’s persistence store and the message is processed as usual.
Goblins currently ships with two sleep strategies: an extremely simple strategy where your little goblins head to bed after each and every turn, and a “least recently used” algorithm, which functions as a hot cache where only the most recently activated goblins stay awake, and the rest go take a nap.
For a feature that’s so sleepy, we’re pretty wired about its potential, and we hope you are too!
OCapN protocol updates
The OCapN draft specification has changed in the
time since the last Goblins release. The op:deliver-only operation
has been dropped in favor of a single op:deliver operation. GC
operations now accept a list of export positions instead of a single
position so that GC can be done in batches; their operation names have
likewise been changed to the plural form (op:gc-export is now
op:gc-exports, etc.) The protocol version number has thus been
bumped, which means that applications built with an earlier release of
Goblins are incompatible with the OCapN shipped in this release.
Notable bug fixes
-
Fixed a race condition when restoring multiple vats from persisted data. If Alice in vat A is referenced by Bob in vat B but no other actors in vat A then it was possible for Alice to be garbage collected before vat B is restored.
-
Fixed a signing oracle vulnerability in the WebSocket netlayer’s designator authentication code.
Getting the release
This release includes all the features detailed above as well as many bug fixes. See the NEWS for more information about all of the changes.
As usual, Guix users can upgrade to 0.18.0 by running the following:
guix pull
guix install guile-goblins
Otherwise, you can find the tarball on our release page.
If you’re making something with Goblins or want to contribute to Goblins itself, be sure to join our community at community.spritely.institute! We also host regular office hours where you can come and ask questions or discuss our projects. Information about office hours is available on the forum. Thanks for following along and hope to see you there!