Fork me on GitHub
#re-frame
<
2019-12-06
>
folcon16:12:42

I’m trying to work through using cofx to do async processing. Is the rationale: 1) Create a function data-process which takes [f queue chunk-size], where f can be mapped over (take queue chunk-size). 2) Create a reg-cofx with a custom keyword :data-process which takes a map with keywords :f :queue :chunk-size :on-chunk-success :on-chunk-failure :on-complete or something to that effect?

p-himik16:12:39

Are you talking about using effects perhaps? Because coeffects are supposed to just transform the context for event handlers and for coeffects next in the coeffect queue.

folcon16:12:23

Perhaps? I’m trying to basically create a effect handler where I can send some queue of work, and then it fires an event once it’s done, but the results can be cached at a subscription level and the app itself doesn’t lock. Now according to the performance section I should ensure that each unit of work can be done in 16ms, but I want to just have a way of sending a big queue of work without having to worry about it.

p-himik16:12:18

Yeah, you also have to create an event handler that would schedule the next chunk.

folcon16:12:43

So event that fires a next event sort of thing?