<div>I use the erlang way, but I played some of the ESL while I'm writing a book about FreeSWITCH, and I did even write a subset of a pure ruby version of ESL since it's not easy to get the swigged version work on Mac in the old days, so I know the detail of the ESL protocol and challenge of write a new ESL implementation.</div><div><br></div><div>But it's true that nearly all lang has a none-swig ESL. One reason I think maybe because some language has async or other versions of socket implementation that is not compatible to the swigged-ESL. e.g. gevent in Python, event machine in ruby, Netty for Java etc.</div><div><br></div><div>I had briefly tested the ESL performance before, looks like the mod_event_socket version has some bottle necks since the erlang dispatcher mechanism which use a fair dispatching model and the socket is controlled by a single erlang process that has some bottle necks on load which causes lost events. The mod_kazoo version improved that by start a new raw socket along side the socket between the erlang nodes, and more over it can add filter to events to filter out unused header, so it performs better. I also made a patch for mod_kazoo that replaced the for-i-in-all-headers loop to a hash based compare and it got some performance improvement.</div><div><br></div><div>I also compares with the C ESL, by manually generate a large number of events that has 1000+ headers (normal events would have 100+ and a typical CHANNEL_HANGUP_COMPLETE might be around 500 I don't remember exactly), looks like the bottleneck is at the ESL client which must decode all the headers from plain text to a linked list. But I'm not 100% sure since on the FS side it has to serialize 1000 headers from a linked list to string. So if we can use a binary body to avoid the serialization/deserialization it might help get better performance, but since the event is linked list it might need serialize anyway.</div><div><br></div><div>But for sure you only can get the bottle neck if you are runing pressure test or with very busy traffic, and ESL is better for performance. xml_rpc based on an old version of abyss (the new version is not open now) and if has new lib we can use I'm happy to replace that. btw, I extended xml_rpc to support websocket and it's been used in FreeSWITCH-Portal.</div><div><br></div>
                 
                <p style="color: #A0A0A8;">On Thursday, January 16, 2014 at 8:37 AM, João Mesquita wrote:</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Tony, the swigged version of ESL python module is not at all pythonic. As an example the use of get header for events that could use a more pythonic syntax like dicts do. I didn't mean to say that I wanted to no use the ESL C implementation as base at all, I just meant that the wrapper could be done using a tool that would make the python module more pythonic but still keeping the underlying implementation in C intact. Maybe that is doable using swig an if that's the case please ignore my own stupidity.&nbsp;<br><br>Sent from my iPhone</div><div><br>On Jan 15, 2014, at 9:30 PM, Anthony Minessale &lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Why would you want to make a non-swig version of the ESL lib? &nbsp;The whole point is to make sure you get a reliable client.<div>Everyone who tries to make their own runs into one of many challenges that are hard to overcome in a script lang. &nbsp;This is why you have the benefit of the wrapped C lib.</div>
<div><br></div><div>xml_rpc has a bit less capability and is for sure less stable and scalable when put head to head with ESL.</div><div>I wrote both of them myself so I'm not driven by affinity to one or the other. &nbsp;AFAIK xml_rpc is stable but the lib used is not so hot and I always wanted to use something better.</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div><br><br><div>On Wed, Jan 15, 2014 at 6:10 PM, canuck15 <span dir="ltr">&lt;<a href="mailto:canuck15@hotmail.com" target="_blank">canuck15@hotmail.com</a>&gt;</span> wrote:<br><blockquote type="cite"><div><div lang="EN-US" link="blue" vlink="purple"><div><p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I sort of figured someone would say that.&nbsp; Actually mod_xml_rpc seems to be similar to mod_xml_curl. Since I already have that mod_xml_curl fetches from my app &nbsp;working well I don’t think I will switch that.&nbsp; Also just read that fs_cli uses ESL so that has sold me on sticking with it.&nbsp; I just want to make sure I am not using features that are a bit on the fringe where it’s not very active, well tested, and fixes don’t come along very often.<u></u><u></u></span></p>
<p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>&nbsp;<u></u></span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in">
<p style="margin: 0px; "><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-dev-bounces@lists.freeswitch.org" target="_blank">freeswitch-dev-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-dev-bounces@lists.freeswitch.org" target="_blank">freeswitch-dev-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Michael Jerris<br>
<b>Sent:</b> Wednesday, January 15, 2014 11:17 AM<br><b>To:</b> <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank">freeswitch-dev@lists.freeswitch.org</a><br><b>Subject:</b> Re: [Freeswitch-dev] mod_event_socket or mod_xml_rpc?<u></u><u></u></span></p>
</div></div><div><div><p style="margin: 0px; "><u></u>&nbsp;<u></u></p><p style="margin: 0px; ">They are completely different tools for different jobs, not a one or the other situation.<u></u><u></u></p><div><p style="margin: 0px; ">
<u></u>&nbsp;<u></u></p><div><div><p style="margin: 0px; ">On Jan 15, 2014, at 1:32 PM, canuck15 &lt;<a href="mailto:canuck15@hotmail.com" target="_blank">canuck15@hotmail.com</a>&gt; wrote:<u></u><u></u></p></div><p style="margin: 0px; ">
<br><br><u></u><u></u></p><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><div><p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I am trying to update an old abandoned app (WikiPBX) which is written using Django Python and uses mod_event_socket and mod_xml_curl to talk with Freeswitch.<u></u><u></u></span></p>
</div><div><p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">&nbsp;<u></u><u></u></span></p></div><div><p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">I’ve got most things working except the most important part which is mod_event_socket.&nbsp; Now I found mod_xml_rpc which seems like a better way to go.<u></u><u></u></span></p>
</div><div><p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">&nbsp;<u></u><u></u></span></p></div><div><p style="margin: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">Just wanted to get some opinions which is the better api interface before I get too far into trying to get mod_even_socket working properly.&nbsp; So far it’s been quite the headache.&nbsp; I am currently looking at fusionpbx and bluebox code to see what they are doing.<u></u><u></u></span></p>
</div></div></blockquote></div><p style="margin: 0px; "><u></u>&nbsp;<u></u></p></div></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Anthony Minessale II &nbsp; &nbsp; &nbsp; ♬ @anthmfs&nbsp;&nbsp;♬ @FreeSWITCH&nbsp;&nbsp;♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a> &nbsp;☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a> &nbsp;☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div>
<div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch&nbsp;☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call&nbsp;<br>
</div><div>☎&nbsp;<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a> &nbsp;☎ +19193869900&nbsp;</div><div><br></div></div></div></div>
</div>
</div><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services:</span><br><span><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span><br><span><a href="http://www.cudatel.com">http://www.cudatel.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br><span><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-dev mailing list</span><br><span><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">lists.freeswitch.org/mailman/options/freeswitch-dev</a></span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></div><div><div>_________________________________________________________________________</div><div>Professional FreeSWITCH Consulting Services:</div><div><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></div><div><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></div><div><br></div><div>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</div><div><a href="http://www.cudatel.com">http://www.cudatel.com</a></div><div><br></div><div>Official FreeSWITCH Sites</div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div><div><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></div><div><a href="http://www.cluecon.com">http://www.cluecon.com</a></div><div><br></div><div>FreeSWITCH-dev mailing list</div><div><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a></div><div><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a></div><div>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a></div><div><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>