can you explain it a bit? :smile:
# arrow-contributors
p
can you explain it a bit? 😄
j
The basic structure of it is: You create a policy datatype which describes how to repeat/retry computation. That type is an instance of some typeclasses like alternative/applicative/monoid etc and has some powerful composition functions. Then all you need to do is call a retry/repeat function with that schedule.
some slides that show this
the talk for it is also good, the interesting bits start somewhere in the middle, i'll look up the slide number ...
at like slide 40
I also did a port of this once, but I think this can be done better for arrow
p
does it require any of the ZIO environment internals? that’s our bane because we depend on coroutines for threading and such
j
nah, it is much older than that afaik
r
if anyone attempts this try it over EnvFx
That is ZIO + Environment over the suspended system
Which in 0.9.0 will become EnvIO if we are able to fix the cancelation and stack safety which are still missing there
i
Can you explain what some implications are from EnvFx. I do understand the code, but what can I do with it. Is it something like a Store for all my Dependencies? Do I even need it if I use a Reader Monad? //I did not yet use a Reader Monad for some of my projects
p
It's like IO but you can
ask()
for the environment that it carries. So it's like extension functions and receivers but embedded on your concurrency framework
i
Damn, so I could carry the computation of a DI framework?
p
ye
i
I have a question I am trying to model multiple Services (API calls) as Products and these services are self-sufficient. Is there a better way to model this as Coproducts, because at the time I stumbled over it, I thought "this is it". I am not sure If I can then sum multiple Coproducts (API Services) into a type class. To be specific, is this a good way of modeling or am I on the wrong track here.
p
Use tuples or create a new interface to provide them
try this
i
Thanks, I'll get back to you, when I figure it out.
i
didn’t you send it before 🙂