devsisters / shardcake

Sharding and location transparency for Scala
https://devsisters.github.io/shardcake/
Apache License 2.0
389 stars 30 forks source link

An alternative to Replier, which can be used to ingest multiple messages #55

Closed mykytamykhailenko closed 1 year ago

mykytamykhailenko commented 1 year ago

Currently, Replier can be used only once to complete send. However, in some cases, it is not enough to receive a single response. Instead, you may need a Queue to consume multiple messages without blocking.

For instance, each pod could expose a web socket, which needs a steady stream of events generated by an entity. Currently, the only possible way (seemingly) is to execute send in a loop, waiting for the response from the entity, which is blocking busy waiting.

It would be convenient if there were an operation exposing a Queue. Thus, it could be possible to avoid blocking and there would be a possibility for an entity to respond back continually.

ghostdogpr commented 1 year ago

I've actually been working on that and have a WIP PR: https://github.com/devsisters/shardcake/pull/53

Feedback is welcome!

ghostdogpr commented 1 year ago

Actually I already had an issue for that: https://github.com/devsisters/shardcake/issues/45 so I'm gonna close this one. Feel free to give feedback on the PR.