I have been drawn from the data reactive Mongo that I need to push through the spray rest API. I was hoping to do this with a ringed answer though I have found out that the reactants coming back from the Mongo can handle the network connection as fast as possible through the fast spray. The result is that the connection has been abolished.
I was able to solve this problem by using a spray single feature in an intermediate actor. It allowed me to make the calculator backwards on the block with a blocked wait. Although I really do not want to wait, I want to find a way to stream data through spray without being blocked.
Is this possible? I have some ideas that can work if I can fill the missing pieces.
1) Make pressure on the numerator in non-blocking fashion (no idea how to do this. Suggestions?)
2) Break the calculator into small numeral. The last one is complete only once each counting started. I can do this by using an actor. Whatever is lacking here, there is a way to break the big score into smaller enumerators.
3) Use something like "Enerretetek" method. Where I take some records from the calculator, then when I'm ready, take something else it's actually the same solution as 2), but with a slightly different perspective It will require the calculator to maintain the state however. Is there any way to use Enumeratee.take multiple times with the same calculator each time without restarting from the beginning?
Any alternative suggestions that can work? Or, if this is not possible please let me know.
I am using Play Enumerator 2.3.5
I think The idea is that you apply the callback supplied after receiving the Iteratee
whose fold
method only spray one. Def Fold [B] (Folder: Phase [Error, String] => Future [B]]: Future [B] = {(Sprayer? Input). Flatmap {Case Success = & gt; Folder (Cont (handleData)) case error = & gt; Folder (error (...)) done => }}}}} Initial parameter {string} / Code>
This should not be intercepted, but ensures that the next part is sent only after the last part.
Comments
Post a Comment