[SR-Users] Trouble loading multiple javascripts with KEMI

Henning Westerholt hw at skalatan.de
Wed Jun 3 19:58:13 CEST 2020


Hello Hector,

just answering about the performance part of the question – the performance impact is for the large majority of deployments outside not noticeable (for Lua, Python). Lua is comparable to native script, python is a bit slower. But you should not need to worry about it until you are going into the +100.000s subscriber range. 😉  In most of the cases you will wait for IO (DB, DNS etc..) anyway.

There has been some presentation from Daniel on past Kamailio World editions about it, you find the details e.g. at https://www.kamailio.org/wiki/kemi/performance-tests/5.2.x  and also the scripts to do some benchmarking by yourself.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Benjamín Visón
Sent: Wednesday, June 3, 2020 6:45 PM
To: sr-users at lists.kamailio.org
Cc: Hector Ventura Reyes <hectorvent at gmail.com>
Subject: [SR-Users] Trouble loading multiple javascripts with KEMI

I am using the module app_jsdt with KEMI and I am having trouble loading multiple javascript files. The interpreter only notices the last file that's loaded.

What I am trying to do is separate my logic so that everything is not inside the kamailio.conf.js (or the main file the contains the necessary functions if you will).

modparam("app_jsdt", "load", "/etc/kamailio/file1.js")
modparam("app_jsdt", "load", "/etc/kamailio/file2.js")
cfgengine "jsdt"

In the example above, only functions in file2 are recognized.

I am aware that I can use jsdt_run or jsdt_load but from KEMI I don't see a clear way to link this with things like events and timers or replies that don't necessarily go through the request_route.

(As a plus, I am wondering on performance on Javascript vs Python/Lua and if it's viable on high load, if anyone can throw 2 cents on that it would be helpful!)


Saludos,

[cid:image001.png at 01D639E1.502316B0]

[cid:image002.png at 01D639E1.502316B0]

[cid:image003.png at 01D639E1.502316B0]

Benjamín Visón / IT Engineer / Software Developer
bvisonl at gmail.com<mailto:bvisonl at gmail.com> / (829)-664-5163

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/961b07a8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 1219 bytes
Desc: image001.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/961b07a8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1352 bytes
Desc: image002.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/961b07a8/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1547 bytes
Desc: image003.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200603/961b07a8/attachment-0002.png>


More information about the sr-users mailing list