I will further confirm Brian's statement.  I originally started writing scripts in JS because I was more familar with it.  I ran into several problem with scalability and threading issue that prompted me to look at LUA.

LUA took less than a day to get a basic understand and an additional few hours to understand their version of objects.  I had migrated all 15 of my JS scripts into functioning LUA script within 5 hours. Including re-creating the object-oriented nature of my JS source.

LUA consumes far less resources and begins execution faster than JS.  The only thing I need JS for at this time is cURL-like calls, as the built-in LUA has no equivalent to the JS Socket object.  Having said that, the built in LUA can take advantage of LUA libraries that are installed on the OS, and LUA socket libraries do exists, so it is just a matter of me getting the time to install them.

One more handy benefit for LUA, you can configure LUA scripts to run at switch startup to perform tasks (like a cron system) within the switch core. 

-pete

-------- Original Message --------
Subject: Re: [Freeswitch-users] help with mod_conference stability
From: Brian West <brian@freeswitch.org>
Date: Thu, May 14, 2009 10:31 am
To: freeswitch-users@lists.freeswitch.org

Its obvious if you look at the size of the JS VM vs the lua VM.. it would clearly scale better not needing megs and megs of ram per call vs about 160kb for lua.  Lua took about 20 min to learn and about an hour to get the finer points down.

/b


On May 14, 2009, at 12:24 PM, Stephen Crosby wrote:

I keep hearing that lua is lighter weight / more scalable than javascript. I'd love to see some data that shows how big the difference really is. I could port all my scripts from javascript to lua, but it would require a lot of overhead (me learning lua + actually porting the scripts). I want to know how much benefit there really is to that.

-- Meet us at ClueCon!  http://www.cluecon.com





_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org