<div dir="ltr">Thank you guys for all the responses. I was able to create a port to call which in turns uses luaJIT to call lua code. <div><br></div><div>I really appreciate the help.</div><div><br></div><div>Regards,</div><div>Arshad<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 17, 2016 at 11:36 PM Jesper Louis Andersen <<a href="mailto:jesper.louis.andersen@gmail.com" target="_blank">jesper.louis.andersen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>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/berlin2014/robby-raschke</a></div></blockquote></div><br></div></div><div dir="ltr"><div class="gmail_extra">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.</div></div><div dir="ltr"><div class="gmail_extra"><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">J.</div>
</div></div></blockquote></div></div></div>