In general I think people end up gravitating towards using message passing or the actor model for this.