XML_CURL directory configuration does not fail over to static XML
I've noticed that when binding the FS directory configuration to XML_CURL, FS does not fail over to static XML when XML_CURL fails. I've verified this by loading identical directory configurations in XML_CURL and in static XML. When I run the following command, it only returns a result if XML_CURL is available: user_data 1000@testdomain.com var mailbox if the XML_CURL query fails, it does not look in the static XML (which is loaded into memory), instead it returns: -ERR no reply Is this the expected behavior or is it a bug? This behavior is not the case for dialplan configuration. While binding XML_CURL to dialplan, if XML_CURL fails, it will use the static XML that is loaded into memory.
Upon further investigation, it seems all directory parameters and attributes from static XML are stored in memory and can be accessed if XML_CURL fails. This is not true for any directory variables though. Is there a specific reason why FS does not store directory variables in memory when using XML_CURL?
I imagine it is so it can remain dynamic. When you change the static XML configs, you need to trigger a reload (you already know this most likely). XML curl doesn't need this at the moment, but would if it cached the results indefinitely in memory. It becomes a tradeoff between efficiency and dynamic behaviour. It might be an interesting XML CURL option to have, but personally, I value having dynamic results higher. You could, however, introduce caching in your XML curl web service layer to introduce efficiency and scalability. On Fri, May 11, 2012 at 8:44 AM, Vik Killa <vipkilla@gmail.com> wrote:
Upon further investigation, it seems all directory parameters and attributes from static XML are stored in memory and can be accessed if XML_CURL fails. This is not true for any directory variables though. Is there a specific reason why FS does not store directory variables in memory when using XML_CURL?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org 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
I imagine it is so it can remain dynamic. When you change the static XML configs, you need to trigger a reload (you already know this most likely). After I modify the static XML and do reloadxml, if XML_CURL is still binding to directory and the request fails, the directory variables are still not read from the static XML. I understand the differences and trade-offs between the two. What I'm trying to accomplish is a HA solution that does not need to rely on XML_CURL 100%. In other words, if XML_CURL fails for some reason, all the XML will be close to up-to-date (maybe reloadxml every night?) static in memory. For some reason, the directory parameters and attributes as well as the entire dialplan will work from static XML if XML_CURL fails but not the directory variables.
Ah, I misunderstood - how, I don't know. :) This sounds like something appropriate to enter as a JIRA maybe? On Fri, May 11, 2012 at 10:53 AM, Vik Killa <vipkilla@gmail.com> wrote:
I imagine it is so it can remain dynamic. When you change the static XML configs, you need to trigger a reload (you already know this most likely). After I modify the static XML and do reloadxml, if XML_CURL is still binding to directory and the request fails, the directory variables are still not read from the static XML. I understand the differences and trade-offs between the two. What I'm trying to accomplish is a HA solution that does not need to rely on XML_CURL 100%. In other words, if XML_CURL fails for some reason, all the XML will be close to up-to-date (maybe reloadxml every night?) static in memory. For some reason, the directory parameters and attributes as well as the entire dialplan will work from static XML if XML_CURL fails but not the directory variables.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org 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
participants (2)
-
James
-
Vik Killa