[Freeswitch-dev] core odbc vs in-module mysql
Hello, is it something particular that recommends usage of core odbc api instead of connecting from a module directly to mysql database? I'm fine to keep using sqlite for the rest of FS needs, just need to do fast access to mysql, therefore I try to avoid the extra layer added by odbc. Thanks, Daniel -- Daniel-Constantin Mierla * http://www.asipto.com/
We use the odbc for any in-tree sql stuff because we are trying to remain database agnostic. if it's your own module it's ok but if you want to contribute it, we would appreciate using ODBC On Fri, Feb 26, 2010 at 5:29 AM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
is it something particular that recommends usage of core odbc api instead of connecting from a module directly to mysql database? I'm fine to keep using sqlite for the rest of FS needs, just need to do fast access to mysql, therefore I try to avoid the extra layer added by odbc.
Thanks, Daniel
-- Daniel-Constantin Mierla * http://www.asipto.com/
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev 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 <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
On 02/26/2010 05:08 PM, Anthony Minessale wrote:
We use the odbc for any in-tree sql stuff because we are trying to remain database agnostic. if it's your own module it's ok but if you want to contribute it, we would appreciate using ODBC ok, thanks. If I understood the architecture, default sql engine in the core is sqlite, with option to replace it with odbc at compile time.
odbc is indeed an abstract layer, but you lose from the power of underneath sql engine. And some out there don't like odbc much, asking to avoid it :-) . Daniel
On Fri, Feb 26, 2010 at 5:29 AM, Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> wrote:
Hello,
is it something particular that recommends usage of core odbc api instead of connecting from a module directly to mysql database? I'm fine to keep using sqlite for the rest of FS needs, just need to do fast access to mysql, therefore I try to avoid the extra layer added by odbc.
Thanks, Daniel
-- Daniel-Constantin Mierla * http://www.asipto.com/
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org <mailto:FreeSWITCH-dev@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev 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> iax:guest@conference.freeswitch.org/888 <http://iax:guest@conference.freeswitch.org/888> googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Daniel-Constantin Mierla * http://www.asipto.com/
lots of people complain about the huge overhead of odbc and how horrible it is, and every time I ask them to show me some real numbers that show a significant performance impact. Of all those who have loudly complained about the horrors of odbc, I have not had a single person take me up on my request and show me any numbers at all to support this theory. If there is not any real numbers to show a real impact, we can not make a call about if the performance difference would justify increased complexity of supporting anything other than odbc. Mike On Feb 26, 2010, at 1:06 PM, Daniel-Constantin Mierla wrote:
On 02/26/2010 05:08 PM, Anthony Minessale wrote:
We use the odbc for any in-tree sql stuff because we are trying to remain database agnostic. if it's your own module it's ok but if you want to contribute it, we would appreciate using ODBC
ok, thanks. If I understood the architecture, default sql engine in the core is sqlite, with option to replace it with odbc at compile time.
odbc is indeed an abstract layer, but you lose from the power of underneath sql engine. And some out there don't like odbc much, asking to avoid it :-) .
Daniel
Sqlite is mostly there just so it works out of the box, any serious implementation should probably use something via odbc.
Hi, On 02/26/2010 08:46 PM, Michael Jerris wrote:
lots of people complain about the huge overhead of odbc and how horrible it is,
there are lot of discussions on the web about this topic, apart of casual fud cases, perhaps there is something generating all these. However, personally I haven't complained, just wanted to know if the FS core API around ODBC gives some special goodies (e.g., reconnect, auto/nicer handling of error cases, ...).
and every time I ask them to show me some real numbers that show a significant performance impact.
It is not only about performance, but also losing (or adding overhead to access) particular extensions of the sql engine behind. E.g., retrieving the last inserted id (auto-increment) requires a second query, with error handling a.s.o. while the native lib provides a functions.
Of all those who have loudly complained about the horrors of odbc, I have not had a single person take me up on my request and show me any numbers at all to support this theory.
Do you you mean generic myodbc vs libmyqlclient performance figures or for FS specific needs? Not a db expert but I think the difference is revealed better by complex queries rather than simple insert/delete/update/select.
If there is not any real numbers to show a real impact, we can not make a call about if the performance difference would justify increased complexity of supporting anything other than odbc.
Again, it was not about changing something, but collecting hints about what to use in a custom extension. Daniel
Mike
On Feb 26, 2010, at 1:06 PM, Daniel-Constantin Mierla wrote:
On 02/26/2010 05:08 PM, Anthony Minessale wrote:
We use the odbc for any in-tree sql stuff because we are trying to remain database agnostic. if it's your own module it's ok but if you want to contribute it, we would appreciate using ODBC
ok, thanks. If I understood the architecture, default sql engine in the core is sqlite, with option to replace it with odbc at compile time.
odbc is indeed an abstract layer, but you lose from the power of underneath sql engine. And some out there don't like odbc much, asking to avoid it :-) .
Daniel
Sqlite is mostly there just so it works out of the box, any serious implementation should probably use something via odbc.
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Daniel-Constantin Mierla Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010 * http://www.asipto.com/index.php/sip-router-masterclass/
ODBC can be enabled/disabled at compile time, but the choice of whether to use it is made at runtime in the configuration files - if you set a DSN for a ODBC database it will use ODBC (or show errors if ODBC is not compiled in), if you do not it will generally use SQLite. Regards, -Steve On 26 February 2010 18:06, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
On 02/26/2010 05:08 PM, Anthony Minessale wrote:
We use the odbc for any in-tree sql stuff because we are trying to remain database agnostic. if it's your own module it's ok but if you want to contribute it, we would appreciate using ODBC
ok, thanks. If I understood the architecture, default sql engine in the core is sqlite, with option to replace it with odbc at compile time.
odbc is indeed an abstract layer, but you lose from the power of underneath sql engine. And some out there don't like odbc much, asking to avoid it :-) .
Daniel
On Fri, Feb 26, 2010 at 5:29 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,
is it something particular that recommends usage of core odbc api instead of connecting from a module directly to mysql database? I'm fine to keep using sqlite for the rest of FS needs, just need to do fast access to mysql, therefore I try to avoid the extra layer added by odbc.
Thanks, Daniel
-- Daniel-Constantin Mierla * http://www.asipto.com/
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev 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 iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Daniel-Constantin Mierla * http://www.asipto.com/
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (4)
-
Anthony Minessale
-
Daniel-Constantin Mierla
-
Michael Jerris
-
Steven Ayre