lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




Le mer. 16 sept. 2020 à 14:53, 孙世龙 sunshilong <sunshilong369@gmail.com> a écrit :
Hi, Francisco Olarte

Thank you for your reply.

>>>will physical damage or monetary loss occur if you miss a deadline, are
>>>your deadlines measured in microseconds?
>> Basically, soft real-time is needed.
>I mean, I have a system which is somehow realtime, I process messages
>in lua in response to VoIP call events.
Does Lua run on a realtime OS to process VoIP call events?

Take a look at https://github.com/snabbco/snabb & https://github.com/raptorjit/raptorjit
RaptorJIT could be the Lua interpreter that you need.

https://prosody.im/ (a XMPP server) works with LuaJIT.

François

 
What OS do you use?

Best regards
Sunshilong

On Wed, Sep 16, 2020 at 7:42 PM Francisco Olarte <folarte@peoplecall.com> wrote:
>
> On Wed, Sep 16, 2020 at 1:21 PM 孙世龙 sunshilong <sunshilong369@gmail.com> wrote:
> > >will physical damage or monetary loss occur if you miss a deadline, are
> > >your deadlines measured in microseconds?
> > Basically, soft real-time is needed.
>
> You can try to trade speed for jitter if code is fast enough. I mean,
> I have a system which is somehow realtime, I process messages in lua
> in response to VoIP call events. I can take a couple milliseconds, and
> normally finish in a hundreds of microseconds. I experimented by
> running a collection after each message, the mean handling time was
> higher but deviation was lower  ( as I had a network of long lived
> objects implementing the handlers and a bunch of data generated to
> handle the message and expiring after handling ) ( I can try to dig
> out the code, but I zapped it many lua versions ago  as collection
> pauses where very small and I didn't want to maintain the extra code
> ).
>
> Francisco Olarte.