> However, as Nim is not an object-oriented language, I'm not sure what
> construct I should use to represent an actor.
I had similar issue, I needed to store abstract `App` inside of a `Session`. I
also use event based processing, I call it the `App` but it's pretty much the
Actor. And it behaves in pretty much the same way as Erlang Actor, basically
just a single threaded function with huge switch and internal state, to listen
and react on incoming events and respond with outcoming event. Here's the
definition of the `App` (Actor) I use:
type App* = proc(events: seq[InEvent], mono_id: string): seq[OutEvent]
Run