goblins and spritely - dustycloud · 2018. 12. 6. · goblins and spritely from the actor model to...
TRANSCRIPT
![Page 1: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/1.jpg)
Goblins and Spritely
From the actor model to Distributed Virtual Worlds
By Christopher Lemmer Webber
![Page 2: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/2.jpg)
The web we want
![Page 3: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/3.jpg)
The web we got
![Page 4: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/4.jpg)
The web we got
![Page 5: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/5.jpg)
The web we got
![Page 6: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/6.jpg)
The web we got
![Page 7: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/7.jpg)
The web we got
![Page 8: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/8.jpg)
The web we got
![Page 9: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/9.jpg)
The web we got
![Page 10: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/10.jpg)
Federation + Self Hosting to the Rescue
![Page 11: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/11.jpg)
Federation + Self Hosting to the Rescue
![Page 12: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/12.jpg)
Federation + Self Hosting to the Rescue
![Page 13: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/13.jpg)
But wait, how to federate?
A smattering of incompatible protocols:
• OStatus
• Zot
• XMPP
• Pump
• Tent
What to do?
![Page 14: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/14.jpg)
A federation protocol for the web!
![Page 15: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/15.jpg)
Officially standardized, too!
![Page 16: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/16.jpg)
Provides a simple JSON based:
• Server-to-Server protocol (federation!)
• Client-to-Server protocol (mobile, desktop,web clients)
![Page 17: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/17.jpg)
The last year has been huge...
Over 1.5 million registered users
Dozens of implementations:
AardwolfArtodon
Bridgy FedCommonsPubdistbin.comDokieliFunkwhaleFriendicaHubzilla
KitsuneKoypeKroeg
MastodonMisskeyNextcloudPixelfedPeerTubeplaces.pubPleroma
PubstrateRustodonSmilodontags.pubPleromaPlumePrismo
PterotypeWordpress (plugin)
... and ActivityPub has only been standardizedfor 1 year!
![Page 18: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/18.jpg)
Peertube and Mastodon interop demo!
![Page 19: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/19.jpg)
Peertube and Mastodon interop demo!
![Page 20: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/20.jpg)
Peertube and Mastodon interop demo!
![Page 21: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/21.jpg)
Peertube and Mastodon interop demo!
![Page 22: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/22.jpg)
Peertube and Mastodon interop demo!
![Page 23: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/23.jpg)
Peertube and Mastodon interop demo!
![Page 24: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/24.jpg)
Peertube and Mastodon interop demo!
![Page 25: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/25.jpg)
Peertube and Mastodon interop demo!
![Page 26: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/26.jpg)
Peertube and Mastodon interop demo!
![Page 27: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/27.jpg)
Problem solved??!!!
![Page 28: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/28.jpg)
What current implementations can’t do
• Content that survives a server going down
• Highly secure, rich interactions
Private photo gallery...
... where you give access to add but notdelete items
Virtual worlds / games
But these are possible!
ActivityPub did something right...
![Page 29: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/29.jpg)
ActivityPub is an actor model protocol
AKA message-passing-centric protocol
It (mostly) doesn’t matter where an actorlives!
![Page 30: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/30.jpg)
ActivityPub is an actor model protocol
Formal definition...
In response to messages, an actor can:
• Send messages
• Create new actors
• Change its own behavior/state
![Page 31: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/31.jpg)
ActivityPub is an actor model protocol
Many protocols are actor model protocols...
but not all are aware of this.
Being self-aware helps!
![Page 32: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/32.jpg)
Spritely
• A federation skunkworks in the publicinterest!
• Taking the actor model seriously!
• Adding object capability security!
• Stress testing the thing by buildingdistributed games (??!?!)
• Avoiding vaporware: releasing regularartifacts/demos
![Page 33: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/33.jpg)
The lost cyberpunk world of social games
MUDs, MOOs, MUSHes: social spaces with a sense of place
![Page 34: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/34.jpg)
The lost cyberpunk world of social games
Habitat: massively multiplayer graphical game... in 1985!
https://web.stanford.edu/class/history34q/readings/Virtual_Worlds/LucasfilmHabitat.html
![Page 35: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/35.jpg)
The lost cyberpunk world of social games
![Page 36: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/36.jpg)
This existed!
Electric Communities Habitat
Secure, decentralized virutal worlds!
Sadly little survived, except...
![Page 37: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/37.jpg)
E!
The greatest programming language you’ve neverheard of! Featuring:
• Actors for run-anywhere evaluation
• Local immediate evaluation
• Most importantly: object capabilities(ocaps)!
![Page 38: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/38.jpg)
Contrasting approaches: ACLs Don’t
A dangerous program on your computer...
• It can run any program it wants as you
• It can read all your data
• It can post your secrets to any server
What program is it?
Solitaire! (Or actually any program)
![Page 39: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/39.jpg)
Contrasting approaches: ACLs Don’t
Identity-centric authority doesn’t work
• Ambient/excess authority
• Confused deputy problems (ask me aboutGuile’s REPL story if we have time)
See the paper "ACLs Don't" for more information
![Page 40: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/40.jpg)
Object Capbilities (ocaps)
How to allow security AND rich interactions
• AKA "Lambda, the Ultimate SecurityMechanism"
• Lexical scope *is* your security model
![Page 41: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/41.jpg)
Object Capbilities (ocaps)
How to allow security AND rich interactions
• You can only access what you hold areference to
• Works in protocols or languages!
![Page 42: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/42.jpg)
Another metaphor
Ye olde ocap car key metaphor goes here
![Page 43: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/43.jpg)
(Partially) written Spritely artifacts/demos
• Goblins: actor model library for Racket
• Magenc: private and encrypted p2p shareablecontent
• Petnames paper for RWoT written, demo tocome
• Pre-ocap MUD demo
![Page 44: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/44.jpg)
Goblins: an actor model library for Racket
• Spawn actors, send messages to actors
• Currently local-only, very soonmulti-machine
• Why a library? Why not a #lang?
![Page 45: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/45.jpg)
Enough smalltalk! Let’s see a demo!
I see what you did there
• Spawning a lambda actor
• Spawning a class’y actor
• Sending a message: basic
• Splitchronous send with <<-
• Promises!
![Page 46: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/46.jpg)
<<-, friend or foe?
• Very convenient!
• Uses delimited continuations under the hood
• But... re-entrancy attacks?
• I’m conflicted, help me out language folks
![Page 47: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/47.jpg)
But is it ocap-secure?
Racket's lexical scope: safe
Racket's module importing: not safe
Future artifact: Dungeon
![Page 48: Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber](https://reader035.vdocuments.us/reader035/viewer/2022071504/6124133d54a22635e609f40b/html5/thumbnails/48.jpg)
Thanks! Questions?
• Personal site: https://dustycloud.org/
• Fediverse: https://octodon.social/@cwebber
• Birdsite: https://twitter.com/dustyweb/
• Support this work:https://patreon.com/cwebber