[uWSGI] call a "streaming" LUA RPC from python
davide.setti at gmail.com
Tue Mar 29 17:19:31 CEST 2016
I have a python web service that does an HTTP request to ElasticSearch and
generates a JSON with all the results. The problem is that the result set
can be quite big, therefore we switched to ijson for streaming JSON
decoding and chunked encoding for the output.
But now it's slow, because ijson is: the whole thing is now CPU bound.
One possible solution would be to write the JSON parsing in C, but I can't
write proper C code anymore... :(
Another solution would be to call a LUA RPC, but we would have memory
problems because uWSGI RPC only supports strings as an exchange format, a
single string I think. Are there tricks to easily dump to file/unix pipes
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the uWSGI