Dominik Tornow's Avatar

Dominik Tornow

@dominiktornow.bsky.social

Founder Resonate HQ | Distributed Async Await | Thinking in Distributed Systems | https://dtornow.substack.com

2,586 Followers  |  39 Following  |  527 Posts  |  Joined: 27.10.2024  |  2.1951

Latest posts by dominiktornow.bsky.social on Bluesky

One chapter turned out too long for Substack. So I will publish the chapter announcements on Substack and the chapter on Docusaurus

Bonus

Easier to collaborate :)

18.08.2025 17:33 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Even simple examples hide big systems engineering lessons:

Chat Interface

Know what’s ephemeral vs durable

Streaming chunks β†’ ephemeral transport
Complete responses β†’ durable storage

Same origin. Different lifetimes. Different infrastructure.

15.08.2025 18:55 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

The DST in @resonatehqio's TS SDK injects failures by pseudo-randomly replacing a character in a message, simulating:

β€’ Invalid format
β€’ Valid format, invalid schema
β€’ Valid format and schema, invalid payload

Simple yet packs a punch

bsky.app/profile/domi...

15.08.2025 12:50 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Sidebar material: Using TLA+ style formulas to describe training & inference:

Training

non-deterministically choose a model from the model space

(wild simplification)

Inference

non-deterministically choose the next token from the top-K predictions

(slight simplification)

13.08.2025 12:50 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Mental model of Large Language Models

{ s ∈ Seq(Tokens) : Len(s) ≀ Max } β†’ [ Tokens β†’ Score ]

A function that maps any sequence of tokens up to the maximum context length to a score for every possible token as the next

train = learn the function
infer = apply the function

12.08.2025 19:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

A recursive Deep Research Agent with parallel tool calls

➑️ Running on AWS Lambda or Google Cloud Functions
➑️ Doesn’t block your Lambda while waiting

In less than 50 lines of typescript

bsky.app/profile/domi...

12.08.2025 09:18 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

What if AWS Lambda could remember?

The new Resonate TypeScript SDK runs stateful computations on stateless infrastructure (AWS Lambda, Azure Functions, GCP Functions)

Coming soon

If you’re building serverless apps, I’d love to get your thoughts before launch

DM me

11.08.2025 10:00 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 1    πŸ“Œ 1

If you’re building agentic applications, every line hides a systems engineering challenge.

This loop looks simple. It is not.

What’s the first challenge you spot?

bsky.app/profile/domi...

10.08.2025 18:15 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

My favorite aspect of LLMs? They are self compositional

infer generates a token.
Applied to itself generates a turn.
Applied to itself generates a conversation.

In other words, inferring the next token drives the entire AI revolution

bsky.app/profile/domi...

09.08.2025 16:55 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

My favorite aspect of LLMs? They are self compositional

infer generates a token.
Applied to itself generates a turn.
Applied to itself generates a conversation.

In other words, inferring the next token drives the entire AI revolution

bsky.app/profile/domi...

09.08.2025 16:55 β€” πŸ‘ 2    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

We will reason about AI & LLMs in terms of two (from our point of view) atomic functions:

train

function train(corpus: Set<Token[]>): Model

Training yields a model

infer

function infer(model: Model, context: Token[]): Token

Inference yields a token

bsky.app/profile/domi...

07.08.2025 17:50 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

Distributed Locks are tricky

martin.kleppmann.com/2016/02/08/h...

My take:

bsky.app/profile/domi...

07.08.2025 12:32 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

My take:

bsky.app/profile/domi...

07.08.2025 12:31 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

But that leaves a critical question:
What should a writer do when it detects a conflict?

(For another thread)

07.08.2025 12:31 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

For example:

Writer A reads length(log) = 100
Writer B reads length(log) = 100
Writer A writes Message(exp=101, ...) yields 101
Writer B writes Message(exp=101, ...) yields 102 ❌

Readers ignores messages whose expected index exp does not match their actual index

07.08.2025 12:31 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Solution

You cannot prevent the write, you have to resolve the conflict on read

On startup, a writer W reads the current length of the log, afterwards the writer writes

ind = length(log)

while True:
ind += 1
if append(Message(exp=ind, ...)) != ind:
# conflict detected
...

07.08.2025 12:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

System Model

A Kafka-like system is a totally ordered, append-only log. Let's think about this system in terms of one operation, append:

append: Log Γ— Msg β†’ Log Γ— Ind

append appends a message Msg to the log and returns the index Ind the message was written to

07.08.2025 12:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Requirements

βœ… Prevent write conflicts (duh)
βœ… Optimize the normal case (one writer)

Ensure correctness in all cases, with minimal overhead in the normal case (no extra reads or writes)

07.08.2025 12:31 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

How do you implement single-writer semantics on Kafka-like systems?

In a single-writer system, a write conflict occurs when more than one process acts as the "sole" writer for a given log (partition) at the same time.

07.08.2025 12:31 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 2

Fun distributed systems challenge: How do you implement single-writer semantics on Kafka-like systems?

E.g. S3 support conditional writes: write only if the object doesn’t exist

But Kafka is an append-only log. You can’t prevent writes

So how do you make only one write count?

06.08.2025 23:23 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 1

Chapter 1: AI, Agents, & Agentic Applications

Part 1

Build a sound and complete mental model from first principles

Part 2

Use a minimal agent loop to identify core characteristics and core engineering challenges

Drops end of the month

bsky.app/profile/domi...

06.08.2025 12:30 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Post image

[New Book Alert]

Systems Engineering for Agentic Applications

A guide for turning AI-powered prototypes into production-ready agentic applications

Released monthly, chapter by chapter.

If 100 people sign up, we are doing this

agenticapplications.substack.com/about

04.08.2025 14:01 β€” πŸ‘ 4    πŸ” 2    πŸ’¬ 0    πŸ“Œ 6
Post image

[New Book Alert]

Systems Engineering for Agentic Applications

A guide for turning AI-powered prototypes into production-ready agentic applications

Released monthly, chapter by chapter.

If 100 people sign up, we are doing this

agenticapplications.substack.com/about

04.08.2025 14:01 β€” πŸ‘ 4    πŸ” 2    πŸ’¬ 0    πŸ“Œ 6

I will never write another book.

I will never write another book.

I will never write another book.

I will never wriβ€”

…

More details coming soon

02.08.2025 10:33 β€” πŸ‘ 16    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The printers are warming up. Think Distributed Systems is about to go to press.

From distributed theory to printed reality

www.manning.com/books/think-...

bsky.app/profile/domi...

31.07.2025 15:45 β€” πŸ‘ 10    πŸ” 0    πŸ’¬ 0    πŸ“Œ 1

I do not enjoy the developer experience (stack ripping) of EDA and ES but I am not denying the benefits.

So on an application level, with a large API surface, I avoid. Platform level, with a smaller API surface area, I cave.

What’s your thinking?!

30.07.2025 21:45 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Sounds like a sequential programming model on an event driven execution model πŸ‘€

We should chat again sometime soon :)

30.07.2025 19:16 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

My take on Event Sourcing

> Event Sourcing to build an application

Hell no

> Event Sourcing to build a platform

Begrudgingly, yes

bsky.app/profile/luke...

30.07.2025 15:42 β€” πŸ‘ 4    πŸ” 1    πŸ’¬ 2    πŸ“Œ 1

Tired

Using callbacks to implement non-blocking I/O

Wired

Using callbacks to implement partial re-execution of transactions that violate serializability, avoiding full aborts

bsky.app/profile/mura...

30.07.2025 12:00 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0
Post image

Programming Languages, Distributed Protocols, and Hollywood Blockbusters

Learn to survive concurrency, distribution, and the zombie apocalypse

Watch my Systems Distributed'25 survival guide

www.youtube.com/watch?v=DW9g...

30.07.2025 10:00 β€” πŸ‘ 3    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

@dominiktornow is following 20 prominent accounts