<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fernando Ipar &#187; Highbase</title>
	<atom:link href="http://fernandoipar.com/category/highbase/feed/" rel="self" type="application/rss+xml" />
	<link>http://fernandoipar.com</link>
	<description>I love mankind! Its people I can&#039;t stand!</description>
	<lastBuildDate>Wed, 07 Jul 2010 04:10:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>highbase beta-0.9.4</title>
		<link>http://fernandoipar.com/2009/02/27/highbase-beta-094/</link>
		<comments>http://fernandoipar.com/2009/02/27/highbase-beta-094/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 23:01:03 +0000</pubDate>
		<dc:creator>fernando</dc:creator>
				<category><![CDATA[Highbase]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://fernandoipar.com/?p=106</guid>
		<description><![CDATA[Heavy testing, headphones with no music, lots of Sanchez Gran Reserva, headphones with Miles Davis, more testing, an updated Installation Guide, Charles Mingus &#38; Eric Dolphy, and I still couldn&#8217;t get a Release Candidate out. Well, such is the life of the multi purpose hacker. Other people are always finding out new purposes for you, [...]


Related posts:<ol><li><a href='http://fernandoipar.com/2009/01/28/rewriting-highbase-in-erlang/' rel='bookmark' title='Permanent Link: Rewriting Highbase in Erlang'>Rewriting Highbase in Erlang</a> <small>Why? Highbase is currently comprised of several shell scripts  and...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Heavy testing, headphones with no music, lots of <a title="Sanchez Gran Reserva : Costa Rican Coffee" href="http://www.costaricacoffeeshop.com/shopexd.asp?id=10" target="_blank">Sanchez Gran Reserva</a>, headphones with Miles Davis, more testing, an updated <a title="Highbase : Installation guide" href="http://highbase.seriema-systems.com/staticpages/index.php?page=20080615InstallGuide" target="_blank">Installation Guide</a>, Charles Mingus &amp; Eric Dolphy, and I still couldn&#8217;t get a Release Candidate out.</p>
<p>Well, such is the life of the multi purpose hacker. Other people are always finding out new purposes for you, which makes your free time aproach zero.</p>
<p>Does this mean that the release date of rc-1 will never come? Nah, I don&#8217;t think so. I have high hopes for the next iteration.</p>
<p>Wanna help me? Please test the installation guide, and then test the cluster itself. There&#8217;s a contact mail in the guide (yep, I don&#8217;t fear spam, I love it, it&#8217;s great for art).</p>
<p>Thanks to the 5000+ anonymous folks who bothered to download this, and thanks to all the people who contributed patches throughout these years.</p>


<p>Related posts:<ol><li><a href='http://fernandoipar.com/2009/01/28/rewriting-highbase-in-erlang/' rel='bookmark' title='Permanent Link: Rewriting Highbase in Erlang'>Rewriting Highbase in Erlang</a> <small>Why? Highbase is currently comprised of several shell scripts  and...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://fernandoipar.com/2009/02/27/highbase-beta-094/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rewriting Highbase in Erlang</title>
		<link>http://fernandoipar.com/2009/01/28/rewriting-highbase-in-erlang/</link>
		<comments>http://fernandoipar.com/2009/01/28/rewriting-highbase-in-erlang/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 03:28:42 +0000</pubDate>
		<dc:creator>fernando</dc:creator>
				<category><![CDATA[Highbase]]></category>
		<category><![CDATA[Erlang]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://fernandoipar.com/?p=70</guid>
		<description><![CDATA[Why? Highbase is currently comprised of several shell scripts  and some C code. It&#8217;s actually a good project (talk about self promotion) that hasn&#8217;t reached a stable release yet just because It hasn&#8217;t been tested enough in production environments I&#8217;ve been amazingly busy during the last years. Lots of work, and lots of parenting in [...]


Related posts:<ol><li><a href='http://fernandoipar.com/2009/02/27/highbase-beta-094/' rel='bookmark' title='Permanent Link: highbase beta-0.9.4'>highbase beta-0.9.4</a> <small>Heavy testing, headphones with no music, lots of Sanchez Gran...</small></li><li><a href='http://fernandoipar.com/2009/02/02/i-love-playing-monopoly/' rel='bookmark' title='Permanent Link: I love playing Monopoly'>I love playing Monopoly</a> <small>This is the latest speed test I run against Santiago...</small></li></ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<h1>Why?</h1>
<p><a title="Highbase : High availability for MySQL" href="http://highbase.seriema-systems.com">Highbase</a> is currently comprised of several shell scripts  and some C code. It&#8217;s actually a good project (talk about self promotion) that hasn&#8217;t reached a stable release yet just because</p>
<ol>
<li>It hasn&#8217;t been tested enough in production environments</li>
<li>I&#8217;ve been amazingly busy during the last years. Lots of work, and lots of parenting in the last two and a half years in particular.</li>
</ol>
<p>Still, it&#8217;s real close to a release candidate, and I will continue testing and fixing the main branch. However, I believe writing a new version in <a title="Erlang. Concurrent, distributed, fault tolerant programming" href="http://www.erlang.org">Erlang</a> has many advantages:</p>
<ol>
<li>Erlang was designed from the ground up with reliability in mind (among other things. It&#8217;s quite popular now due to it&#8217;s multi-core-friendlyness, but that&#8217;s not really useful for a project like this), so it&#8217;s only natural to use it to develop a high availability solution (you know, the &#8220;best tool for the job&#8221; mentality)</li>
<li>Except for the mysql service verification (I wouldn&#8217;t want to go with odbc), and perhaps gratuitious ARP (I&#8217;m not sure at this point), rewriting in Erlang would remove all other dependencies in third party packages. In general, it would make the solution more mantainable and hence more reliable (see point 1).</li>
</ol>
<p>I already wrote a first draft in Erlang about a year ago, but this was when I was just learning the language, so I didn&#8217;t take advantage of it&#8217;s best features for reliability. Actually, the problem was I wrote my version using &#8216;pure&#8217; Erlang, dismissing the OTP part. Erlang as a language is OK (it has anything you need to write reliable,concurrent software). Erlang/OTP is a powerful thing, in the sense that it abstracts you, as a programmer, from the low level chores of distributed, concurrent and fault tolerant programming. You just have to focus on your programming logic, and by following some conventions (Behaviours, which for OO people could loosely be related to Interfaces and Base Clases) you get a lot of extra functionality for free.</p>
<h1>How?</h1>
<p>This new rewrite will be done using the gen_server behaviour, together with events. All this free to use from OTP.</p>
<p>Here&#8217;s a state diagram with an initial draft of the slave routine (done with <a title="Visual Paradigm. Modeling tools. " href="http://www.visual-paradigm.com/">Visual Paradigm</a>):</p>
<div class="mceTemp">
<dl id="attachment_69" class="wp-caption alignnone" style="width: 676px;">
<dt class="wp-caption-dt"></dt>
<dd class="wp-caption-dd">Highbase&#8217;s state diagram</dd>
<dt class="wp-caption-dt"><a href="http://fernandoipar.com/wp-content/uploads/2009/01/highbase.jpg"><img class="size-full wp-image-69" title="State diagram" src="http://fernandoipar.com/wp-content/uploads/2009/01/highbase.jpg" alt="Highbase's state diagram" width="666" height="416" /></a></dt>
</dl>
</div>
<p><strong></strong></p>
<p>Without reading a line of code, here you can get a grasp of the power of OTP. The slave routine is, in it&#8217;s normal state, just waiting for an event. So far, I&#8217;ve identified the following events:</p>
<ul>
<li>service down</li>
<li>link down (erlang link down, would probably be due to the master node being down)</li>
<li>shutdown request</li>
</ul>
<p>In the first case, just as today, we first attempt to restart the service, and if this fails, we go for a takeover. If restart fails, we first to a failover (i.e., shutdown of the master node, this is the same algorithm executed on our <a title="Highbase - the current trunk" href="http://highbase.svn.sourceforge.net/viewvc/highbase/trunk/highbase/">current code branch</a>).</p>
<p>In the second case, if the node is down, it&#8217;s just a takeover. If the node is up, we do a takeover with ARP spoofing, because we assume there&#8217;s something weird with the other node. This part of the algorithm can be improved (we could do another verification, go back to the waiting for event state for N times, etc., this is just a draft).</p>
<p>Still, one of the improvements over the current version is that I don&#8217;t have to handle any loops, OTP handles that for me, all I have to do is write the callback functions (waiting_for_event, restarting_service, etc). Less code = less chance of errors.</p>
<h1><strong>When?</strong></h1>
<p>I&#8217;m currently revewing the design of the new algorithm. I hope to have a draft in two weeks (this is a slow week for me, my daughter is starting preschool education next week and hence my house is kinda crazy).</p>
<p>I&#8217;m also overdue with regular Highbase releases so I&#8217;ll try to get up to date with both trees.</p>
<p>The current erlang tree is <a title="Highbase: the old erlang tree" href="http://highbase.svn.sourceforge.net/viewvc/highbase/trunk/mysql-ha-erl/">mysql-ha-erl</a> (legacy name, before the trademark issues). I&#8217;ll surely be creating a new tree, highbase-erl, during the next few days. Official release news will be broadcasted here from the official site.</p>


<p>Related posts:<ol><li><a href='http://fernandoipar.com/2009/02/27/highbase-beta-094/' rel='bookmark' title='Permanent Link: highbase beta-0.9.4'>highbase beta-0.9.4</a> <small>Heavy testing, headphones with no music, lots of Sanchez Gran...</small></li><li><a href='http://fernandoipar.com/2009/02/02/i-love-playing-monopoly/' rel='bookmark' title='Permanent Link: I love playing Monopoly'>I love playing Monopoly</a> <small>This is the latest speed test I run against Santiago...</small></li></ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://fernandoipar.com/2009/01/28/rewriting-highbase-in-erlang/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
