# Effect is not BEAM

Principle `effect-is-not-beam`. Fibers share a runtime; scope ownership does not supply isolated heaps or OTP restart strategies.

Also searched as: fiber isolation, process isolation.

BEAM processes isolate their state. Supervision observes worker failure and applies restart policy. Restart still loses volatile state.

> Shared-nothing concurrency ensures complete isolation between processes: one process can’t compromise the internal state of another.

Source: [Q03](/bibliography#q03); [B1](/bibliography#b1-erlang-and-otp-in-action), [B2](/bibliography#b2-elixir-in-action), [B3](/bibliography#b3-designing-elixir-systems-with-otp).

## Failure it prevents

A failed computation has already changed shared state, while the caller assumes process isolation.

## Our Effect 4.0.5 reading

Scope and FiberSet own local lifetimes. They do not supply separate heaps or OTP restart strategies. Use a host boundary for hard isolation.

Source: `packages/effect/src/Scope.ts`, `packages/effect/src/FiberSet.ts`, `packages/effect/src/Fiber.ts`.

## How to check

State which failure the boundary contains. Test a worker defect and a hard runtime exit separately. This is our proposed verification, not a quoted procedure.

Continue with [Supervision chooses what restarts](/principles/supervision-is-a-recovery-policy), [Durable work needs storage](/principles/durable-work-needs-storage).

Connect this to [the existing rat-stack guidance](https://ratstack.sh/lore/concurrent-work-needs-an-owner).

Use [the durability skill](/skills/durability) for the full review. Return to [the durability index](/principles/durability).

## Skills
- [Durability starts with a recovery record](/principles/durability)

## Sources
- Logan, Martin; Merritt, Eric; Carlsson, Richard. *Erlang and OTP in Action*. [Link](https://www.manning.com/books/erlang-and-otp-in-action). ([b1-erlang-and-otp-in-action](/bibliography#b1-erlang-and-otp-in-action))
- Jurić, Saša. *Elixir in Action*, Third Edition. Manning, 2024. [Link](https://www.manning.com/books/elixir-in-action-third-edition). ([b2-elixir-in-action](/bibliography#b2-elixir-in-action))
- Gray II, James Edward; Tate, Bruce A. *Designing Elixir Systems with OTP*. Pragmatic Bookshelf, 2019. [Link](https://pragprog.com/titles/jgotp/designing-elixir-systems-with-otp/). ([b3-designing-elixir-systems-with-otp](/bibliography#b3-designing-elixir-systems-with-otp))

## References
- [Effect contributors. Effect 4.0.5. Scope.ts](https://github.com/Effect-TS/effect/blob/7f524e25cfb49a71ac39b0f44278d08d40dda5de/packages/effect/src/Scope.ts). Pinned source for our Effect mapping, not a claim from the book.
- [Effect contributors. Effect 4.0.5. FiberSet.ts](https://github.com/Effect-TS/effect/blob/7f524e25cfb49a71ac39b0f44278d08d40dda5de/packages/effect/src/FiberSet.ts). Pinned source for our Effect mapping, not a claim from the book.
- [Effect contributors. Effect 4.0.5. Fiber.ts](https://github.com/Effect-TS/effect/blob/7f524e25cfb49a71ac39b0f44278d08d40dda5de/packages/effect/src/Fiber.ts). Pinned source for our Effect mapping, not a claim from the book.
