Actor Model - sgml/signature GitHub Wiki

WebDAV Implementation

+---------+                                                    
| Client  |                                                    
+---------+                                                    
     |                                                          
     |  PUT /actors/user_123/tasks?Idempotency-Key=abc123       
     v                                                          
+------------------+                                           
| WEBDAV Server    |                                           
+------------------+                                           
     |                                                          
     |  Lookup Idempotency-Key                                  
     v                                                          
+-----------------------------+                                
| Idempotency Key Registry    |                                
+-----------------------------+                                
     |                                                          
     |  If new → forward                                        
     v                                                          
+---------------------------------------------+                
| Actor: user_123                              |                
| Endpoint: /actors/user_123                   |                
|                                              |                
| - POST /actors/user_123/execute              |                
| - GET  /actors/user_123/status               |                
| - PUT  /actors/user_123/state                |                
|                                              |                
| If key seen → return cached result           |                
+---------------------------------------------+                
     |                                                          
     |  Response (cached or new)                                
     v                                                          
+------------------+                                           
| WEBDAV Server    |                                           
+------------------+                                           
     |                                                          
     |  200 OK / 202 Accepted                                   
     v                                                          
+---------+                                                    
| Client  |                                                    
+---------+                                                    

Narrative

“Imagine a world where every object is a little computer that talks to other little computers.”
Joe Armstrong

In this world, each actor is like a barista in a coffee shop. They work alone, focused, and serve one customer at a time. No shared counters. No chaos. Just quiet, serialized service.

A customer walks in with a receipt — that’s your idempotency key. It says: “I’ve already ordered this. Just give me the same thing again.”

The barista (actor user_123) checks the drawer:
“Have I already made this coffee for receipt abc123?”
If yes, they hand over the same cup.
If no, they make the coffee, store it under abc123, and serve it.

Now imagine the customer panics — maybe their phone glitched, maybe the network dropped — and they come back five times with the same receipt.
The barista doesn’t flinch. They just hand over the same cup. No wasted beans. No double charges.

You didn’t need a rate-limiting algorithm to say “only 5 customers per minute.”
You didn’t need a global counter or a token bucket.
You just needed each actor to handle one message at a time, and the receipt to prevent duplication.

“Concurrency is easy when you don’t share state. Just let each little computer do its job.”
Joe Armstrong