<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 17, 2016 at 7:58 PM, Roger Lipscombe <span dir="ltr"><<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":hb" class="a3s aXjCH m15699a756718ab6f">Robby Raschke did it with a C Node:<br>
<a href="http://www.erlang-factory.com/berlin2014/robby-raschke" rel="noreferrer" target="_blank">http://www.erlang-factory.com/<wbr>berlin2014/robby-raschke</a></div></blockquote></div><br>This is rather close to a solution I would do as well: write a port process which runs the LuaJIT system on top of a small C node. When I did this for OCaml, my pipelined req/s rate was about 1 million or 1us per request in roundtrip. This is usually fine as the reason you want to outsource computation to a separate system is that it is often request heavy and on the order of several milliseconds. <br><br>I wouldn't really worry too much about the speed aspect. What is the primary problem is that you have a good deal of Lua code which you need to get to run. The quickest way to do that is not to rewrite it, but to interact with it. Once you have that established, you can start looking into if a rewrite is worth it, or is even necessary. LuaJIT is faster than Erlang, but the question remains if that matters in the domain you are working in. More often than not, efficiency doesn't matter as much as people think since there are other things in a system than raw computational turnaround.<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">J.</div>
</div></div>