<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Introducing ErlyDB: The Erlang Twist on Database Abstraction</title>
	<atom:link href="http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/feed/" rel="self" type="application/rss+xml" />
	<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/</link>
	<description>Adventures in Open Source Erlang</description>
	<pubDate>Fri, 16 May 2008 03:43:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Todd</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-89926</link>
		<dc:creator>Todd</dc:creator>
		<pubDate>Thu, 24 Jan 2008 04:15:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-89926</guid>
		<description>Being very new to Erlang I'm just curious if using MySQL (I know its popular) instead of Mnesia reduces the concurrancy and fault-tolerant advantage that's native to Erlang?</description>
		<content:encoded><![CDATA[<p>Being very new to Erlang I&#8217;m just curious if using MySQL (I know its popular) instead of Mnesia reduces the concurrancy and fault-tolerant advantage that&#8217;s native to Erlang?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ak47</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-66803</link>
		<dc:creator>ak47</dc:creator>
		<pubDate>Wed, 28 Nov 2007 17:11:46 +0000</pubDate>
		<guid isPermaLink="false">#comment-66803</guid>
		<description>2 Jonathan Allen&#62;
erlydb: pregenerated &#38; precompiled code, data delivered in plain tuples, accesing = basically just offseting.

others : queries generated during runtime, quite expensive. accessing through dynamic accessors, quite expensive.

If you had actually thought for a while instead of rushing to defend your beloved OO, you could have figured it out yourself.</description>
		<content:encoded><![CDATA[<p>2 Jonathan Allen&gt;<br />
erlydb: pregenerated &amp; precompiled code, data delivered in plain tuples, accesing = basically just offseting.</p>
<p>others : queries generated during runtime, quite expensive. accessing through dynamic accessors, quite expensive.</p>
<p>If you had actually thought for a while instead of rushing to defend your beloved OO, you could have figured it out yourself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Allen</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-255</link>
		<dc:creator>Jonathan Allen</dc:creator>
		<pubDate>Thu, 31 Aug 2006 00:03:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-255</guid>
		<description>Drop the anti-OO rehtoric, it just makes you look stupid. 

For your information, objects are cheap to create in most languages. For example, .Net only need 12 bytes of overhead. 

Had you not starting attacking OO, I woulf have been more interested in what you have to say about Erlang and databases.</description>
		<content:encoded><![CDATA[<p>Drop the anti-OO rehtoric, it just makes you look stupid. </p>
<p>For your information, objects are cheap to create in most languages. For example, .Net only need 12 bytes of overhead. </p>
<p>Had you not starting attacking OO, I woulf have been more interested in what you have to say about Erlang and databases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thomas lackner</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-254</link>
		<dc:creator>thomas lackner</dc:creator>
		<pubDate>Wed, 30 Aug 2006 11:00:26 +0000</pubDate>
		<guid isPermaLink="false">#comment-254</guid>
		<description>This looks great and is an important part of a popular web stacks (though I prefer to slang SQL by hand). Good job!

I was thinking, perhaps, that some of the functions like new and save could benefit from keyword arguments so you can omit column values. Does Erlang do that? How does the _ stuff used in records work in practice? Could Smerl enable this behavior?</description>
		<content:encoded><![CDATA[<p>This looks great and is an important part of a popular web stacks (though I prefer to slang SQL by hand). Good job!</p>
<p>I was thinking, perhaps, that some of the functions like new and save could benefit from keyword arguments so you can omit column values. Does Erlang do that? How does the _ stuff used in records work in practice? Could Smerl enable this behavior?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Gustafsson</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-253</link>
		<dc:creator>Per Gustafsson</dc:creator>
		<pubDate>Wed, 30 Aug 2006 07:12:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-253</guid>
		<description>In response to ke han:
&lt;p&gt;
If the created module is compiled with the debug flag you should be able to prettyprint the code of that module with the following function:
&lt;/p&gt;
&lt;pre&gt;print(Mod) -&#38;gt&lt;br /&gt;
&#160;&#160;F=code:which(Mod),&lt;br /&gt;
&#160;&#160;{ok,{_,[{abstract_code,{raw_abstract_v1,Abstr}}]}}= &lt;br /&gt;
&#160;&#160;&#160;&#160;beam_lib:chunks(F, [abstract_code]),&lt;br /&gt;
&#160;&#160;[io:format(&#34;~s~n&#34;,[erl_prettypr:format(X)])&#124;&#124;X &#38;#60- Abstr],&lt;br /&gt;
&#160;&#160;ok.&lt;/pre&gt;
&lt;p&gt;
or if you just want to prettyprint one function:
&lt;/p&gt;
&lt;pre&gt;print(M,F,A) -&#38;gt &lt;br /&gt;
&#160;&#160;File=code:which(M),&lt;br /&gt;
&#160;&#160;{ok,{_,[{abstract_code,{raw_abstract_v1,Abstr}}]}}= &lt;br /&gt;
&#160;&#160;&#160;&#160;beam_lib:chunks(File, [abstract_code]),&lt;br /&gt;
&#160;&#160;[io:format(&#34;~s~n&#34;,[erl_prettypr:format(X)])&#124;&#124;&lt;br /&gt;
&#160;&#160;X = {function,_,F,A,_} &#38;#60-Abstr],&lt;br /&gt;
&#160;&#160;ok.&lt;/pre&gt;
&lt;p&gt;
I have not tested the code above, but I have done this in the shell and it worked. Of course I'm not sure how smerl compiles its modules i.e. if it uses the debug flag.
&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>In response to ke han:</p>
<p>
If the created module is compiled with the debug flag you should be able to prettyprint the code of that module with the following function:
</p>
<pre>print(Mod) -&amp;gt
&nbsp;&nbsp;F=code:which(Mod),
&nbsp;&nbsp;{ok,{_,[{abstract_code,{raw_abstract_v1,Abstr}}]}}= 
&nbsp;&nbsp;&nbsp;&nbsp;beam_lib:chunks(F, [abstract_code]),
&nbsp;&nbsp;[io:format(&quot;~s~n&quot;,[erl_prettypr:format(X)])||X &amp;#60- Abstr],
&nbsp;&nbsp;ok.</pre>
<p>
or if you just want to prettyprint one function:
</p>
<pre>print(M,F,A) -&amp;gt 
&nbsp;&nbsp;File=code:which(M),
&nbsp;&nbsp;{ok,{_,[{abstract_code,{raw_abstract_v1,Abstr}}]}}= 
&nbsp;&nbsp;&nbsp;&nbsp;beam_lib:chunks(File, [abstract_code]),
&nbsp;&nbsp;[io:format(&quot;~s~n&quot;,[erl_prettypr:format(X)])||
&nbsp;&nbsp;X = {function,_,F,A,_} &amp;#60-Abstr],
&nbsp;&nbsp;ok.</pre>
<p>
I have not tested the code above, but I have done this in the shell and it worked. Of course I&#8217;m not sure how smerl compiles its modules i.e. if it uses the debug flag.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ke han</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-252</link>
		<dc:creator>ke han</dc:creator>
		<pubDate>Wed, 30 Aug 2006 06:55:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-252</guid>
		<description>re: What do the "true = a == b" statements mean?

erlang will compare the values a and b (a == b).  This evaluates to true or false, as thats what the '==' does.  The '=' in erlang is _not_ an assingment, it is a match.  so, what's on the left gets matched to whats on the right of the '='.  In this case, if a == b evaluates to anything other than true, then the match operation will fail with a "bad match" error.  This is the goal of writting this style of code.  You write what you expect to match; anything else produces an error.  This gets into a coding style which erlang'ers call "non-defensive programming".  There exist good books and tutorials on this subject.</description>
		<content:encoded><![CDATA[<p>re: What do the &#8220;true = a == b&#8221; statements mean?</p>
<p>erlang will compare the values a and b (a == b).  This evaluates to true or false, as thats what the &#8216;==&#8217; does.  The &#8216;=&#8217; in erlang is _not_ an assingment, it is a match.  so, what&#8217;s on the left gets matched to whats on the right of the &#8216;=&#8217;.  In this case, if a == b evaluates to anything other than true, then the match operation will fail with a &#8220;bad match&#8221; error.  This is the goal of writting this style of code.  You write what you expect to match; anything else produces an error.  This gets into a coding style which erlang&#8217;ers call &#8220;non-defensive programming&#8221;.  There exist good books and tutorials on this subject.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-249</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Wed, 30 Aug 2006 06:44:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-249</guid>
		<description>I'll answer all the questions in a backward order:
&lt;br /&gt;
Bill -- the true = X statement would cause the runtime to throw an exception if the statement fails. It tells Erlang to bind X to 'true', which is only possible if X is already true.
&lt;br /&gt;
Joel -- the queries are generated in runtime but the code that generates the queries is compiled once. When I add support for prepared statements, most queries will be generated once per conncetion.
&lt;br /&gt;
Ke Han -- use smerl:for_module followed by smerl:get_func or smerl:forms. Also keep in mind smerl:get_exports and smerl:get_module.
&lt;br /&gt;
Damir -- ErlyDB came out of a selfish, pragmatic need: Mnesia doesn't scale to large datasets and I needed to work with databases that do. I don't know how well Mnesia scales but I'm not gonna use my own app as a Mnesia testbed :)
&lt;br /&gt;
RE Mnesia -- if the OTP team decides to improve it, it's all the better for us. It gives us more tools to do our jobs. However, I've looked at the Mnesia and dets source codes and it's too much for me to tackle by myself. I decided ErlyDB would give me more bang for the buck :)
&lt;br /&gt;
&lt;br /&gt;
Cheers - Yariv</description>
		<content:encoded><![CDATA[<p>I&#8217;ll answer all the questions in a backward order:<br />
<br />
Bill &#8212; the true = X statement would cause the runtime to throw an exception if the statement fails. It tells Erlang to bind X to &#8216;true&#8217;, which is only possible if X is already true.<br />
<br />
Joel &#8212; the queries are generated in runtime but the code that generates the queries is compiled once. When I add support for prepared statements, most queries will be generated once per conncetion.<br />
<br />
Ke Han &#8212; use smerl:for_module followed by smerl:get_func or smerl:forms. Also keep in mind smerl:get_exports and smerl:get_module.<br />
<br />
Damir &#8212; ErlyDB came out of a selfish, pragmatic need: Mnesia doesn&#8217;t scale to large datasets and I needed to work with databases that do. I don&#8217;t know how well Mnesia scales but I&#8217;m not gonna use my own app as a Mnesia testbed :)<br />
<br />
RE Mnesia &#8212; if the OTP team decides to improve it, it&#8217;s all the better for us. It gives us more tools to do our jobs. However, I&#8217;ve looked at the Mnesia and dets source codes and it&#8217;s too much for me to tackle by myself. I decided ErlyDB would give me more bang for the buck :)</p>
<p>Cheers - Yariv</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-250</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Wed, 30 Aug 2006 06:44:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-250</guid>
		<description>I'll answer all the questions in a backward order:
&lt;br /&gt;
Bill -- the true = X statement would cause the runtime to throw an exception if the statement fails. It tells Erlang to bind X to 'true', which is only possible if X is already true.
&lt;br /&gt;
Joel -- the queries are generated in runtime but the code that generates the queries is compiled once. When I add support for prepared statements, most queries will be generated once per conncetion.
&lt;br /&gt;
Ke Han -- use smerl:for_module followed by smerl:get_func or smerl:forms. Also keep in mind smerl:get_exports and smerl:get_module.
&lt;br /&gt;
Damir -- ErlyDB came out of a selfish, pragmatic need: Mnesia doesn't scale to large datasets and I needed to work with databases that do. I don't know how well Mnesia scales but I'm not gonna use my own app as a Mnesia testbed :)
&lt;br /&gt;
RE Mnesia -- if the OTP team decides to improve it, it's all the better for us. It gives us more tools to do our jobs. However, I've looked at the Mnesia and dets source codes and it's too much for me to tackle by myself. I decided ErlyDB would give me more bang for the buck :)
&lt;br /&gt;
&lt;br /&gt;
Cheers - Yariv</description>
		<content:encoded><![CDATA[<p>I&#8217;ll answer all the questions in a backward order:<br />
<br />
Bill &#8212; the true = X statement would cause the runtime to throw an exception if the statement fails. It tells Erlang to bind X to &#8216;true&#8217;, which is only possible if X is already true.<br />
<br />
Joel &#8212; the queries are generated in runtime but the code that generates the queries is compiled once. When I add support for prepared statements, most queries will be generated once per conncetion.<br />
<br />
Ke Han &#8212; use smerl:for_module followed by smerl:get_func or smerl:forms. Also keep in mind smerl:get_exports and smerl:get_module.<br />
<br />
Damir &#8212; ErlyDB came out of a selfish, pragmatic need: Mnesia doesn&#8217;t scale to large datasets and I needed to work with databases that do. I don&#8217;t know how well Mnesia scales but I&#8217;m not gonna use my own app as a Mnesia testbed :)<br />
<br />
RE Mnesia &#8212; if the OTP team decides to improve it, it&#8217;s all the better for us. It gives us more tools to do our jobs. However, I&#8217;ve looked at the Mnesia and dets source codes and it&#8217;s too much for me to tackle by myself. I decided ErlyDB would give me more bang for the buck :)</p>
<p>Cheers - Yariv</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Mill</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-248</link>
		<dc:creator>Bill Mill</dc:creator>
		<pubDate>Wed, 30 Aug 2006 06:36:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-248</guid>
		<description>So, I had an erlang phase a while ago, but it seems I've forgotten a bit of it.

What do the "true = a == b" statements mean? Do I read it like I would in python - "true_ = (a == b)" where the value of the comparison between a and b is assigned to the variable true?

Sorry, those bits just confused me. Also, you have spelled Tomcat as Tomact in your code.</description>
		<content:encoded><![CDATA[<p>So, I had an erlang phase a while ago, but it seems I&#8217;ve forgotten a bit of it.</p>
<p>What do the &#8220;true = a == b&#8221; statements mean? Do I read it like I would in python - &#8220;true_ = (a == b)&#8221; where the value of the comparison between a and b is assigned to the variable true?</p>
<p>Sorry, those bits just confused me. Also, you have spelled Tomcat as Tomact in your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Mill</title>
		<link>http://yarivsblog.com/articles/2006/08/29/introducing-erlydb-the-erlang-twist-on-database-abstraction/#comment-247</link>
		<dc:creator>Bill Mill</dc:creator>
		<pubDate>Wed, 30 Aug 2006 06:36:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-247</guid>
		<description>So, I had an erlang phase a while ago, but it seems I've forgotten a bit of it.

What do the "true = a == b" statements mean? Do I read it like I would in python - "true_ = (a == b)" where the value of the comparison between a and b is assigned to the variable true?

Sorry, those bits just confused me. Also, you have spelled Tomcat as Tomact in your code.</description>
		<content:encoded><![CDATA[<p>So, I had an erlang phase a while ago, but it seems I&#8217;ve forgotten a bit of it.</p>
<p>What do the &#8220;true = a == b&#8221; statements mean? Do I read it like I would in python - &#8220;true_ = (a == b)&#8221; where the value of the comparison between a and b is assigned to the variable true?</p>
<p>Sorry, those bits just confused me. Also, you have spelled Tomcat as Tomact in your code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
