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 for building distributed applications!
Goblins opens doors for new (and secure!) decentralized social experiences that go beyond federated web applications such as interactive virtual worlds!
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 Institute Community 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 that was shown a few slides back!
(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 host) '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 I added a log.
For more information, check out: