1 What is Goblins?
Goblins is a distributed object programming environment.
Features:
- Quasi-functional object system: users hold on to references
of objects/actors, but objects/actors are just procedures. Rather
than directly mutating, objects/actors can specify that they should
“become” a new version of themselves when they handle the next
invocation.
- Fully distributed, networked, secure p2p communication: via
OCapN, the Object Capability Network (which features CapTP, the
Capability Transport Protocol), you can communicate with other objects
over a network connection. Distributed object interactions are safe
because of ocap security guarantees.
- Transactional updates: changes happen within a transaction.
If an unhandled exception occurs, Goblins can “roll back” history
as if the message never happened, avoiding confused state changes
throughout the system.
- Time travel: you can snapshot old revisions of the system and
interact with them.
- Asynchronous programming with sophisticated promise chaining:
asynchronous message passing with promises is supported. Promises
work such that there’s no need to wait for promises to resolve before
interacting… you can communicate with the future that doesn’t
even yet exist! Sent a message to that remote car factory asking for
a new car? Why wait for the car to be delivered… you can send
it a drive message at the same time, and both messages can be
delivered across the network in a single hop.
- Communicating event loops: objects across multiple event
loops (aka “vats”) can communicate, whether in the same OS process
or across the network.
- Synchronous and asynchronous behavior, integrated but
distinguished: both synchronous and asynchronous programming is
supported, but only objects in the same “vat” (event loop) can
perform synchronous immediate calls. All objects can perform
asynchronous calls against each other.
- A library, not a language: Goblins is itself a library that
can be utilized across a wide variety of Guile programs.
- Object capability security: Goblins itself is built for
object capability (OCap) security, which is to say that you can only
operate on the references you have access to. Goblins embraces and
builds upon this foundation. (However, full OCap security will
require utilizing the sandboxing features of Guile; demonstrations of
this coming soon.)
Goblins’ design is inspired by the E
programming language and by the observation that
lambda is
already the ultimate security mechanism (ie, normal argument-passing
in programs, if taken seriously/purely, is already all the security
system needed).
Spritely Networked Communities Institute was created to advance decentralized
networking infrastructure, particularly as it pertains to social networks.
Goblins is the heart of the system, on which other layers are built.
At the time of writing, two key versions of Goblins are supported, the
Racket version
of Goblins, and the Guile
version. This manual is for the Guile edition of Spritely Goblins.