ReloadXML takes very long time
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
I don't understand why you don't use mod_xml_curl, can you explain more? you could also try some lua binding which could pull from DB and generate XML on demand, not sure if it works for you. -- Seven Du Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, October 23, 2012 at 8:56 AM, Yiftach Golan wrote:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (mailto: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 (mailto: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
Hi Seven, Thanks for the reply I have two problems with the mod_xml_curl : 1. We want to have some kind of caching mechanism so that if FreeSWITCH crushes and there is no connection to the web server FreeSWITCH still works (we are in a cloud environment) If I understand correctly with mod_xml_curl we cannot achieve that 2. How would it work from the lua script ? Can I reloadxml from lua file by file? 3. We already have a very complicated xml structure to support all of our feature so probably converting the xmls will be pretty hard tasks Any ideas? On Tue, Oct 23, 2012 at 12:17 AM, Seven Du <dujinfang@gmail.com> wrote:
I don't understand why you don't use mod_xml_curl, can you explain more?
you could also try some lua binding which could pull from DB and generate XML on demand, not sure if it works for you.
-- Seven Du Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
On Tuesday, October 23, 2012 at 8:56 AM, Yiftach Golan wrote:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ 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
_________________________________________________________________________ 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
The philosophy on xml_curl is to leverage the resilience of existing http clusters so the complexity is left to that component. You have some choices: 1) Use the xml_curl and DB on the local box itself so you can not worry about losing connections to a db. 2) Use the xml dp file feature where you set the dialplan to XML:/path/to/file.xml which is same format of what xml_curl returns and is static. 3) Write an XML hook module in C using the same technique as xml_curl that takes the search params and chooses the correct static files to parse. 4) Clean up your patch and try to get it into HEAD without breaking anything. I would like to implement caching too but the challenge is you need to know which of the 100 input fields are relevant to the results returned so you can key the cache on those specific params. I recommend you make sure you fully understand all of the above choices and make some educated decisions about what you want to do before you turn to surgery on the core of FS. On Tue, Oct 23, 2012 at 10:53 AM, Yiftach Golan <yiftah@choochee.com> wrote:
Hi Seven, Thanks for the reply I have two problems with the mod_xml_curl : 1. We want to have some kind of caching mechanism so that if FreeSWITCH crushes and there is no connection to the web server FreeSWITCH still works (we are in a cloud environment) If I understand correctly with mod_xml_curl we cannot achieve that 2. How would it work from the lua script ? Can I reloadxml from lua file by file? 3. We already have a very complicated xml structure to support all of our feature so probably converting the xmls will be pretty hard tasks Any ideas?
On Tue, Oct 23, 2012 at 12:17 AM, Seven Du <dujinfang@gmail.com> wrote:
I don't understand why you don't use mod_xml_curl, can you explain more?
you could also try some lua binding which could pull from DB and generate XML on demand, not sure if it works for you.
-- Seven Du Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
On Tuesday, October 23, 2012 at 8:56 AM, Yiftach Golan wrote:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
on user directory that we do have caching (using the cacheable attribute), does it support expiration time, if not how hard would it be to implement that? On 10/23/2012 2:01 PM, Anthony Minessale wrote:
The philosophy on xml_curl is to leverage the resilience of existing http clusters so the complexity is left to that component. You have some choices:
1) Use the xml_curl and DB on the local box itself so you can not worry about losing connections to a db. 2) Use the xml dp file feature where you set the dialplan to XML:/path/to/file.xml which is same format of what xml_curl returns and is static. 3) Write an XML hook module in C using the same technique as xml_curl that takes the search params and chooses the correct static files to parse. 4) Clean up your patch and try to get it into HEAD without breaking anything.
I would like to implement caching too but the challenge is you need to know which of the 100 input fields are relevant to the results returned so you can key the cache on those specific params.
I recommend you make sure you fully understand all of the above choices and make some educated decisions about what you want to do before you turn to surgery on the core of FS.
On Tue, Oct 23, 2012 at 10:53 AM, Yiftach Golan <yiftah@choochee.com <mailto:yiftah@choochee.com>> wrote:
Hi Seven, Thanks for the reply I have two problems with the mod_xml_curl : 1. We want to have some kind of caching mechanism so that if FreeSWITCH crushes and there is no connection to the web server FreeSWITCH still works (we are in a cloud environment) If I understand correctly with mod_xml_curl we cannot achieve that 2. How would it work from the lua script ? Can I reloadxml from lua file by file? 3. We already have a very complicated xml structure to support all of our feature so probably converting the xmls will be pretty hard tasks Any ideas?
On Tue, Oct 23, 2012 at 12:17 AM, Seven Du <dujinfang@gmail.com <mailto:dujinfang@gmail.com>> wrote:
I don't understand why you don't use mod_xml_curl, can you explain more?
you could also try some lua binding which could pull from DB and generate XML on demand, not sure if it works for you.
-- Seven Du Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
On Tuesday, October 23, 2012 at 8:56 AM, Yiftach Golan wrote:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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 <mailto: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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net <http://irc.freenode.net> #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
_________________________________________________________________________ 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
In our method the caching that we made is based on a file when someone wants to load a file we just run :
reloadxml "<file_name.xml>" I am keeping the aggregated XML inside the memory in a pre allocated area, and before and after each file I put an xml note : <!-- TENANT_START_FILE_PATH = /opt/freeswitch/conf/autoload_configs/jingle_profiles/client.xml --> and in the end <!-- TENANT_EXIT_FILE_PATH = /opt/freeswitch/conf/autoload_configs/jingle_profiles/client.xml --> When the user wants to load "/opt/freeswitch/conf/autoload_configs/jingle_profiles/client.xml" I just search for this file in the memory replace the content and then let the regular xml parser do its work I will try the other options and if they give a better solution I will just use them if not I will add our changes to the HEAD Thanks, Yiftach.
On Tue, Oct 23, 2012 at 11:01 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The philosophy on xml_curl is to leverage the resilience of existing http clusters so the complexity is left to that component. You have some choices:
1) Use the xml_curl and DB on the local box itself so you can not worry about losing connections to a db. 2) Use the xml dp file feature where you set the dialplan to XML:/path/to/file.xml which is same format of what xml_curl returns and is static. 3) Write an XML hook module in C using the same technique as xml_curl that takes the search params and chooses the correct static files to parse. 4) Clean up your patch and try to get it into HEAD without breaking anything.
I would like to implement caching too but the challenge is you need to know which of the 100 input fields are relevant to the results returned so you can key the cache on those specific params.
I recommend you make sure you fully understand all of the above choices and make some educated decisions about what you want to do before you turn to surgery on the core of FS.
On Tue, Oct 23, 2012 at 10:53 AM, Yiftach Golan <yiftah@choochee.com>wrote:
Hi Seven, Thanks for the reply I have two problems with the mod_xml_curl : 1. We want to have some kind of caching mechanism so that if FreeSWITCH crushes and there is no connection to the web server FreeSWITCH still works (we are in a cloud environment) If I understand correctly with mod_xml_curl we cannot achieve that 2. How would it work from the lua script ? Can I reloadxml from lua file by file? 3. We already have a very complicated xml structure to support all of our feature so probably converting the xmls will be pretty hard tasks Any ideas?
On Tue, Oct 23, 2012 at 12:17 AM, Seven Du <dujinfang@gmail.com> wrote:
I don't understand why you don't use mod_xml_curl, can you explain more?
you could also try some lua binding which could pull from DB and generate XML on demand, not sure if it works for you.
-- Seven Du Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
On Tuesday, October 23, 2012 at 8:56 AM, Yiftach Golan wrote:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement. 2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ 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
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu> wrote:
I'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement.
2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place. I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general. On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com> wrote:
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow
On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu> wrote:
I'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement.
2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place.
I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general.
On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote:
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow
On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu> wrote:
I'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement.
2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it. On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com> wrote:
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD
On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place.
I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general.
On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote:
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow
On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu> wrote:
I'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement.
2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
OK I will do so On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD
On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place.
I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general.
On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote:
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow
On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu> wrote:
I'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement.
2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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 merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s # time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach. On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com> wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD
On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place.
I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general.
On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote:
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow
On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote:
I'm not an expert ( correct me if I'm wrong ) but I suppose the xml config memory section is locked while the files are proccessed so other modules are waiting for it. Instead of loading just one file you could continue to load all the files into somekind of a new temporary config section without locking the main. Once the files are loaded and processed the temporary and main section could be swapped or the temporary is used and the other is deleted from memory. No idea how many time this could take to implement.
2012-10-23 02:56 keltezéssel, Yiftach Golan írta:
Hi FreeSWITCH community, My name is Yiftah and I am working for ChooChee which is a hosted PBX solution company We have been using FreeSWITCH for almost 2 years and we added a lot of code changes to the core and to the different modules Lately we have made a decision to get more close to the community so that we can enjoy the bug fixes and the new feature from the community and we can contribute our knowledge and bug fixes I would please like to start with a very basic question : We are using dialplan xmls in order to load the configuration, we have a lot of users on each freeswitch (+4k), it took a very long time for the configuration to load (around 5 minutes) during this time no new calls could be served by FreeSWITCH In order to solve this problem we introduce reload xml that accepts file names and has the ability to load just one file name into the memory (we achieved 10ms loading time instead of 5 minutes) The problem is that we had to introduce a lot of code in order to solve this problem, has anyone else encounter this problem? we do not want to use mod_xml_curl as we want to take care bringing the file to the machine Another approach that we thought is that a database might be much better fit in here, because every xml update includes the entire tenant (business) and has the potential in harming other users in the same tenant, also DB has much higher capacities then XMLs, did anyone think of enabling MySQL as a directory of parameters instead of xml? Thanks, Yiftach.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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 thought you were going to move it to be a module? On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com> wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD
On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place.
I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general.
On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote:
You may be able to develop it as well but it will not solve our problem of pushing configuration fast We have a front end that pushes the configuration changes and it needs to be fast, so even if we change it in the background it will be slow
On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote:
> > I'm not an expert ( correct me if I'm wrong ) but I suppose the xml > config memory section is locked while the files are proccessed so other > modules are waiting for it. Instead of loading just one file you could > continue to load all the files into somekind of a new temporary config > section without locking the main. Once the files are loaded and processed > the temporary and main section could be swapped or the temporary is used > and the other is deleted from memory. No idea how many time this could take > to implement. > > > 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: > > Hi FreeSWITCH community, > My name is Yiftah and I am working for ChooChee which is a hosted > PBX solution company > We have been using FreeSWITCH for almost 2 years and we added a lot > of code changes to the core and to the different modules > Lately we have made a decision to get more close to the community so > that we can enjoy the bug fixes and the new feature from the community and > we can contribute our knowledge and bug fixes > I would please like to start with a very basic question : > We are using dialplan xmls in order to load the configuration, we > have a lot of users on each freeswitch (+4k), it took a very long time for > the configuration to load (around 5 minutes) during this time no new calls > could be served by FreeSWITCH > In order to solve this problem we introduce reload xml that accepts > file names and has the ability to load just one file name into the memory > (we achieved 10ms loading time instead of 5 minutes) > The problem is that we had to introduce a lot of code in order to > solve this problem, has anyone else encounter this problem? we do not want > to use mod_xml_curl as we want to take care bringing the file to the > machine > Another approach that we thought is that a database might be much > better fit in here, because every xml update includes the entire tenant > (business) and has the potential in harming other users in the same tenant, > also DB has much higher capacities then XMLs, did anyone think of enabling > MySQL as a directory of parameters instead of xml? > Thanks, > Yiftach. > > > > _________________________________________________________________________ > Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com > > FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com > > Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com > > FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... > > > > > _________________________________________________________________________ > 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 > >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD
On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
The man xml registry is already reloaded using the method described. In fact the xml root has reference counting and everyone who was on the old one will be able to hold on to that root until they release it even when a new one has been loaded into place.
I think if you pursue the custom C module with the XML hook, that you can put your same logic into a module and not bother the core as any access to the core xml will be redirected to your module callback where you can do whatever you want and not disturb the core of FS unless you have some kind of functionality that is useful to everyone in general.
On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote:
> You may be able to develop it as well but it will not solve our > problem of pushing configuration fast > We have a front end that pushes the configuration changes and it > needs to be fast, so even if we change it in the background it will be slow > > On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: > >> >> I'm not an expert ( correct me if I'm wrong ) but I suppose the xml >> config memory section is locked while the files are proccessed so other >> modules are waiting for it. Instead of loading just one file you could >> continue to load all the files into somekind of a new temporary config >> section without locking the main. Once the files are loaded and processed >> the temporary and main section could be swapped or the temporary is used >> and the other is deleted from memory. No idea how many time this could take >> to implement. >> >> >> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >> >> Hi FreeSWITCH community, >> My name is Yiftah and I am working for ChooChee which is a hosted >> PBX solution company >> We have been using FreeSWITCH for almost 2 years and we added a lot >> of code changes to the core and to the different modules >> Lately we have made a decision to get more close to the community >> so that we can enjoy the bug fixes and the new feature from the community >> and we can contribute our knowledge and bug fixes >> I would please like to start with a very basic question : >> We are using dialplan xmls in order to load the configuration, we >> have a lot of users on each freeswitch (+4k), it took a very long time for >> the configuration to load (around 5 minutes) during this time no new calls >> could be served by FreeSWITCH >> In order to solve this problem we introduce reload xml that accepts >> file names and has the ability to load just one file name into the memory >> (we achieved 10ms loading time instead of 5 minutes) >> The problem is that we had to introduce a lot of code in order to >> solve this problem, has anyone else encounter this problem? we do not want >> to use mod_xml_curl as we want to take care bringing the file to the >> machine >> Another approach that we thought is that a database might be much >> better fit in here, because every xml update includes the entire tenant >> (business) and has the potential in harming other users in the same tenant, >> also DB has much higher capacities then XMLs, did anyone think of enabling >> MySQL as a directory of parameters instead of xml? >> Thanks, >> Yiftach. >> >> >> >> _________________________________________________________________________ >> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >> >> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >> >> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >> >> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >> >> >> >> >> _________________________________________________________________________ >> 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 >> >> > > > _________________________________________________________________________ > 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 > >
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
Can you git diff it and post it to JIRA so we can have some people look at it and test? On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com> wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
Yes I agree, I can solve it this way for me, if anyone else in the community is looking for a very fast way of loading a specific file from the "reloadxml" command I can update it to the HEAD
On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
> The man xml registry is already reloaded using the method described. > In fact the xml root has reference counting and everyone who was on the > old one will be able to hold on to that root until they release it even > when a new one has been loaded into place. > > I think if you pursue the custom C module with the XML hook, that > you can put your same logic into a module and not bother the core as any > access to the core xml will be redirected to your module callback where you > can do whatever you want and not disturb the core of FS unless you have > some kind of functionality that is useful to everyone in general. > > > > > On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com>wrote: > >> You may be able to develop it as well but it will not solve our >> problem of pushing configuration fast >> We have a front end that pushes the configuration changes and it >> needs to be fast, so even if we change it in the background it will be slow >> >> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >> >>> >>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>> xml config memory section is locked while the files are proccessed so other >>> modules are waiting for it. Instead of loading just one file you could >>> continue to load all the files into somekind of a new temporary config >>> section without locking the main. Once the files are loaded and processed >>> the temporary and main section could be swapped or the temporary is used >>> and the other is deleted from memory. No idea how many time this could take >>> to implement. >>> >>> >>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>> >>> Hi FreeSWITCH community, >>> My name is Yiftah and I am working for ChooChee which is a hosted >>> PBX solution company >>> We have been using FreeSWITCH for almost 2 years and we added a >>> lot of code changes to the core and to the different modules >>> Lately we have made a decision to get more close to the community >>> so that we can enjoy the bug fixes and the new feature from the community >>> and we can contribute our knowledge and bug fixes >>> I would please like to start with a very basic question : >>> We are using dialplan xmls in order to load the configuration, we >>> have a lot of users on each freeswitch (+4k), it took a very long time for >>> the configuration to load (around 5 minutes) during this time no new calls >>> could be served by FreeSWITCH >>> In order to solve this problem we introduce reload xml that >>> accepts file names and has the ability to load just one file name into the >>> memory (we achieved 10ms loading time instead of 5 minutes) >>> The problem is that we had to introduce a lot of code in order to >>> solve this problem, has anyone else encounter this problem? we do not want >>> to use mod_xml_curl as we want to take care bringing the file to the >>> machine >>> Another approach that we thought is that a database might be much >>> better fit in here, because every xml update includes the entire tenant >>> (business) and has the potential in harming other users in the same tenant, >>> also DB has much higher capacities then XMLs, did anyone think of enabling >>> MySQL as a directory of parameters instead of xml? >>> Thanks, >>> Yiftach. >>> >>> >>> >>> _________________________________________________________________________ >>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>> >>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>> >>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>> >>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>> >>> >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> _________________________________________________________________________ >> 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 >> >> > > > -- > Anthony Minessale II > > FreeSWITCH http://www.freeswitch.org/ > ClueCon http://www.cluecon.com/ > Twitter: http://twitter.com/FreeSWITCH_wire > > AIM: anthm > MSN:anthony_minessale@hotmail.com > GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com > IRC: irc.freenode.net #freeswitch > > FreeSWITCH Developer Conference > sip:888@conference.freeswitch.org > googletalk:conf+888@conference.freeswitch.org > pstn:+19193869900 > > > _________________________________________________________________________ > 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 > >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Yes I will do so On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
> Yes I agree, I can solve it this way for me, if anyone else in the > community is looking for a very fast way of loading a specific file from > the "reloadxml" command I can update it to the HEAD > > > On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < > anthony.minessale@gmail.com> wrote: > >> The man xml registry is already reloaded using the method >> described. In fact the xml root has reference counting and everyone who >> was on the old one will be able to hold on to that root until they release >> it even when a new one has been loaded into place. >> >> I think if you pursue the custom C module with the XML hook, that >> you can put your same logic into a module and not bother the core as any >> access to the core xml will be redirected to your module callback where you >> can do whatever you want and not disturb the core of FS unless you have >> some kind of functionality that is useful to everyone in general. >> >> >> >> >> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com >> > wrote: >> >>> You may be able to develop it as well but it will not solve our >>> problem of pushing configuration fast >>> We have a front end that pushes the configuration changes and it >>> needs to be fast, so even if we change it in the background it will be slow >>> >>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >>> >>>> >>>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>>> xml config memory section is locked while the files are proccessed so other >>>> modules are waiting for it. Instead of loading just one file you could >>>> continue to load all the files into somekind of a new temporary config >>>> section without locking the main. Once the files are loaded and processed >>>> the temporary and main section could be swapped or the temporary is used >>>> and the other is deleted from memory. No idea how many time this could take >>>> to implement. >>>> >>>> >>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>> >>>> Hi FreeSWITCH community, >>>> My name is Yiftah and I am working for ChooChee which is a hosted >>>> PBX solution company >>>> We have been using FreeSWITCH for almost 2 years and we added a >>>> lot of code changes to the core and to the different modules >>>> Lately we have made a decision to get more close to the community >>>> so that we can enjoy the bug fixes and the new feature from the community >>>> and we can contribute our knowledge and bug fixes >>>> I would please like to start with a very basic question : >>>> We are using dialplan xmls in order to load the configuration, we >>>> have a lot of users on each freeswitch (+4k), it took a very long time for >>>> the configuration to load (around 5 minutes) during this time no new calls >>>> could be served by FreeSWITCH >>>> In order to solve this problem we introduce reload xml that >>>> accepts file names and has the ability to load just one file name into the >>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>> The problem is that we had to introduce a lot of code in order to >>>> solve this problem, has anyone else encounter this problem? we do not want >>>> to use mod_xml_curl as we want to take care bringing the file to the >>>> machine >>>> Another approach that we thought is that a database might be much >>>> better fit in here, because every xml update includes the entire tenant >>>> (business) and has the potential in harming other users in the same tenant, >>>> also DB has much higher capacities then XMLs, did anyone think of enabling >>>> MySQL as a directory of parameters instead of xml? >>>> Thanks, >>>> Yiftach. >>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>> >>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>> >>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>> >>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>> >>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> -- >> Anthony Minessale II >> >> FreeSWITCH http://www.freeswitch.org/ >> ClueCon http://www.cluecon.com/ >> Twitter: http://twitter.com/FreeSWITCH_wire >> >> AIM: anthm >> MSN:anthony_minessale@hotmail.com >> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >> IRC: irc.freenode.net #freeswitch >> >> FreeSWITCH Developer Conference >> sip:888@conference.freeswitch.org >> googletalk:conf+888@conference.freeswitch.org >> pstn:+19193869900 >> >> >> _________________________________________________________________________ >> 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 >> >> > > > _________________________________________________________________________ > 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 > >
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already? Thanks, Yiftach. On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Also, if you design it cleanly and generic enough you can check the module itself into HEAD and maintain it yourself and others can choose to use it.
On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote:
> Yes I agree, I can solve it this way for me, if anyone else in the > community is looking for a very fast way of loading a specific file from > the "reloadxml" command I can update it to the HEAD > > > On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < > anthony.minessale@gmail.com> wrote: > >> The man xml registry is already reloaded using the method >> described. In fact the xml root has reference counting and everyone who >> was on the old one will be able to hold on to that root until they release >> it even when a new one has been loaded into place. >> >> I think if you pursue the custom C module with the XML hook, that >> you can put your same logic into a module and not bother the core as any >> access to the core xml will be redirected to your module callback where you >> can do whatever you want and not disturb the core of FS unless you have >> some kind of functionality that is useful to everyone in general. >> >> >> >> >> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan <yiftah@choochee.com >> > wrote: >> >>> You may be able to develop it as well but it will not solve our >>> problem of pushing configuration fast >>> We have a front end that pushes the configuration changes and it >>> needs to be fast, so even if we change it in the background it will be slow >>> >>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >>> >>>> >>>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>>> xml config memory section is locked while the files are proccessed so other >>>> modules are waiting for it. Instead of loading just one file you could >>>> continue to load all the files into somekind of a new temporary config >>>> section without locking the main. Once the files are loaded and processed >>>> the temporary and main section could be swapped or the temporary is used >>>> and the other is deleted from memory. No idea how many time this could take >>>> to implement. >>>> >>>> >>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>> >>>> Hi FreeSWITCH community, >>>> My name is Yiftah and I am working for ChooChee which is a hosted >>>> PBX solution company >>>> We have been using FreeSWITCH for almost 2 years and we added a >>>> lot of code changes to the core and to the different modules >>>> Lately we have made a decision to get more close to the community >>>> so that we can enjoy the bug fixes and the new feature from the community >>>> and we can contribute our knowledge and bug fixes >>>> I would please like to start with a very basic question : >>>> We are using dialplan xmls in order to load the configuration, we >>>> have a lot of users on each freeswitch (+4k), it took a very long time for >>>> the configuration to load (around 5 minutes) during this time no new calls >>>> could be served by FreeSWITCH >>>> In order to solve this problem we introduce reload xml that >>>> accepts file names and has the ability to load just one file name into the >>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>> The problem is that we had to introduce a lot of code in order to >>>> solve this problem, has anyone else encounter this problem? we do not want >>>> to use mod_xml_curl as we want to take care bringing the file to the >>>> machine >>>> Another approach that we thought is that a database might be much >>>> better fit in here, because every xml update includes the entire tenant >>>> (business) and has the potential in harming other users in the same tenant, >>>> also DB has much higher capacities then XMLs, did anyone think of enabling >>>> MySQL as a directory of parameters instead of xml? >>>> Thanks, >>>> Yiftach. >>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>> >>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>> >>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>> >>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>> >>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> -- >> Anthony Minessale II >> >> FreeSWITCH http://www.freeswitch.org/ >> ClueCon http://www.cluecon.com/ >> Twitter: http://twitter.com/FreeSWITCH_wire >> >> AIM: anthm >> MSN:anthony_minessale@hotmail.com >> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >> IRC: irc.freenode.net #freeswitch >> >> FreeSWITCH Developer Conference >> sip:888@conference.freeswitch.org >> googletalk:conf+888@conference.freeswitch.org >> pstn:+19193869900 >> >> >> _________________________________________________________________________ >> 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 >> >> > > > _________________________________________________________________________ > 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 > >
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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 do that via mod_odbc_query. http://wiki.freeswitch.org/wiki/Mod_odbc_query It does a query and loads the result (only supports 1 row, I think) as a chan variable, which you can then use. -Avi On Fri, Oct 26, 2012 at 2:04 AM, Yiftach Golan <yiftah@choochee.com> wrote:
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement
I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already?
Thanks, Yiftach.
On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
> Also, if you design it cleanly and generic enough you can check the > module itself into HEAD and maintain it yourself and others can choose to > use it. > > > On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote: > >> Yes I agree, I can solve it this way for me, if anyone else in the >> community is looking for a very fast way of loading a specific file from >> the "reloadxml" command I can update it to the HEAD >> >> >> On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < >> anthony.minessale@gmail.com> wrote: >> >>> The man xml registry is already reloaded using the method >>> described. In fact the xml root has reference counting and everyone who >>> was on the old one will be able to hold on to that root until they release >>> it even when a new one has been loaded into place. >>> >>> I think if you pursue the custom C module with the XML hook, that >>> you can put your same logic into a module and not bother the core as any >>> access to the core xml will be redirected to your module callback where you >>> can do whatever you want and not disturb the core of FS unless you have >>> some kind of functionality that is useful to everyone in general. >>> >>> >>> >>> >>> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan < >>> yiftah@choochee.com> wrote: >>> >>>> You may be able to develop it as well but it will not solve our >>>> problem of pushing configuration fast >>>> We have a front end that pushes the configuration changes and it >>>> needs to be fast, so even if we change it in the background it will be slow >>>> >>>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >>>> >>>>> >>>>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>>>> xml config memory section is locked while the files are proccessed so other >>>>> modules are waiting for it. Instead of loading just one file you could >>>>> continue to load all the files into somekind of a new temporary config >>>>> section without locking the main. Once the files are loaded and processed >>>>> the temporary and main section could be swapped or the temporary is used >>>>> and the other is deleted from memory. No idea how many time this could take >>>>> to implement. >>>>> >>>>> >>>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>>> >>>>> Hi FreeSWITCH community, >>>>> My name is Yiftah and I am working for ChooChee which is a >>>>> hosted PBX solution company >>>>> We have been using FreeSWITCH for almost 2 years and we added a >>>>> lot of code changes to the core and to the different modules >>>>> Lately we have made a decision to get more close to the >>>>> community so that we can enjoy the bug fixes and the new feature from the >>>>> community and we can contribute our knowledge and bug fixes >>>>> I would please like to start with a very basic question : >>>>> We are using dialplan xmls in order to load the configuration, >>>>> we have a lot of users on each freeswitch (+4k), it took a very long time >>>>> for the configuration to load (around 5 minutes) during this time no new >>>>> calls could be served by FreeSWITCH >>>>> In order to solve this problem we introduce reload xml that >>>>> accepts file names and has the ability to load just one file name into the >>>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>>> The problem is that we had to introduce a lot of code in order >>>>> to solve this problem, has anyone else encounter this problem? we do not >>>>> want to use mod_xml_curl as we want to take care bringing the file to the >>>>> machine >>>>> Another approach that we thought is that a database might be >>>>> much better fit in here, because every xml update includes the entire >>>>> tenant (business) and has the potential in harming other users in the same >>>>> tenant, also DB has much higher capacities then XMLs, did anyone think of >>>>> enabling MySQL as a directory of parameters instead of xml? >>>>> Thanks, >>>>> Yiftach. >>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>>> >>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>>> >>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>>> >>>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>>> >>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> -- >>> Anthony Minessale II >>> >>> FreeSWITCH http://www.freeswitch.org/ >>> ClueCon http://www.cluecon.com/ >>> Twitter: http://twitter.com/FreeSWITCH_wire >>> >>> AIM: anthm >>> MSN:anthony_minessale@hotmail.com >>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>> IRC: irc.freenode.net #freeswitch >>> >>> FreeSWITCH Developer Conference >>> sip:888@conference.freeswitch.org >>> googletalk:conf+888@conference.freeswitch.org >>> pstn:+19193869900 >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> _________________________________________________________________________ >> 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 >> >> > > > -- > Anthony Minessale II > > FreeSWITCH http://www.freeswitch.org/ > ClueCon http://www.cluecon.com/ > Twitter: http://twitter.com/FreeSWITCH_wire > > AIM: anthm > MSN:anthony_minessale@hotmail.com > GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com > IRC: irc.freenode.net #freeswitch > > FreeSWITCH Developer Conference > sip:888@conference.freeswitch.org > googletalk:conf+888@conference.freeswitch.org > pstn:+19193869900 > > > _________________________________________________________________________ > 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 > >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
Have you used it for directory as well ? <variable name="outbound_caller_id_number" value="SELECT outbound_caller_id_number FROM directory WHERE domain = ${domain} AND user = ${user}"/> On Thu, Oct 25, 2012 at 5:11 PM, Avi Marcus <avi@avimarcus.net> wrote:
I do that via mod_odbc_query. http://wiki.freeswitch.org/wiki/Mod_odbc_query
It does a query and loads the result (only supports 1 row, I think) as a chan variable, which you can then use.
-Avi
On Fri, Oct 26, 2012 at 2:04 AM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement
I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already?
Thanks, Yiftach.
On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
> OK I will do so > > On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < > anthony.minessale@gmail.com> wrote: > >> Also, if you design it cleanly and generic enough you can check the >> module itself into HEAD and maintain it yourself and others can choose to >> use it. >> >> >> On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com >> > wrote: >> >>> Yes I agree, I can solve it this way for me, if anyone else in the >>> community is looking for a very fast way of loading a specific file from >>> the "reloadxml" command I can update it to the HEAD >>> >>> >>> On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < >>> anthony.minessale@gmail.com> wrote: >>> >>>> The man xml registry is already reloaded using the method >>>> described. In fact the xml root has reference counting and everyone who >>>> was on the old one will be able to hold on to that root until they release >>>> it even when a new one has been loaded into place. >>>> >>>> I think if you pursue the custom C module with the XML hook, that >>>> you can put your same logic into a module and not bother the core as any >>>> access to the core xml will be redirected to your module callback where you >>>> can do whatever you want and not disturb the core of FS unless you have >>>> some kind of functionality that is useful to everyone in general. >>>> >>>> >>>> >>>> >>>> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan < >>>> yiftah@choochee.com> wrote: >>>> >>>>> You may be able to develop it as well but it will not solve our >>>>> problem of pushing configuration fast >>>>> We have a front end that pushes the configuration changes and it >>>>> needs to be fast, so even if we change it in the background it will be slow >>>>> >>>>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >>>>> >>>>>> >>>>>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>>>>> xml config memory section is locked while the files are proccessed so other >>>>>> modules are waiting for it. Instead of loading just one file you could >>>>>> continue to load all the files into somekind of a new temporary config >>>>>> section without locking the main. Once the files are loaded and processed >>>>>> the temporary and main section could be swapped or the temporary is used >>>>>> and the other is deleted from memory. No idea how many time this could take >>>>>> to implement. >>>>>> >>>>>> >>>>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>>>> >>>>>> Hi FreeSWITCH community, >>>>>> My name is Yiftah and I am working for ChooChee which is a >>>>>> hosted PBX solution company >>>>>> We have been using FreeSWITCH for almost 2 years and we added a >>>>>> lot of code changes to the core and to the different modules >>>>>> Lately we have made a decision to get more close to the >>>>>> community so that we can enjoy the bug fixes and the new feature from the >>>>>> community and we can contribute our knowledge and bug fixes >>>>>> I would please like to start with a very basic question : >>>>>> We are using dialplan xmls in order to load the configuration, >>>>>> we have a lot of users on each freeswitch (+4k), it took a very long time >>>>>> for the configuration to load (around 5 minutes) during this time no new >>>>>> calls could be served by FreeSWITCH >>>>>> In order to solve this problem we introduce reload xml that >>>>>> accepts file names and has the ability to load just one file name into the >>>>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>>>> The problem is that we had to introduce a lot of code in order >>>>>> to solve this problem, has anyone else encounter this problem? we do not >>>>>> want to use mod_xml_curl as we want to take care bringing the file to the >>>>>> machine >>>>>> Another approach that we thought is that a database might be >>>>>> much better fit in here, because every xml update includes the entire >>>>>> tenant (business) and has the potential in harming other users in the same >>>>>> tenant, also DB has much higher capacities then XMLs, did anyone think of >>>>>> enabling MySQL as a directory of parameters instead of xml? >>>>>> Thanks, >>>>>> Yiftach. >>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________________________________ >>>>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>>>> >>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>>>> >>>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>>>> >>>>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> -- >>>> Anthony Minessale II >>>> >>>> FreeSWITCH http://www.freeswitch.org/ >>>> ClueCon http://www.cluecon.com/ >>>> Twitter: http://twitter.com/FreeSWITCH_wire >>>> >>>> AIM: anthm >>>> MSN:anthony_minessale@hotmail.com >>>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>>> IRC: irc.freenode.net #freeswitch >>>> >>>> FreeSWITCH Developer Conference >>>> sip:888@conference.freeswitch.org >>>> googletalk:conf+888@conference.freeswitch.org >>>> pstn:+19193869900 >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> -- >> Anthony Minessale II >> >> FreeSWITCH http://www.freeswitch.org/ >> ClueCon http://www.cluecon.com/ >> Twitter: http://twitter.com/FreeSWITCH_wire >> >> AIM: anthm >> MSN:anthony_minessale@hotmail.com >> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >> IRC: irc.freenode.net #freeswitch >> >> FreeSWITCH Developer Conference >> sip:888@conference.freeswitch.org >> googletalk:conf+888@conference.freeswitch.org >> pstn:+19193869900 >> >> >> _________________________________________________________________________ >> 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 >> >> >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
_________________________________________________________________________ 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 appreciate your patch but it looks very specific to your needs. I think you should stop and join the community and learn the philosophy behind how things work and learn how to make a module. You are breaking holes in the wall to get through because you are not seeing the door. I really think you should understand how the xml hooks or dialplan modules work and how to actually scale things in FreeSWITCH. Join IRC and call the weekly call and maybe study the wiki. On Thu, Oct 25, 2012 at 7:04 PM, Yiftach Golan <yiftah@choochee.com> wrote:
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement
I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already?
Thanks, Yiftach.
On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I will do so
On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
> Also, if you design it cleanly and generic enough you can check the > module itself into HEAD and maintain it yourself and others can choose to > use it. > > > On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com>wrote: > >> Yes I agree, I can solve it this way for me, if anyone else in the >> community is looking for a very fast way of loading a specific file from >> the "reloadxml" command I can update it to the HEAD >> >> >> On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < >> anthony.minessale@gmail.com> wrote: >> >>> The man xml registry is already reloaded using the method >>> described. In fact the xml root has reference counting and everyone who >>> was on the old one will be able to hold on to that root until they release >>> it even when a new one has been loaded into place. >>> >>> I think if you pursue the custom C module with the XML hook, that >>> you can put your same logic into a module and not bother the core as any >>> access to the core xml will be redirected to your module callback where you >>> can do whatever you want and not disturb the core of FS unless you have >>> some kind of functionality that is useful to everyone in general. >>> >>> >>> >>> >>> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan < >>> yiftah@choochee.com> wrote: >>> >>>> You may be able to develop it as well but it will not solve our >>>> problem of pushing configuration fast >>>> We have a front end that pushes the configuration changes and it >>>> needs to be fast, so even if we change it in the background it will be slow >>>> >>>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >>>> >>>>> >>>>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>>>> xml config memory section is locked while the files are proccessed so other >>>>> modules are waiting for it. Instead of loading just one file you could >>>>> continue to load all the files into somekind of a new temporary config >>>>> section without locking the main. Once the files are loaded and processed >>>>> the temporary and main section could be swapped or the temporary is used >>>>> and the other is deleted from memory. No idea how many time this could take >>>>> to implement. >>>>> >>>>> >>>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>>> >>>>> Hi FreeSWITCH community, >>>>> My name is Yiftah and I am working for ChooChee which is a >>>>> hosted PBX solution company >>>>> We have been using FreeSWITCH for almost 2 years and we added a >>>>> lot of code changes to the core and to the different modules >>>>> Lately we have made a decision to get more close to the >>>>> community so that we can enjoy the bug fixes and the new feature from the >>>>> community and we can contribute our knowledge and bug fixes >>>>> I would please like to start with a very basic question : >>>>> We are using dialplan xmls in order to load the configuration, >>>>> we have a lot of users on each freeswitch (+4k), it took a very long time >>>>> for the configuration to load (around 5 minutes) during this time no new >>>>> calls could be served by FreeSWITCH >>>>> In order to solve this problem we introduce reload xml that >>>>> accepts file names and has the ability to load just one file name into the >>>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>>> The problem is that we had to introduce a lot of code in order >>>>> to solve this problem, has anyone else encounter this problem? we do not >>>>> want to use mod_xml_curl as we want to take care bringing the file to the >>>>> machine >>>>> Another approach that we thought is that a database might be >>>>> much better fit in here, because every xml update includes the entire >>>>> tenant (business) and has the potential in harming other users in the same >>>>> tenant, also DB has much higher capacities then XMLs, did anyone think of >>>>> enabling MySQL as a directory of parameters instead of xml? >>>>> Thanks, >>>>> Yiftach. >>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>>> >>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>>> >>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>>> >>>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>>> >>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> -- >>> Anthony Minessale II >>> >>> FreeSWITCH http://www.freeswitch.org/ >>> ClueCon http://www.cluecon.com/ >>> Twitter: http://twitter.com/FreeSWITCH_wire >>> >>> AIM: anthm >>> MSN:anthony_minessale@hotmail.com >>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>> IRC: irc.freenode.net #freeswitch >>> >>> FreeSWITCH Developer Conference >>> sip:888@conference.freeswitch.org >>> googletalk:conf+888@conference.freeswitch.org >>> pstn:+19193869900 >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> _________________________________________________________________________ >> 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 >> >> > > > -- > Anthony Minessale II > > FreeSWITCH http://www.freeswitch.org/ > ClueCon http://www.cluecon.com/ > Twitter: http://twitter.com/FreeSWITCH_wire > > AIM: anthm > MSN:anthony_minessale@hotmail.com > GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com > IRC: irc.freenode.net #freeswitch > > FreeSWITCH Developer Conference > sip:888@conference.freeswitch.org > googletalk:conf+888@conference.freeswitch.org > pstn:+19193869900 > > > _________________________________________________________________________ > 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 > >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Yes it is kind specific to our needs, which is very fast loading of specific XML in big environments We have some experience with FreeSWITCH modules, we wrote the Voicemail module from scratch after the existing one did not fit our need I think on the FreeSWITCH clustering we were really struggling and this is were the scaling became very challenging for us Do you have any good document or reference on good practice to cluster FreeSWITCH, specifically cluster of FreeSWITCHes that can hold tenth of thousands of users in a single cluster? On Thu, Oct 25, 2012 at 7:05 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I appreciate your patch but it looks very specific to your needs.
I think you should stop and join the community and learn the philosophy behind how things work and learn how to make a module. You are breaking holes in the wall to get through because you are not seeing the door.
I really think you should understand how the xml hooks or dialplan modules work and how to actually scale things in FreeSWITCH.
Join IRC and call the weekly call and maybe study the wiki.
On Thu, Oct 25, 2012 at 7:04 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement
I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already?
Thanks, Yiftach.
On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
I merged my code to the HEAD here are the results (I yet checked in the code) : # time /opt/freeswitch/bin/fs_cli -x "reloadxml" +OK [Success] real *0m24.424s* user 0m0.000s sys 0m0.020s
# time /opt/freeswitch/bin/fs_cli -x "reloadxml /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" +OK [Success] real *0m0.315s* user 0m0.000s sys 0m0.010s
Looks like there is major improvement in the loading time How does it work, I just need to check in my code to the git? with my subscribe user? Thanks, Yiftach.
On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote:
> OK I will do so > > On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < > anthony.minessale@gmail.com> wrote: > >> Also, if you design it cleanly and generic enough you can check the >> module itself into HEAD and maintain it yourself and others can choose to >> use it. >> >> >> On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan <yiftah@choochee.com >> > wrote: >> >>> Yes I agree, I can solve it this way for me, if anyone else in the >>> community is looking for a very fast way of loading a specific file from >>> the "reloadxml" command I can update it to the HEAD >>> >>> >>> On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < >>> anthony.minessale@gmail.com> wrote: >>> >>>> The man xml registry is already reloaded using the method >>>> described. In fact the xml root has reference counting and everyone who >>>> was on the old one will be able to hold on to that root until they release >>>> it even when a new one has been loaded into place. >>>> >>>> I think if you pursue the custom C module with the XML hook, that >>>> you can put your same logic into a module and not bother the core as any >>>> access to the core xml will be redirected to your module callback where you >>>> can do whatever you want and not disturb the core of FS unless you have >>>> some kind of functionality that is useful to everyone in general. >>>> >>>> >>>> >>>> >>>> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan < >>>> yiftah@choochee.com> wrote: >>>> >>>>> You may be able to develop it as well but it will not solve our >>>>> problem of pushing configuration fast >>>>> We have a front end that pushes the configuration changes and it >>>>> needs to be fast, so even if we change it in the background it will be slow >>>>> >>>>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu>wrote: >>>>> >>>>>> >>>>>> I'm not an expert ( correct me if I'm wrong ) but I suppose the >>>>>> xml config memory section is locked while the files are proccessed so other >>>>>> modules are waiting for it. Instead of loading just one file you could >>>>>> continue to load all the files into somekind of a new temporary config >>>>>> section without locking the main. Once the files are loaded and processed >>>>>> the temporary and main section could be swapped or the temporary is used >>>>>> and the other is deleted from memory. No idea how many time this could take >>>>>> to implement. >>>>>> >>>>>> >>>>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>>>> >>>>>> Hi FreeSWITCH community, >>>>>> My name is Yiftah and I am working for ChooChee which is a >>>>>> hosted PBX solution company >>>>>> We have been using FreeSWITCH for almost 2 years and we added a >>>>>> lot of code changes to the core and to the different modules >>>>>> Lately we have made a decision to get more close to the >>>>>> community so that we can enjoy the bug fixes and the new feature from the >>>>>> community and we can contribute our knowledge and bug fixes >>>>>> I would please like to start with a very basic question : >>>>>> We are using dialplan xmls in order to load the configuration, >>>>>> we have a lot of users on each freeswitch (+4k), it took a very long time >>>>>> for the configuration to load (around 5 minutes) during this time no new >>>>>> calls could be served by FreeSWITCH >>>>>> In order to solve this problem we introduce reload xml that >>>>>> accepts file names and has the ability to load just one file name into the >>>>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>>>> The problem is that we had to introduce a lot of code in order >>>>>> to solve this problem, has anyone else encounter this problem? we do not >>>>>> want to use mod_xml_curl as we want to take care bringing the file to the >>>>>> machine >>>>>> Another approach that we thought is that a database might be >>>>>> much better fit in here, because every xml update includes the entire >>>>>> tenant (business) and has the potential in harming other users in the same >>>>>> tenant, also DB has much higher capacities then XMLs, did anyone think of >>>>>> enabling MySQL as a directory of parameters instead of xml? >>>>>> Thanks, >>>>>> Yiftach. >>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________________________________ >>>>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>>>> >>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>>>> >>>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>>>> >>>>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> -- >>>> Anthony Minessale II >>>> >>>> FreeSWITCH http://www.freeswitch.org/ >>>> ClueCon http://www.cluecon.com/ >>>> Twitter: http://twitter.com/FreeSWITCH_wire >>>> >>>> AIM: anthm >>>> MSN:anthony_minessale@hotmail.com >>>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>>> IRC: irc.freenode.net #freeswitch >>>> >>>> FreeSWITCH Developer Conference >>>> sip:888@conference.freeswitch.org >>>> googletalk:conf+888@conference.freeswitch.org >>>> pstn:+19193869900 >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> >> >> -- >> Anthony Minessale II >> >> FreeSWITCH http://www.freeswitch.org/ >> ClueCon http://www.cluecon.com/ >> Twitter: http://twitter.com/FreeSWITCH_wire >> >> AIM: anthm >> MSN:anthony_minessale@hotmail.com >> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >> IRC: irc.freenode.net #freeswitch >> >> FreeSWITCH Developer Conference >> sip:888@conference.freeswitch.org >> googletalk:conf+888@conference.freeswitch.org >> pstn:+19193869900 >> >> >> _________________________________________________________________________ >> 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 >> >> >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
That is why I keep mentioning the XML hooks. This is exactly what it's for. When you have an xml hook every single request to the xml document can be hooked into and your custom callback function is called with every search param allowing you to dynamically find the right xml and return it on-the-fly. This way you don't need to manage a giant root of XML for user data. Try looking at it from further back. You can even make an xml hook module that uses a database directly and builds binary xml structures and returns them without them ever having to exist as text. With combinations of the C interfaces like dialplan app, dialplan module, xml_hooks and the like you can scale to any size. Anyway, I do understand the point of the xml patch, I am very concerned about the stability of the xml parser with that patch you made applied. The entire design of FreeSWITCH is based around allowing you to extend it through modules and hooks. If you can find a hook that is missing that is a much more compelling case than modifying the core for multi-home configurations which is not a primary purpose of the software. I don't know if you even care about my advice but I assume since you came here asking for it that you want me to continue to help you understand the right direction to take. On Fri, Oct 26, 2012 at 12:23 AM, Yiftach Golan <yiftah@choochee.com> wrote:
Yes it is kind specific to our needs, which is very fast loading of specific XML in big environments We have some experience with FreeSWITCH modules, we wrote the Voicemail module from scratch after the existing one did not fit our need I think on the FreeSWITCH clustering we were really struggling and this is were the scaling became very challenging for us Do you have any good document or reference on good practice to cluster FreeSWITCH, specifically cluster of FreeSWITCHes that can hold tenth of thousands of users in a single cluster?
On Thu, Oct 25, 2012 at 7:05 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I appreciate your patch but it looks very specific to your needs.
I think you should stop and join the community and learn the philosophy behind how things work and learn how to make a module. You are breaking holes in the wall to get through because you are not seeing the door.
I really think you should understand how the xml hooks or dialplan modules work and how to actually scale things in FreeSWITCH.
Join IRC and call the weekly call and maybe study the wiki.
On Thu, Oct 25, 2012 at 7:04 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement
I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already?
Thanks, Yiftach.
On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I thought you were going to move it to be a module?
On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote:
> I merged my code to the HEAD here are the results (I yet checked in > the code) : > # time /opt/freeswitch/bin/fs_cli -x "reloadxml" > +OK [Success] > real *0m24.424s* > user 0m0.000s > sys 0m0.020s > > # time /opt/freeswitch/bin/fs_cli -x "reloadxml > /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" > +OK [Success] > real *0m0.315s* > user 0m0.000s > sys 0m0.010s > > Looks like there is major improvement in the loading time > How does it work, I just need to check in my code to the git? with > my subscribe user? > Thanks, > Yiftach. > > > > On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com>wrote: > >> OK I will do so >> >> On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < >> anthony.minessale@gmail.com> wrote: >> >>> Also, if you design it cleanly and generic enough you can check >>> the module itself into HEAD and maintain it yourself and others can choose >>> to use it. >>> >>> >>> On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan < >>> yiftah@choochee.com> wrote: >>> >>>> Yes I agree, I can solve it this way for me, if anyone else in >>>> the community is looking for a very fast way of loading a specific file >>>> from the "reloadxml" command I can update it to the HEAD >>>> >>>> >>>> On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < >>>> anthony.minessale@gmail.com> wrote: >>>> >>>>> The man xml registry is already reloaded using the method >>>>> described. In fact the xml root has reference counting and everyone who >>>>> was on the old one will be able to hold on to that root until they release >>>>> it even when a new one has been loaded into place. >>>>> >>>>> I think if you pursue the custom C module with the XML hook, >>>>> that you can put your same logic into a module and not bother the core as >>>>> any access to the core xml will be redirected to your module callback where >>>>> you can do whatever you want and not disturb the core of FS unless you have >>>>> some kind of functionality that is useful to everyone in general. >>>>> >>>>> >>>>> >>>>> >>>>> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan < >>>>> yiftah@choochee.com> wrote: >>>>> >>>>>> You may be able to develop it as well but it will not solve our >>>>>> problem of pushing configuration fast >>>>>> We have a front end that pushes the configuration changes and >>>>>> it needs to be fast, so even if we change it in the background it will be >>>>>> slow >>>>>> >>>>>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt <errotan@elder.hu >>>>>> > wrote: >>>>>> >>>>>>> >>>>>>> I'm not an expert ( correct me if I'm wrong ) but I suppose >>>>>>> the xml config memory section is locked while the files are proccessed so >>>>>>> other modules are waiting for it. Instead of loading just one file you >>>>>>> could continue to load all the files into somekind of a new temporary >>>>>>> config section without locking the main. Once the files are loaded and >>>>>>> processed the temporary and main section could be swapped or the temporary >>>>>>> is used and the other is deleted from memory. No idea how many time this >>>>>>> could take to implement. >>>>>>> >>>>>>> >>>>>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>>>>> >>>>>>> Hi FreeSWITCH community, >>>>>>> My name is Yiftah and I am working for ChooChee which is a >>>>>>> hosted PBX solution company >>>>>>> We have been using FreeSWITCH for almost 2 years and we added >>>>>>> a lot of code changes to the core and to the different modules >>>>>>> Lately we have made a decision to get more close to the >>>>>>> community so that we can enjoy the bug fixes and the new feature from the >>>>>>> community and we can contribute our knowledge and bug fixes >>>>>>> I would please like to start with a very basic question : >>>>>>> We are using dialplan xmls in order to load the configuration, >>>>>>> we have a lot of users on each freeswitch (+4k), it took a very long time >>>>>>> for the configuration to load (around 5 minutes) during this time no new >>>>>>> calls could be served by FreeSWITCH >>>>>>> In order to solve this problem we introduce reload xml that >>>>>>> accepts file names and has the ability to load just one file name into the >>>>>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>>>>> The problem is that we had to introduce a lot of code in order >>>>>>> to solve this problem, has anyone else encounter this problem? we do not >>>>>>> want to use mod_xml_curl as we want to take care bringing the file to the >>>>>>> machine >>>>>>> Another approach that we thought is that a database might be >>>>>>> much better fit in here, because every xml update includes the entire >>>>>>> tenant (business) and has the potential in harming other users in the same >>>>>>> tenant, also DB has much higher capacities then XMLs, did anyone think of >>>>>>> enabling MySQL as a directory of parameters instead of xml? >>>>>>> Thanks, >>>>>>> Yiftach. >>>>>>> >>>>>>> >>>>>>> >>>>>>> _________________________________________________________________________ >>>>>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>>>>> >>>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>>>>> >>>>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>>>>> >>>>>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _________________________________________________________________________ >>>>>>> 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 >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Anthony Minessale II >>>>> >>>>> FreeSWITCH http://www.freeswitch.org/ >>>>> ClueCon http://www.cluecon.com/ >>>>> Twitter: http://twitter.com/FreeSWITCH_wire >>>>> >>>>> AIM: anthm >>>>> MSN:anthony_minessale@hotmail.com >>>>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>>>> IRC: irc.freenode.net #freeswitch >>>>> >>>>> FreeSWITCH Developer Conference >>>>> sip:888@conference.freeswitch.org >>>>> googletalk:conf+888@conference.freeswitch.org >>>>> pstn:+19193869900 >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >>> >>> -- >>> Anthony Minessale II >>> >>> FreeSWITCH http://www.freeswitch.org/ >>> ClueCon http://www.cluecon.com/ >>> Twitter: http://twitter.com/FreeSWITCH_wire >>> >>> AIM: anthm >>> MSN:anthony_minessale@hotmail.com >>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>> IRC: irc.freenode.net #freeswitch >>> >>> FreeSWITCH Developer Conference >>> sip:888@conference.freeswitch.org >>> googletalk:conf+888@conference.freeswitch.org >>> pstn:+19193869900 >>> >>> >>> _________________________________________________________________________ >>> 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 >>> >>> >> > > > _________________________________________________________________________ > 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 > >
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
OK it does make sense and I do like this direction, and in general I do think that FreeSWITCH is a great product otherwise we would not keep using it I can probably take "mod_dialplan_xml" and make a copy for it "mod_dialplan_db" and then treat all the needed requests as db requests In general for cloud based solutions I think the XMLs are great for the overall templates but the dynamic changes can probably come from the database I do understand that everyone wants to take to his own market, our market in general involves many small businesses (1 to 10) that requires a simple pbx services Since we are funded by one of the largest telco in the world we are working with top of the class solutions such as ACME packet One of the basic requirement that we get is to have a stateless pbx but the amount of tenants that we have is huge, this is where the XML and SQLite is causing us some problems In general it looks like no one really clustered many FreeSWITCHs together (above 100 servers) that holds the same configuration I think adding the ability to cluster many FreeSWITCHs together in a stateless mode will give a very good competitive edge on top of Asterisk As it seems Asterisk does not have a very good solution for it as well I will try to join to the next conference to meet you guys a bit more Thanks, Yiftach. On Fri, Oct 26, 2012 at 10:59 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
That is why I keep mentioning the XML hooks. This is exactly what it's for. When you have an xml hook every single request to the xml document can be hooked into and your custom callback function is called with every search param allowing you to dynamically find the right xml and return it on-the-fly. This way you don't need to manage a giant root of XML for user data.
Try looking at it from further back. You can even make an xml hook module that uses a database directly and builds binary xml structures and returns them without them ever having to exist as text. With combinations of the C interfaces like dialplan app, dialplan module, xml_hooks and the like you can scale to any size.
Anyway, I do understand the point of the xml patch, I am very concerned about the stability of the xml parser with that patch you made applied. The entire design of FreeSWITCH is based around allowing you to extend it through modules and hooks. If you can find a hook that is missing that is a much more compelling case than modifying the core for multi-home configurations which is not a primary purpose of the software.
I don't know if you even care about my advice but I assume since you came here asking for it that you want me to continue to help you understand the right direction to take.
On Fri, Oct 26, 2012 at 12:23 AM, Yiftach Golan <yiftah@choochee.com>wrote:
Yes it is kind specific to our needs, which is very fast loading of specific XML in big environments We have some experience with FreeSWITCH modules, we wrote the Voicemail module from scratch after the existing one did not fit our need I think on the FreeSWITCH clustering we were really struggling and this is were the scaling became very challenging for us Do you have any good document or reference on good practice to cluster FreeSWITCH, specifically cluster of FreeSWITCHes that can hold tenth of thousands of users in a single cluster?
On Thu, Oct 25, 2012 at 7:05 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
I appreciate your patch but it looks very specific to your needs.
I think you should stop and join the community and learn the philosophy behind how things work and learn how to make a module. You are breaking holes in the wall to get through because you are not seeing the door.
I really think you should understand how the xml hooks or dialplan modules work and how to actually scale things in FreeSWITCH.
Join IRC and call the weekly call and maybe study the wiki.
On Thu, Oct 25, 2012 at 7:04 PM, Yiftach Golan <yiftah@choochee.com>wrote:
OK I loaded the code to : http://jira.freeswitch.org/browse/FS-4766 I have to say that this version is much less tested than the one we had for FreeSWITCH1.0.7 but hopefully we can still gain from this improvement
I have a different question on the same issue : Even with this fix it is very hard to put huge XMLs, the memory consumption is going crazy Did you think about adding MySQL support ? I thought on adding something like : <action application="bridge" data="MYSQL(SELECT bridge_data FROM users WHERE destination_number = ${destination_number})"/> This will allow us to still use the flexibility of the XMLs and the scalability of a database Do you know if someone did already?
Thanks, Yiftach.
On Thu, Oct 25, 2012 at 3:19 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
Can you git diff it and post it to JIRA so we can have some people look at it and test?
On Thu, Oct 25, 2012 at 5:11 PM, Yiftach Golan <yiftah@choochee.com>wrote:
It may be a bit problematic since I will need 3 hooks : 1. *switch_xml_parse_fd :* Create the initial pre allocated buffer 2. *preprocess :* indexing the file names (adding a note before and after each file ) 3. *switch_xml_parse_file :* use my reload instead the regular one for creating the big xml and then I just let the function continue as usual through the "__switch_xml_open_root" function I am reloading the file to the memory and then let the regular "switch_xml.c" do its work, so using the existing functions in "switch_xml.c" will not do the work However, we do not have to add it I just thought it would be good improvement for FreeSWITCH as it was very helpful for us
On Thu, Oct 25, 2012 at 2:58 PM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
> I thought you were going to move it to be a module? > > On Thu, Oct 25, 2012 at 4:50 PM, Yiftach Golan <yiftah@choochee.com>wrote: > >> I merged my code to the HEAD here are the results (I yet checked in >> the code) : >> # time /opt/freeswitch/bin/fs_cli -x "reloadxml" >> +OK [Success] >> real *0m24.424s* >> user 0m0.000s >> sys 0m0.020s >> >> # time /opt/freeswitch/bin/fs_cli -x "reloadxml >> /repository/generated_configs/tenant_dialplan/156792923823_tenant_dialplan.xml" >> +OK [Success] >> real *0m0.315s* >> user 0m0.000s >> sys 0m0.010s >> >> Looks like there is major improvement in the loading time >> How does it work, I just need to check in my code to the git? with >> my subscribe user? >> Thanks, >> Yiftach. >> >> >> >> On Tue, Oct 23, 2012 at 5:42 PM, Yiftach Golan <yiftah@choochee.com >> > wrote: >> >>> OK I will do so >>> >>> On Tue, Oct 23, 2012 at 5:41 PM, Anthony Minessale < >>> anthony.minessale@gmail.com> wrote: >>> >>>> Also, if you design it cleanly and generic enough you can check >>>> the module itself into HEAD and maintain it yourself and others can choose >>>> to use it. >>>> >>>> >>>> On Tue, Oct 23, 2012 at 5:54 PM, Yiftach Golan < >>>> yiftah@choochee.com> wrote: >>>> >>>>> Yes I agree, I can solve it this way for me, if anyone else in >>>>> the community is looking for a very fast way of loading a specific file >>>>> from the "reloadxml" command I can update it to the HEAD >>>>> >>>>> >>>>> On Tue, Oct 23, 2012 at 3:49 PM, Anthony Minessale < >>>>> anthony.minessale@gmail.com> wrote: >>>>> >>>>>> The man xml registry is already reloaded using the method >>>>>> described. In fact the xml root has reference counting and everyone who >>>>>> was on the old one will be able to hold on to that root until they release >>>>>> it even when a new one has been loaded into place. >>>>>> >>>>>> I think if you pursue the custom C module with the XML hook, >>>>>> that you can put your same logic into a module and not bother the core as >>>>>> any access to the core xml will be redirected to your module callback where >>>>>> you can do whatever you want and not disturb the core of FS unless you have >>>>>> some kind of functionality that is useful to everyone in general. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Tue, Oct 23, 2012 at 4:32 PM, Yiftach Golan < >>>>>> yiftah@choochee.com> wrote: >>>>>> >>>>>>> You may be able to develop it as well but it will not solve >>>>>>> our problem of pushing configuration fast >>>>>>> We have a front end that pushes the configuration changes and >>>>>>> it needs to be fast, so even if we change it in the background it will be >>>>>>> slow >>>>>>> >>>>>>> On Tue, Oct 23, 2012 at 2:03 PM, Puskás Zsolt < >>>>>>> errotan@elder.hu> wrote: >>>>>>> >>>>>>>> >>>>>>>> I'm not an expert ( correct me if I'm wrong ) but I suppose >>>>>>>> the xml config memory section is locked while the files are proccessed so >>>>>>>> other modules are waiting for it. Instead of loading just one file you >>>>>>>> could continue to load all the files into somekind of a new temporary >>>>>>>> config section without locking the main. Once the files are loaded and >>>>>>>> processed the temporary and main section could be swapped or the temporary >>>>>>>> is used and the other is deleted from memory. No idea how many time this >>>>>>>> could take to implement. >>>>>>>> >>>>>>>> >>>>>>>> 2012-10-23 02:56 keltezéssel, Yiftach Golan írta: >>>>>>>> >>>>>>>> Hi FreeSWITCH community, >>>>>>>> My name is Yiftah and I am working for ChooChee which is a >>>>>>>> hosted PBX solution company >>>>>>>> We have been using FreeSWITCH for almost 2 years and we added >>>>>>>> a lot of code changes to the core and to the different modules >>>>>>>> Lately we have made a decision to get more close to the >>>>>>>> community so that we can enjoy the bug fixes and the new feature from the >>>>>>>> community and we can contribute our knowledge and bug fixes >>>>>>>> I would please like to start with a very basic question : >>>>>>>> We are using dialplan xmls in order to load the >>>>>>>> configuration, we have a lot of users on each freeswitch (+4k), it took a >>>>>>>> very long time for the configuration to load (around 5 minutes) during this >>>>>>>> time no new calls could be served by FreeSWITCH >>>>>>>> In order to solve this problem we introduce reload xml that >>>>>>>> accepts file names and has the ability to load just one file name into the >>>>>>>> memory (we achieved 10ms loading time instead of 5 minutes) >>>>>>>> The problem is that we had to introduce a lot of code in >>>>>>>> order to solve this problem, has anyone else encounter this problem? we do >>>>>>>> not want to use mod_xml_curl as we want to take care bringing the file to >>>>>>>> the machine >>>>>>>> Another approach that we thought is that a database might be >>>>>>>> much better fit in here, because every xml update includes the entire >>>>>>>> tenant (business) and has the potential in harming other users in the same >>>>>>>> tenant, also DB has much higher capacities then XMLs, did anyone think of >>>>>>>> enabling MySQL as a directory of parameters instead of xml? >>>>>>>> Thanks, >>>>>>>> Yiftach. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _________________________________________________________________________ >>>>>>>> Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com >>>>>>>> >>>>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com >>>>>>>> >>>>>>>> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com >>>>>>>> >>>>>>>> FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users >>>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees... >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _________________________________________________________________________ >>>>>>>> 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 >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _________________________________________________________________________ >>>>>>> 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 >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Anthony Minessale II >>>>>> >>>>>> FreeSWITCH http://www.freeswitch.org/ >>>>>> ClueCon http://www.cluecon.com/ >>>>>> Twitter: http://twitter.com/FreeSWITCH_wire >>>>>> >>>>>> AIM: anthm >>>>>> MSN:anthony_minessale@hotmail.com >>>>>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>>>>> IRC: irc.freenode.net #freeswitch >>>>>> >>>>>> FreeSWITCH Developer Conference >>>>>> sip:888@conference.freeswitch.org >>>>>> googletalk:conf+888@conference.freeswitch.org >>>>>> pstn:+19193869900 >>>>>> >>>>>> >>>>>> _________________________________________________________________________ >>>>>> 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 >>>>>> >>>>>> >>>>> >>>>> >>>>> _________________________________________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> -- >>>> Anthony Minessale II >>>> >>>> FreeSWITCH http://www.freeswitch.org/ >>>> ClueCon http://www.cluecon.com/ >>>> Twitter: http://twitter.com/FreeSWITCH_wire >>>> >>>> AIM: anthm >>>> MSN:anthony_minessale@hotmail.com >>>> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com >>>> IRC: irc.freenode.net #freeswitch >>>> >>>> FreeSWITCH Developer Conference >>>> sip:888@conference.freeswitch.org >>>> googletalk:conf+888@conference.freeswitch.org >>>> pstn:+19193869900 >>>> >>>> >>>> _________________________________________________________________________ >>>> 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 >>>> >>>> >>> >> >> >> _________________________________________________________________________ >> 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 >> >> > > > -- > Anthony Minessale II > > FreeSWITCH http://www.freeswitch.org/ > ClueCon http://www.cluecon.com/ > Twitter: http://twitter.com/FreeSWITCH_wire > > AIM: anthm > MSN:anthony_minessale@hotmail.com > GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com > IRC: irc.freenode.net #freeswitch > > FreeSWITCH Developer Conference > sip:888@conference.freeswitch.org > googletalk:conf+888@conference.freeswitch.org > pstn:+19193869900 > > > _________________________________________________________________________ > 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 > >
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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
_________________________________________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_________________________________________________________________________ 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 (6)
-
Abaci
-
Anthony Minessale
-
Avi Marcus
-
Puskás Zsolt
-
Seven Du
-
Yiftach Golan