<div dir="ltr"><div style>Re: pooling -- there's always bugs...ALWAYS BUGS. We were using poolboy at Basho and thought that it was so simple/basic that bugs should be easy to sort out...until Dr. Hughes walked into the room and pulled a Concurrent Debuggerator 3000 from his black bag (aka QuickCheck) and found 5 significant concurrency bugs in as many minutes...and this was on a library that only does pooling and nothing else. So...unless you tell me that Dr. Hughes has been over this pooling code with the aforementioned tool, I will eye the pooling code with a raised eyebrow. :)</div>
<div><br></div>Broadly, I would suggest looking at these forks as being useful to merge in:<div><br></div><div style>csrl - pooling fixes, edge cases, etc. (underscores my point about pooling, but I digress)</div><div style>
jlarky - looks like a opscode branch that has some good bug fixes</div><div style>taybin - adds better UTF support (it's a big patch though, so probably needs some work)</div><div style>rflynn - bug fix for float encoding</div>
<div style>gar1t - bug fixes + polish on API</div><div style><br></div><div style>What are the competing approaches on transactions?</div><div style><br></div><div style>D.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Apr 10, 2013 at 4:25 PM, Garrett Smith <span dir="ltr"><<a href="mailto:g@rre.tt" target="_blank">g@rre.tt</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Someday someone will write a book on the history of the Erlang MySQL<br>
libraries. Not a great read, but it'd have to be scholarly.<br>
<br>
I've modified the Eonblast library with some connection timeout tweaks<br>
(as in, supporting them):<br>
<br>
<a href="https://github.com/gar1t/Emysql" target="_blank">https://github.com/gar1t/Emysql</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Wed, Apr 10, 2013 at 4:59 PM, Dave Smith <<a href="mailto:dizzyd@dizzyd.com">dizzyd@dizzyd.com</a>> wrote:<br>
> Hi Henning,<br>
><br>
> Thanks for the pointers. I must admit that I find the level of snark in the<br>
> emysql history delightful, considering that it's at least as forked as<br>
> erlang-mysql-driver now. :)<br>
><br>
> There are a number of good fixes for the emysql driver, but they are on 20<br>
> different forks across Github. Looking over csrl's, fixes, I'm pretty<br>
> concerned those aren't in mainline since there are some non-trivial pooling<br>
> problems he's addressed (would you like some irony with that irony? :)).<br>
><br>
> Do you know if eonblast is planning to incorporate all the work from those<br>
> different forks? I think we need to build some momentum behind a driver and<br>
> I'm certainly happy to direct people towards a maintained one.<br>
><br>
> IMO, it would also be handy if the driver wasn't pooled, but used poolboy<br>
> since getting the pooling right is rather difficult. (I know that poolboy<br>
> has been tested with some of Quviq's concurrent checking stuff and a number<br>
> of race conditions addressed).<br>
><br>
> Thanks!<br>
><br>
> D.<br>
><br>
><br>
> On Wed, Apr 10, 2013 at 3:00 PM, Henning Diedrich <<a href="mailto:hd2010@eonblast.com">hd2010@eonblast.com</a>><br>
> wrote:<br>
>><br>
>> Hi Dave,<br>
>><br>
>> if I remember right, you were using the driver that came from Yxa via<br>
>> Yarif's erlang-emysql-driver <a href="https://github.com/dizzyd/erlang-mysql-driver" target="_blank">https://github.com/dizzyd/erlang-mysql-driver</a> ?<br>
>> (Here is the history of that. <a href="https://github.com/eonblast/Emysql#History" target="_blank">https://github.com/eonblast/Emysql#History</a>)<br>
>><br>
>> It was found less than perfect when Nick and Jacob gave it something to<br>
>> chew building Rupture. I never spotted the problems myself I should add.<br>
>> That's purely from Nick Gerakine's and Jacob Vorreuter's words.<br>
>><br>
>> But they report that with much effort they could not get the races out of<br>
>> it. That's why they started emysql, which I later started maintaining, and<br>
>> which Jeremy just mentioned, <a href="https://github.com/eonblast/Emysql" target="_blank">https://github.com/eonblast/Emysql</a><br>
>><br>
>> Considerable work went into getting the pooling system of Emysql right.<br>
>> (What I don't know is when exactly it got buggy, it may have been after<br>
>> Jacob's Emysql fork that now lies dormant.) But I worked a while, with help<br>
>> from others to get all races out of the queuing.<br>
>><br>
>> However, the best fork of Emysql, I *think* is currently that of Chris<br>
>> Rempel at <a href="https://github.com/csrl/emysql" target="_blank">https://github.com/csrl/emysql</a> as I got behind while making<br>
>> Erlvolt, the VoltDB driver, modeled in parts on Emysql. Chris did some<br>
>> impressive clean up. Now that Erlvolt is out, I'll turn around and catch up<br>
>> asap. But that's not a New York asap.<br>
>><br>
>> An alternative may be to go back to a more original Yxa version, like the<br>
>> one possibly still to be found in ejabberd. That may be more stable than<br>
>> Yariv's branch that you started out with. The "history" I linked to above<br>
>> has the reasons, why that branch may be not quite clean and hard to debug.<br>
>><br>
>> Best,<br>
>><br>
>> Henning<br>
>><br>
>> On Apr 10, 2013, at 10:43 PM, Dave Smith <<a href="mailto:dizzyd@dizzyd.com">dizzyd@dizzyd.com</a>> wrote:<br>
>><br>
>> > Hello list,<br>
>> ><br>
>> > I'm curious what libraries people are currently using for MySQL access<br>
>> > in Erlang. I have an old library on my github that I've kept basically<br>
>> > working, but am wondering if there are any preferred/production libraries<br>
>> > out there that people like better.<br>
>> ><br>
>> > I ask because I'm considering retrofitting the pooling system in the<br>
>> > driver I maintain to use poolboy, but figure it was worth checking if there<br>
>> > are better alternatives out there. :)<br>
>> ><br>
>> > After all, the best code to maintain is the code you don't maintain.<br>
>> ><br>
>> > D.<br>
>> > _______________________________________________<br>
>> > erlang-questions mailing list<br>
>> > <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> > <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
</div></div></blockquote></div><br></div>