In terms of running python scripts, it's running for the same time the equivalent lua one would be. Don't know how the overhead compares, although I expect lua is lower.<br><br>-Steve<br><br><br><br><div class="gmail_quote">
On 18 February 2011 10:37, Avi Marcus <span dir="ltr"><<a href="mailto:avi@avimarcus.net">avi@avimarcus.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">mod_python, cool. I've heard lua has a very low overhead, but what about mod_python (or PHP ESL)?<div>I'd imagine the script would have to be left "running" until the call completed.</div>
<div>
mod_python seems pretty well fleshed out...</div><div>-Avi<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Feb 18, 2011 at 11:07 AM, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">C is faster, but it's probably not worth it unless you can show that there's enough processing being done by your script that it'd have an impact. It's slightly more work to tweak it than just editing a script since you'd need to recompile and reload the module, which might also be trickier if you're handling traffic at the time.<div>
<br></div><div>Lua (mod_lua) is probably the most commonly used language, but there's also Python (mod_python) as you've spotted. There's also JavaScript (mod_spidermonkey) which you haven't mentioned. Which you use is really up to you though.</div>
<div><br></div><div>As far as database access goes, from Lua check out:</div><div><a href="http://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh" target="_blank">http://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh</a></div><div>
<br></div><div>
It gives you a database interface without having to install and configure luasql, and you get to take advantage of the FS connection pooling which you wouldn't if you were using the native support. That'll should speed up database access times (you'll in most cases already be connected to the database so the call doesn't have to wait while you connect). I don't think that interface is available in the other languages just yet though.</div>
<div><br></div><div>-Steve</div><div><div></div><div><div><br></div><div><br><div class="gmail_quote">On 18 February 2011 06:17, Edward de Jong <span dir="ltr"><<a href="mailto:edward.dejong@voicecarrier.com" target="_blank">edward.dejong@voicecarrier.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I am new to freeswitch, and wondering which of the many languages to implement my rather complex dial plan in. I know i can't express my desires in the normal XML language, because I need looping and database access, so which language is the best tested and most reliable in terms of usage with FreeSwitch. My finalists so far are Lua, Python, and good old C. Haven't used python or lua yet, but I figure C will have a big performance advantage.<br>
<br>
but maybe not important considering how much greater the CPU load in the switch is devoted to handling audio streams...<br>
<br>
edj<br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>