sam-goodwin / eventual

Build scalable and durable micro-services with APIs, Messaging and Workflows
https://docs.eventual.ai
MIT License
174 stars 4 forks source link

(Local) Entity.stream is invoked synchronously with Entity.put #412

Closed sam-goodwin closed 1 year ago

sam-goodwin commented 1 year ago

If you have a command that calls entity.put and a stream handler, the command won't return until the stream processes the change.

sam-goodwin commented 1 year ago

Clarification: i am experiencing this when using the debugger. Looks like it's not a synchronous problem - it's that the debugger blocks the entire interpreter.

This is OK but may make debugging things hard because it will cause timeouts when debugging an async process.

Could it be solved with worker threads? Or would that add too much complexity and this is acceptable?

sam-goodwin commented 1 year ago

Or perhaps some synthetic delay to let command promises propagate through. Either way, minor problem - would happen with any local process, e.g. express