<br><br><div class="gmail_quote">On Sun, May 29, 2011 at 4:18 PM, stephane ducasse <span dir="ltr">&lt;<a href="mailto:stephane.ducasse@free.fr">stephane.ducasse@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt;<br>
&gt;<br>
&gt; It&#39;s a bit better. There&#39;s no starvation if the timeout is greater than zero, but it&#39;s still a form of busy waiting, and it limits the number of queries per second per connection to at most 1000 (actually 1000 / timeout). To compare this with our native implementation - PostgresV3 - I measured 6k+ queries per second per connection and it&#39;s still not optimized for Cog (#perform: is slow on Cog).<br>

&gt;<br>
&gt;<br>
&gt; Thanks Levente. Unfortunatly I guess that&#39;s all we can do with a blocking FFI :(<br>
<br>
</div>Just that I understand why you do not have the same constraints that levente?<br>
What are they? because he does not have either a threaded ffi.<br></blockquote><div><br>Because he uses a native client for PostgreSQL, that is, a driver implemented directly in Smalltalk: you open a socket and you implement the protocol the database specify. Easy. They use a Socket, and do not need FFI because the do not delegate to an external library. They implement the same as the external library but in Smalltalk.<br>
Why we don&#39;t do that?<br>Because that ONLY and ONLY works for open-sources databases where they can make available the protocol specification so that you can build as many drivers as you want. However, non open-source databases (Oracle, SQLServer, Sybase, etc) DO NOT make the protocol available so you cannot just create your own driver. Instead, you have to use the driver THEY give you. Of course, for java they build drivers, so java guys do not depend on anybody, they just have they jdbc driver. SqueakDBX appeared to solve that problem. <br>
<br>We, Smalltalk community, do not have that luck and we have to use one of the available drivers they do. All of the databases provide drivers written in C, and these are the easier to use from Smalltalk. Hence, we depend on an external library. The same happens with ODBC for example.<br>
<br>Cheers<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Stef_______________________________________________<br>
<div><div></div><div class="h5">seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>