High level application structure

Hi Rustaceans! I am curious how teams structure their applications. For example, I see servo has a Constellation object which wraps IPC Channels, spawns threads and coordinates messages between the various components. More straight forward apps like Trust DNS just go straight into a single event loop.

I am coming from an Erlang background where the first thing I would do is define my supervision tree and some high level gen_servers or FSMs (Actors). My application would then be organised around these actors and I can do things like recover from failure and do graceful shutdown. So I am feeling a little awkward with my current project and looking for ideas. What are the ways you organise your apps? Does the new panic unwinding/runtime stuff open the doors for a supervisor like crate? How do you monitor threads and recover from failures?


1 Like

Related thread: How to implement failure boundaries?