The previous attempt at a deep integration of language-ext Eff
and Aff
support in echo processes didn't work out (as discussed here).
So, I have done a much simpler implementation:
- That requires no changes to the core actor-system that runs the echo-processes, and so is risk-free for all existing code
- Enables asynchronous processes for the first time
- Facilitates injectable IO operations (via
Eff
andAff
)
To leverage it you should use Process<RT>
rather than Process
as your starting point. There's:
Process<RT>.*
- the core prelude functionsProcess<RT>.spawn*
functions for creating proceses that takeEff
andAff
computationsProcess<RT>.tell*
for telling messages to other processesProcess<RT>.ask*
for request/response to other processesProcess<RT>.reply*
for replies to other processesProcess<RT>.register*
for registering named processes
Because this is a more 'lightweight' approach, the Process<RT>
functions are simply wrappers to the existing Process
functions. That means you don't get to build a DI runtime for Echo itself (even though there is a placeholder trait called HasEcho<RT>
).
I think this is fine as a starting point though, because mostly everything that echo does is managed in-memory and is relatively easy to mock. The main value-add here is that all IO within a process can be mocked, which makes it relatively trivial to build unit-tests for an inbox function.
If you don't care about Eff
or Aff
then this release will have no impact on you. If you want to know more then check out the write-up on the language-ext repo.