+ All Categories
Home > Documents > Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to...

Goblins and Spritely - DustyCloud · 2018. 12. 6. · Goblins and Spritely From the actor model to...

Date post: 30-Mar-2021
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
48
Goblins and Spritely From the actor model to Distributed Virtual Worlds By Christopher Lemmer Webber
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(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

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

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

<<-, 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

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

Thanks! Questions?

• Personal site: https://dustycloud.org/

• Fediverse: https://octodon.social/@cwebber

• Birdsite: https://twitter.com/dustyweb/

• Support this work:https://patreon.com/cwebber


Recommended