Fork me on GitHub

@malcolmsparks: maybe this would be an interesting example case to illustrate how to build more complex routing mechanisms. I'll try to write up my approach and then we could compare notes, come up with "the idiomatic" way if you like


I have a question on manifold.


let's say you have a number of requests to make (in this case each is a blocking call) and I'd like to do that with 5 requests at a time and get a stream of the results


in core.async you'd use a pipeline to do this, but i'm not really sure how to approach this with manifold


even not taking into account the controlled number of processes executing the requests, how do you convert a sequence of deferred's to a stream?


anyone any examples/suggestions?


@stijn if you don't care about the order, then you could chain a callback to each deferred to stuff the value onto a stream


otherwise there is zip to combine a bunch of deferreds and if that doesn't work for you then i guess you could try putting the deferred objects themselves onto a stream... i have no idea if that will cause explosions


@mccraigmccraig thanks! I found zip in the meantime. That works, an indeed keeps the order.


Putting the deferreds onto a stream works, but would you then (s/map deref) to get the values? That seems a bit unintuitive looking at how chain works for deferreds


also, i'm not sure what (s/map deref) would do when one of the values in the stream hasn't been resolved


do you def need to preserve order ?


I wonder if it fns values as they arrive


@malcolmsparks: Ta for the merge simple_smile


@malcolmsparks: It looks like :body is a valid parameter for the :parameters option when configuring a resource (for a post) but it seems not to work… What might i be doing wrong?