Here's my use case: I am implementing a finatra server, that should be able to receive many concurrent large requests. These requests have a large body (several megabytes) comprised of many small json objects, concatenated.
I'd like to avoid loading the entire request body into memory. I'm looking for a way to read the request body in chunks, and use a json parser that supports this sort of async parsing.
In node.js this can be achieved by using the jsonp package (see the example - https://github.com/jaredhanson/node-jsonsp/blob/master/examples/twitter-stream/app.js).
Can I do something similar with finatra (and how)?
PS - I also posted the question here, but got no answer so far.