LuaJIT in realtime applications

  • From: Luke Gorrie <lukego@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 20 Jul 2012 21:57:18 +0200


I'm interested in using LuaJIT in a realtime application. In particular I'd
like to use LuaJIT code instead of iptables-style patterns in a network
forwarding engine, and I'd like to be able to establish some upper-bounds
on processing time for my own peace of mind. For example, to be able to be
confident that rules of a certain basic complexity level would never take
more than (say) 50us to execute.

Is this a realistic notion?

I'm guessing that GC is the main issue to be concerned about. I wonder if
for example I could simply detect when a GC is needed and in that case
simply allocate a fresh new VM instead and discard the old one. (Perhaps
I'm dreaming up a solution to a problem that doesn't exist -- I'll stop

Any advice appreciated!


Other related posts: