Keep I/O out of swap!/dosync and push effects to explicit edges and queues.
The easiest way to break concurrency code is to mix state coordination and side effects in the same place.
Two practical rules keep you safe:
swap! functions or STM transactions. They may be retried.For Java engineers, this is the same separation of concerns you already value—just enforced at a smaller granularity: “calculate vs do.”
This section focuses on patterns for containing effects (queues, channels, agents, boundary namespaces) so the rest of your code stays deterministic and testable.