Enforcer / pybuses

Pythonic, flexible implementation of Command Bus (CQRS) & Event Bus
MIT License
28 stars 0 forks source link

implement command bus to return values from handlers #1

Open megafetis opened 4 years ago

megafetis commented 4 years ago

return awaitable result for example

Enforcer commented 3 years ago

That's pretty big stuff to make this library compatible with async.

For the command bus itself, I'd rather see it like adding handle_async method that will be an async function, but still won't return anything. You could wait for the completion, though.

I was eager to give such an implementation a try, but then I realized it goes further - what about middlewares and event bus? I'm not saying no, but is it worth it?

megafetis commented 3 years ago

It would be great to implement asynchronous event handling. Look at my implementation of the asynchronous command bus. I use pipline with behavior handlers. In the future I want to add events feature