On Aug 14, 2013, at 1:57 PM, Filippo Fadda <[email protected]> 
wrote:

> The bottleneck is not the language used to write the Query Server, but it's 
> the standard input/output used for inter-process communication.

That’s basically what I’m saying, if you include the JSON marshaling in the 
stdio overhead.

> Why not use 0MQ instead?

Why would that be faster? Presumably it’s still marshaling the data in some 
form and sending it to another process over pipes or sockets. (But if it’s 
using something fancy like shared-memory buffers to do the IPC, that would 
indeed be better.)

If you use an in-process JSVM you can directly traverse the Erlang term and 
construct a corresponding JS object in memory without going through any 
intermediate representation like JSON; that’s a lot faster. (Our old iErl repo 
from Couchbase Mobile has code for doing this with SpiderMonkey.)

—Jens

Reply via email to