epoplavskis/photon-pump

Remove the Reply logic from Dispatcher

bobthemighty opened this issue · 1 comments

The dispatcher is doing way too much work.

The model where a Conversation returns a Reply is nice for testability but the current design sucks.

We should consider either:

  • A polymorphic Reply type that encapsulates the logic that's in handle_reply OR
  • Moving the reply logic into the Conversation.

Either of these will require us to rewrite all the conversation tests.

At the end, the Dispatcher should be much simpler.

Fixed in #55 #54 #53 #51

Conversations now modify their own futures instead of returning a Reply to the dispatcher. The dispatcher has been hollowed out and might not survive much longer.