Re-programming the programmer, from Actors to FP
summary
A DNS management service evolves through three rewrites from event sourcing with Akka to an actor-based CQRS on DynamoDB to a functional design using FS2 + SQS. Problems that force changes are replay times for zones with millions of DNS records, Akka split‑brain and nondeterministic actors, and an unwieldy DynamoDB persistence. The final system replaces actors with pure functions, drops thousands of lines of code, reintroduces determinism, supports rate‑limiting via SQS, and achieves active‑active high availability.
AI-written summary · about
chapters (35)
- 0:00Intro
- 1:17MALIGNED OBJECT ORIENTED PROGRAMMING - MOOP
- 1:36INJECTS DEPENDENCIES
- 2:12MOOP - LIKE TO THINK WE HAVE GOOD STRUCTURE
- 3:24MOOP - ALL THEM DEPENDENCIES NEED MOCKING...
- 4:57WHAT IS DNS?
- 6:22APPROACH - SCALA +AKKA
- 6:41DESIGN - EVENT SOURCING
- 7:30EVENT SOURCING - COLD LOAD ENTITY
- 8:02EVENT SOURCING - IN MEMORY STATE
- 8:22EVENT SOURCING - AKKA PERSISTENCE
- 8:38EVENT SOURCING - LOAD DNS ZONE
- 8:53AKKA CLUSTER FOR HA USING GOSSIP
- 9:49HIGH AVAILABILITY
- 11:09NEW REQUIREMENTS
- 11:26EVENT SOURCING CHALLENGES
- 12:14NEW DESIGN - AKKA + CORS
- 12:47THROTTLING
- 13:11ACTOR EVERYTHING
- 14:18NETWORKING ISSUES
- 14:41OUR CLUSTER..
- 14:59SPLIT BRAIN
- 16:06VERSION 2 - ACTORS
- 18:02VERSION 2 - ACTOR ISSUES
- 18:48STATE OF AFFAIRS
- 19:28REBUILD AGAIN
- 19:53USE A MESSAGE QUEUE
- 20:16USE FS2 FOR COMMAND PROCESSING
- 20:36FS2 DECLARATIVE SYNTAX
- 20:51REPLACE ACTORS WITH FUNCTIONS
- 21:56QUERYING IN DYNAMODB
- 23:11LESSONS LEARNED
- 24:34THE LAST SLIDE
- 27:24VERSION 3 - CHANGE DATABASE TO MYSQL
- 30:17Sponsored by
related talks
52mF# in the real world
48mBuilding Reactive Services using Functional Programming
44mBuilding event-driven microservices with Scala and Functional Domain Models
29mFunctional Programming & NoSQL Design
32mFunctional Programming for (Dev)Operations and Infrastructure
29mprooph/micro and FPP - less is more
57mMaximising Side Effects When Adopting Functional Programming
37mLife After Business Objects: Confessions of an OOP Veteran
