Decent Social Unconference
2022-02-11
I'm David Thompson, the Core Infrastructure Architect at the Spritely Networked Communities Institute.
We are a 501(c)(3) nonprofit that is focused on re-decentralizing networked communities.
Goblins is a library that makes building secure, distributed applications easy:
Goblins opens doors for new and secure decentralized social experiences that go beyond federated web applications such as interactive virtual worlds.
Actors represent behavior within an application.
You can talk to actors on other computers by using the Object Capabilities Network (OCapN) protocol:
Nope! OCapN provides the network protocol, but you won't get Goblins' killer features like transactionality on any other actor-based system.
My demo was modeled after a community garden:
Thus I had to keep things really simple!
(define (^botanist bcom)
(define-values (seal-plant unseal-plant approved-plant?)
(make-sealer-triplet))
(methods
((approve-plant plant)
(seal-plant plant))
((check-plant plant)
(if (approved-plant? plant)
(unseal-plant plant)
(error "plant is not allowed" plant)))))
;; Create the garden.
(define the-botanist (spawn ^botanist))
(define the-garden-gate (spawn ^garden-gate the-botanist))
(define our-garden
(spawn ^garden
"Spritely Garden"
(make-garden-bed 8 8)
the-garden-gate))
;; Sunflowers are allowed.
(define sunflower/approved
($ the-botanist 'approve-plant sunflower))
;; Alice likes to garden.
(define alice (spawn ^gardener "Alice" our-garden))
($ alice 'plant 2 2 sunflower/approved)
With the essential actors in place, I could edit the garden with code and output the garden state as text.
That's not very exciting, so I quickly moved on to adding a graphical renderer (shown in a previous slide)
(define garden (spawn ^garden ...))
(define community (spawn ^garden-community garden))
(define user-name "Bob")
(define user ($ community 'register-gardener user-name))
(define onion-netlayer (new-onion-netlayer))
(define mycapn (spawn-mycapn onion-netlayer))
(let ((community-sref ($ mycapn 'register community 'onion)))
(format #t "Connect to: ~a\n"
(ocapn-id->string community-sref))
(define community-sref
(string->ocapn-id community-address))
(define onion-netlayer (new-onion-netlayer))
(define mycapn (spawn-mycapn onion-netlayer))
(define community (<- mycapn 'enliven community-sref))
(define user-name "Alice")
(define user
(<- community 'register-gardener user-name))
It's good for the host to know what events have occurred in the garden, so there's a simple audit log:
For more information, check out: