<?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>Andrew Morgan's MySQL Cluster Database Blog &#187; MySQL Replication</title>
	<atom:link href="http://www.clusterdb.com/tag/mysql-replication/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clusterdb.com</link>
	<description>MySQL Cluster database &#38; MySQL Replication</description>
	<lastBuildDate>Mon, 23 Aug 2010 17:30:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Software preview MySQL Scriptable Replication</title>
		<link>http://www.clusterdb.com/mysql-replication/software-preview-mysql-scriptable-replication/</link>
		<comments>http://www.clusterdb.com/mysql-replication/software-preview-mysql-scriptable-replication/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 16:14:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Cluster]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=694</guid>
		<description><![CDATA[A MySQL Software preview is available which allows you to write Lua scripts to control replication on a statement-by-statement basis. Note that this is prototype functionality and is not supported but feedback on its usefulness would be gratefully received.The final version would allow much greater functionality but this preview allows you to implement filters on [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_689" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter.jpg"><img class="size-medium wp-image-689" title="MySQL per-row replication filtering" src="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter-300x153.jpg" alt="Fig. 1 MySQL per-row replication filtering" width="300" height="153" /></a><p class="wp-caption-text">Fig. 1 MySQL per-row replication filtering</p></div>
<p>A MySQL Software preview is available which allows you to write Lua scripts to control replication on a statement-by-statement basis. <strong>Note that this is prototype functionality and is not supported but feedback on its usefulness would be gratefully received.</strong>The final version would allow much greater functionality but this preview allows you to implement filters on either the master or slave to examine the statements being replicated and decide whether to continue processing each one or not.</p>
<p>After reading this article, you may be interested in trying this out for yourself and want to create your own script(s). You can get more information on the functionality and download the special version of MySQL from <a href="http://forge.mysql.com/wiki/ReplicationFeatures/ScriptableReplication" target="_blank">http://forge.mysql.com/wiki/ReplicationFeatures/ScriptableReplication</a></p>
<p>To understand how this feature works, you first need to understand the very basics about how MySQL replication works. Changes that are made to the &#8216;Master&#8217; MySQL Server are written to a binary log. Any slave MySQL Servers that subscribe to this master are sent the data from the master&#8217;s binary log; the slave(s) then copy this data to their own relay log(s). The slave(s) will then work through all of the updates in their relay logs and apply them to their local database(s). The implementation is a little more complex when using MySQL Cluster as the master&#8217;s updates may come through multiple MySQL Servers or directly from an application through the NDB API but all of the changes will still make it into the binary log.</p>
<p>MySQL Replication supports both statement and row based replication (as well as mixed) but this software preview is restricted to statement based replication. As MySQL Cluster must use row based replication this preview cannot be used with Cluster but the final implementation should work with all storage engines.</p>
<p>As show in Fig. 1 there are 4 points where you can choose to filter statements being replicated:</p>
<ol>
<li>Before the update is written to the binary log</li>
<li>After the update has been read from the binary log</li>
<li>Before the update is written to the relay log</li>
<li>After the update has been read from the relay log</li>
</ol>
<p>The final 2 interest me most as it allows us to have multiple slaves which apply different filters &#8211; this article includes a worked example of how that could be exploited.</p>
<div id="attachment_692" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_lua_modules1.jpg"><img class="size-medium wp-image-692  " title="Details for each filtering point" src="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_lua_modules1.jpg" alt="Fig. 2 Details for each filtering point" width="300" height="140" /></a><p class="wp-caption-text">Fig. 2 Details for each filtering point</p></div>
<p>The filters are written as Lua scripts. The names of the script file, module name and function names vary depending on which of these filtering points is to be used. Fig. 2 shows these differences. In all cases, the scripts are stored in the following folder: &#8220;&lt;mysql-base-directory&gt;/ext/replication&#8221;.</p>
<p>This article creates 2 different scripts &#8211; one for each of 2 slave servers. In both cases the filter script is executed after an update is read from the relay log. One slave will discard any statement of the form &#8220;INSERT INTO &lt;table-name&gt; SET sub_id = 401, &#8230;&#8221; by searching for the sub string &#8220;sub_id = X&#8221; where X is even while the second slave will discard any where X is odd. Any statement that doesn&#8217;t include this pattern will be allowed through.</p>
<div id="attachment_691" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_lua_code.jpg"><img class="size-medium wp-image-691" title="Implementation of odd/even sharded replication" src="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_lua_code-300x229.jpg" alt="Fig. 3 Implementation of odd/even sharded replication" width="300" height="229" /></a><p class="wp-caption-text">Fig. 3 Implementation of odd/even sharded replication</p></div>
<p>If a script returns TRUE then the statement is discarded, if it returns FALSE then the replication process continues. Fig. 3 shows the architecture and pseudo code for the odd/even replication sharding.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>The actual code for the two slaves is included here:</p>
<pre style="padding-left: 30px;color: #993300;font-size: 11px;font-weight: bold">slave-odd: &lt;mysql-base-directory&gt;/ext/replication/relay_log.lua</pre>
<pre style="padding-left: 30px;color: #993300;font-size: 11px">function after_read(event)
  local m = event.query
  if m then
    id = string.match(m, "sub_id = (%d+)")
    if id then
      if id %2 == 0 then
        return true
      else
        return false
      end
    else
      id = string.match(m, "sub_id=(%d+)")
        if id then
          if id %2 == 0 then
            return true
          else
            return false
          end
       else
         return false
       end
    end
  else
    return false
  end
end</pre>
<pre style="padding-left: 30px;color: #993366;font-size: 11px;font-weight: bold">slave-even: &lt;mysql-base-directory&gt;/ext/replication/relay_log.lua</pre>
<pre style="padding-left: 30px;color: #993366;font-size: 11px">function after_read(event)
  local m = event.query
  if m then
    id = string.match(m, "sub_id = (%d+)")
    if id then
      if id %2 == 1 then
        return true
      else
        return false
      end
    else
      id = string.match(m, "sub_id=(%d+)")
        if id then
          if id %2 == 1 then
            return true
          else
            return false
          end
       else
         return false
       end
    end
  else
    return false
  end
end</pre>
<p>Replication can then be set-up as normal as described in <a href="http://www.clusterdb.com/mysql-cluster/setting-up-mysql-asynchronous-replication-for-high-availability/" target="_blank">Setting up MySQL Asynchronous Replication for High Availability</a> with the exception that we use 2 slaves rather than 1.</p>
<p>Once replication has been started on both of the slaves, the database and tables should be created; note that for some reason, the creation of the tables isn&#8217;t replicated to the slaves when using this preview load and so the tables actually need to be created 3 times:</p>
<pre style="padding-left: 30px;color: #333399;font-size: 11px">mysql-master&gt; CREATE DATABASE clusterdb; mysql-master&gt; USE clusterdb; mysql-master&gt; CREATE TABLE sys1 (code INT NOT NULL PRIMARY KEY, country VARCHAR (30)) engine=innodb; mysql-master&gt; CREATE TABLE subs1 (sub_id INT NOT NULL PRIMARY KEY, code INT) engine=innodb;</pre>
<pre style="padding-left: 30px;color: 993300;font-size: 11px">mysql-slave-odd&gt; USE clusterdb; mysql-slave-odd&gt; CREATE TABLE sys1 (code INT NOT NULL PRIMARY KEY, country VARCHAR (30)) engine=innodb; mysql-slave-odd&gt; create table subs1 (sub_id INT NOT NULL PRIMARY KEY, code INT) engine=innodb;</pre>
<pre style="padding-left: 30px;color: #993366;font-size: 11px">mysql-slave-even&gt; USE clusterdb; mysql-slave-even&gt; CREATE TABLE sys1 (code INT NOT NULL PRIMARY KEY, country VARCHAR (30)) engine=innodb; mysql-slave-even&gt; CREATE TABLE subs1 (sub_id INT NOT NULL PRIMARY KEY, code INT) engine=innodb;</pre>
<p style="PADDING-LEFT: 30px">The data can then be added to the master and then the 2 slaves can be checked to validate that it behaved as expected:</p>
<pre style="padding-left: 30px;color: #333399;font-size: 11px">mysql-master&gt; INSERT INTO sys1 SET area_code=33, country="France";
mysql-master&gt; INSERT INTO sys1 SET area_code=44, country="UK";
mysql-master&gt; INSERT INTO subs1 SET sub_id=401, code=44;
mysql-master&gt; INSERT INTO subs1 SET sub_id=402, code=33;
mysql-master&gt; INSERT INTO subs1 SET sub_id=976, code=33;
mysql-master&gt; INSERT INTO subs1 SET sub_id=981, code=44;</pre>
<pre style="padding-left: 30px;color: 993300;font-size: 11px">mysql-slave-odd&gt; SELECT * FROM sys1;
+------+---------+
| code | country |
+------+---------+
|  33  | France  |
|  44  | UK      |
+------+---------+

mysql-slave-odd&gt; SELECT * FROM subs1;
+--------+------+
| sub_id | code |
+--------+------+
|   401  | 44   |
|   981  | 44   |
+--------+------+</pre>
<div id="attachment_693" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_results.jpg"><img class="size-medium wp-image-693" title="Results of partitioned replication" src="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_results-300x191.jpg" alt="Fig. 4 Results of partitioned replication" width="300" height="191" /></a><p class="wp-caption-text">Fig. 4 Results of partitioned replication</p></div>
<pre style="padding-left: 30px;color: #993366;font-size: 11px">mysql-slave-even&gt; SELECT * FROM sys1;
+------+---------+
| code | country |
+------+---------+
|  33  | France  |
|  44  | UK      |
+------+---------+
mysql-slave-even&gt; SELECT * FROM subs1;
+--------+------+
| sub_id | code |
+--------+------+
|   402  | 33   |
|   976  | 33   |
+--------+------+</pre>
<p>Fig. 4 illustrates this splitting of data between the 2 slaves &#8211; all rows from the system table are stored in both databases (as well as in the master) while the data in the subscriber table (and it would work for multiple subscriber tables too) are partitioned between the 2 databases &#8211; odd values in one, even in the other. Obviously, this could be extended to more slaves by changing the checks in the scripts.</p>
<p>As an illustration of how this example could be useful, all administrative data could be provisioned into and maintained by the master &#8211; both system and subscriber data. Each slave could then serve a subset of the subscribers, providing read-access to the administrative data <strong>and</strong>read/write access for the more volatile subscriber data (which is mastered on the &#8216;slave&#8217;). In this way, there can be a central point to manage the administrative data while being able to scale out to multiple, databases to provide maximum capacity and performance to the applications. For example, in a telco environment, you may filter rows by comparing a subscriber&#8217;s phone number to a set of area codes so that the local subscribers are accessed from the local database &#8211; minimising latency.</p>
<p>From a data integrity perspective, this approach is safe if (and only if) the partitioning rules ensures that all related rows are on the same slave (in our example, all rows from all tables for a particular subscriber will be on the same slave &#8211; so as long as we don&#8217;t need transactional consistency between different subscribers then this should be safe).</p>
<div id="attachment_690" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_cluster.jpg"><img class="size-medium wp-image-690" title="Partioned replication for MySQL Cluster" src="http://www.clusterdb.com/wp-content/uploads/2009/11/slave_filter_cluster-300x156.jpg" alt="Fig. 5 Partioned replication for MySQL Cluster" width="300" height="156" /></a> <p class="wp-caption-text">Fig. 5 Partitioned replication for MySQL Cluster</p></div>
<p>As mentioned previously this software preview doesn&#8217;t work with MySQL Cluster but looking forward to when it does, the example could be extended by having each of the slave servers be part of the same Cluster. In this case, the partitioned data will be consolidated back into a single database (for this scenario, you would likely configure just one server to act as the slave for the system data). On the face of it, this would be a futile exercise but in cases where the performance bottlenecks on the throughput of a single slave server, this might be a way to horizontally scale the replication performance for applications which make massive numbers of database writes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-replication/software-preview-mysql-scriptable-replication/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MySQL Cluster: Geographic Replication Deep-Dive webinar</title>
		<link>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 14:15:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=681</guid>
		<description><![CDATA[I will be presenting a free Webinar on Geographic Replication for MySQL Cluster at 9:00 am (UK time) on Tuesday 24 November. MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise / government workloads, supporting 99.999% availability with real time performance and linear write scalability. You can register on-line [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">I will be presenting a free Webinar on Geographic Replication for MySQL Cluster at 9:00 am (UK time) on Tuesday 24 November.</div>
<div id="attachment_409" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/08/multi_master_replication2.jpg"><img class="size-medium wp-image-409" title="multi_master_replication2" src="http://www.clusterdb.com/wp-content/uploads/2009/08/multi_master_replication2-300x158.jpg" alt="Multi-Master Replication for HA with MySQL Cluster" width="300" height="158" /></a><p class="wp-caption-text">Multi-Master Replication for HA with MySQL Cluster</p></div>
<p></p>
<p>MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise /<br />
government workloads, supporting 99.999% availability with real time performance and linear write scalability.</p>
<p>You can <a href="http://www.mysql.com/news-and-events/web-seminars/display-463.html" target="_blank">register on-line here</a>.</p>
<p>Tune into this webinar where you can hear from the MySQL Cluster product management team provide a detailed &#8220;deep dive&#8221; into one of MySQL Cluster&#8217;s key capabilities &#8211; Geographic Replication.</p>
<p>In this session, you will learn how using Geographic Replication enables your applications to:</p>
<ul>
<li>Achieve higher levels of availability within a data center or across a WAN</li>
<li>Locate data closer to users, providing lower latency access</li>
<li>Replicate to other MySQL storage engines for complex data analysis and reporting of real time data</li>
<li>Gow to get started with Geographic Replication</li>
</ul>
<p>Tuesday, November 24, 2009: 10:00 Central European time</p>
<ul>
<li>Tue, Nov 24:  09:00 Western European time</li>
<li>Tue, Nov 24:  11:00 Eastern European time</li>
</ul>
<p>The presentation will be approximately 1 hour long, including on-line Q&amp;A.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Cluster: Geographic Replication Deep-Dive &#8211; webinar replay</title>
		<link>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar-replay/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar-replay/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 11:07:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Replication]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=676</guid>
		<description><![CDATA[The recording and slides from this week&#8217;s MySQL Cluster Geographic Replication webinar is now available &#8211; download replay &#38; slides. As always the material is free. For those that missed the invitation, here is a description of the content&#8230; MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise / government [...]]]></description>
			<content:encoded><![CDATA[<p>The recording and slides from this week&#8217;s MySQL Cluster Geographic Replication webinar is now available &#8211; <a href="http://www.mysql.com/news-and-events/on-demand-webinars/display-od-449.html" target="_blank">download replay &amp; slides</a>. As always the material is free.</p>
<div id="attachment_119" class="wp-caption alignright" style="width: 310px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/05/cluster-replication.jpg"><img class="size-medium wp-image-119" title="MySQL Cluster Replication" src="http://www.clusterdb.com/wp-content/uploads/2009/05/cluster-replication-300x241.jpg" alt="MySQL Cluster Replication" width="300" height="241" /></a><p class="wp-caption-text">MySQL Cluster Replication</p></div>
<p>For those that missed the invitation, here is a description of the content&#8230;</p>
<p>MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise / government workloads, supporting 99.999% availability with real time performance and linear write scalability.</p>
<p>Tune into this webinar where you can hear from the MySQL Cluster product management team provide a detailed &#8220;deep dive&#8221; into one of MySQL Cluster&#8217;s key capabilities &#8211; Geographic Replication.</p>
<p>In this session, you will learn how using Geographic Replication enables your applications to:</p>
<ul>
<li>achieve higher levels of availability within a data center or across a WAN</li>
<li>locate data closer to users, providing lower latency access</li>
<li>replicate to other MySQL storage engines for complex data analysis and reporting of real time data</li>
<li>how to get started with Geographic Replication</li>
</ul>
<p>Presented by Andrew Morgan (Senior Product Manager, MySQL Cluster) and Matthew Keep (MySQL Cluster Product Management)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive-webinar-replay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free MySQL webinar today &#8211; High Availability Architectures for Online Applications</title>
		<link>http://www.clusterdb.com/mysql/free-mysql-webinar-today-high-availability-architectures-for-online-applications/</link>
		<comments>http://www.clusterdb.com/mysql/free-mysql-webinar-today-high-availability-architectures-for-online-applications/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 07:45:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[MySQL Cluster 7.0]]></category>
		<category><![CDATA[MySQL Cluster CGE]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=527</guid>
		<description><![CDATA[Update: You can now download a recording of the webinar and the slides from http://www.mysql.com/news-and-events/on-demand-webinars/display-od-403.html I&#8217;ll be presenting the fourth (and final) session of the MySQL for Online Applications webinar series today (29 September). Today&#8217;s High Availability Architectures for Online Applications webinar covers: MySQL Replication MySQL Cluster Distributed Replicated Block Device (DRBD) Other high-availability technologies Register here. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: </strong>You can now download a recording of the webinar and the slides from <a href="http://www.mysql.com/news-and-events/on-demand-webinars/display-od-403.html" target="_blank">http://www.mysql.com/news-and-events/on-demand-webinars/display-od-403.html</a></p>
<p>I&#8217;ll be presenting the fourth (and final) session of the <a href="http://www.mysql.com/news-and-events/web-seminars/online-apps.html" target="_blank">MySQL for Online Applications webinar series</a> today (29 September). Today&#8217;s <a href="http://www.mysql.com/news-and-events/web-seminars/display-403.html">High Availability Architectures for Online Applications</a> webinar covers:</p>
<ul>
<li>MySQL Replication</li>
<li>MySQL Cluster</li>
<li>Distributed Replicated Block Device (DRBD)</li>
<li>Other high-availability technologies</li>
</ul>
<p><a href="http://www.mysql.com/news-and-events/web-seminars/display-403.html">Register here</a>.</p>
<p>This session starts at 10:00 am Pacific Time but will be <a href="http://www.mysql.com/news-and-events/web-seminars/display-412.html">rerun tomorrow</a> at 10:00 am CET (9:00 am UK) with Ivan Zoratti presenting (I&#8217;ll be handling questions).</p>
<p>More details for today&#8217;s webinar:</p>
<p><span style="font-family: verdana, arial, helvetica, sans-serif; line-height: 23px; font-size: small; color: #202020;"> </span></p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;"><strong>Tuesday, September 29, 2009</strong></p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">Join us for the last of our 4 part webinar series exploring the different aspects of using MySQL as the backend database for online applications. With real life experience gained working with MySQL Customers such as Facebook, Alcatel Lucent and Google, this webinar series will give you the information you need to run scalable, highly available online applications.</p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">In this last installment we look at MySQL high availability technologies and architectures. We will explore the uses cases for implementing:</p>
<ul>
<li><span style="line-height: 18px;">MySQL Replication</span></li>
<li><span style="line-height: 18px;">MySQL Cluster</span></li>
<li><span style="line-height: 18px;">Distributed Replicated Block Device (DRBD)</span></li>
<li><span style="line-height: 18px;">Other high-availability technologies</span></li>
</ul>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">Also, covered will be the fundamentals of how these technologies work and how they can be combined to create a more scalable and highly available database infrastructure. Several case studies will be presented to show how these technologies have been implemented in the real world.</p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">Whether you are already using MySQL for your online application or considering it for a new project then register today to learn how you can make best use of the world&#8217;s most popular database for online applications.</p>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHO:</h4>
<p style="padding-left: 30px;"><span style="font-weight: normal; line-height: 18px; font-size: 12px;"><strong>Andrew Morgan</strong>, Senior Product Manager, MySQL</span></p>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHAT:</h4>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 15px; padding: 0px;"><strong>High Availability Architectures for Online Applications</strong> web presentation.</p>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHEN:</h4>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 15px; padding: 0px;">
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;"><strong>Tuesday, September 29, 2009: 10:00 Pacific time (America)</strong></p>
<table border="0">
<tbody>
<tr>
<td>Tue, Sep 29:</td>
<td>07:00 Hawaii time</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>11:00 Mountain time (America)</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>12:00 Central time (America)</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>13:00 Eastern time (America)</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>17:00 UTC</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>18:00 Western European time</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>19:00 Central European time</td>
</tr>
<tr>
<td>Tue, Sep 29:</td>
<td>20:00 Eastern European time</td>
</tr>
</tbody>
</table>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">High Availability Architectures for Online Applications</div>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql/free-mysql-webinar-today-high-availability-architectures-for-online-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Guide released: Scalable Authentication Services with FreeRADIUS and MySQL Cluster</title>
		<link>http://www.clusterdb.com/mysql/free-guide-released-scalable-authentication-services/</link>
		<comments>http://www.clusterdb.com/mysql/free-guide-released-scalable-authentication-services/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 14:12:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL Cluster CGE]]></category>
		<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[RADIUS]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=516</guid>
		<description><![CDATA[MySQL/Sun have releases a new white paper&#8230; Do you want to ensure that your Authentication, Authorization and Accounting (AAA) infrastructure will scale to support your business growth? As network use grows and services become more dynamic, limitations can occur which add administrative overhead, inhibit flexible scaling and impact the timely synchronization of data across the [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL/Sun have releases a new white paper&#8230;</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Do you want to ensure that your Authentication, Authorization and Accounting (AAA) infrastructure will scale to support your business growth?</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">As network use grows and services become more dynamic, limitations can occur which add administrative overhead, inhibit flexible scaling and impact the timely synchronization of data across the AAA environment.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">To address these challenges, Sun has collaborated with the FreeRADIUS server team, the most widely deployed RADIUS server in the world, to integrate the carrier-grade, real-time MySQL Cluster database with the FreeRADIUS Server.<span style="white-space: pre;"> </span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Delivering Scalable Authentication Services:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Get the whitepaper now!</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Attend Webinar</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Download our free whitepaper &#8220;Delivering Scalable and Highly Available Authentication, Authorization and Accounting Services&#8221; now to better understand:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">•<span style="white-space: pre;"> </span>The concepts of current data storage solutions for AAA environments and their potential limitations as network use grows</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">•<span style="white-space: pre;"> </span>How you can implement an infrastructure for high growth and high availability with low complexity by deploying the FreeRADIUS server and MySQL Cluster</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">•<span style="white-space: pre;"> </span>How the solution performs in real world AAA environments via a user case study. <span style="white-space: pre;"> </span> <span style="white-space: pre;"> </span></div>
<p>Do you want to ensure that your Authentication, Authorization and Accounting (AAA) infrastructure will scale to support your business growth?</p>
<p>As network use grows and services become more dynamic, limitations can occur which add administrative overhead, inhibit flexible scaling and impact the timely synchronization of data across the AAA environment.</p>
<p>To address these challenges, Sun has collaborated with the FreeRADIUS server team, the most widely deployed RADIUS server in the world, to integrate the carrier-grade, real-time MySQL Cluster database with the FreeRADIUS Server.</p>
<p>Download our free whitepaper &#8220;<a href="http://now.eloqua.com/e/er.aspx?s=287&amp;lid=2957&amp;elq=9cf36750b2f940539050c44d1582372b" target="_blank">Delivering Scalable and Highly Available Authentication, Authorization and Accounting Services</a>&#8221; now to better understand:</p>
<ul>
<li>The concepts of current data storage solutions for AAA environments and their potential limitations as network use grows</li>
<li>How you can implement an infrastructure for high growth and high availability with low complexity by deploying the FreeRADIUS server and MySQL Cluster</li>
<li>How the solution performs in real world AAA environments via a user case study.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql/free-guide-released-scalable-authentication-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Cluster: Geographic Replication Deep-Dive</title>
		<link>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 11:57:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL Cluster CGE]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=483</guid>
		<description><![CDATA[Following requests received during earlier MySQL Cluster webinars, a new (and as always, free) webinar has been scheduled which focuses on MySQL Cluster Replication. The webinar is scheduled for Thursday 10 September and you can register at http://www.mysql.com/news-and-events/web-seminars/display-415.html I&#8217;ll be on-line during the webinar, answering questions. Details&#8230;. MySQL Cluster: Geographic Replication Deep-Dive Thursday, September 10, 2009 [...]]]></description>
			<content:encoded><![CDATA[<p>Following requests received during earlier MySQL Cluster webinars, a new (and as always, free) webinar has been scheduled which focuses on MySQL Cluster Replication. The webinar is scheduled for Thursday 10 September and you can register at <a href="http://www.mysql.com/news-and-events/web-seminars/display-415.html">http://www.mysql.com/news-and-events/web-seminars/display-415.html</a></p>
<p>I&#8217;ll be on-line during the webinar, answering questions.</p>
<p>Details&#8230;.</p>
<h1 style="font-weight: bold; font-size: 21px; margin-top: 8px; margin-right: 0px; margin-bottom: 12px; margin-left: 0px; line-height: 29px; color: #015a84; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #e0e0e0;">MySQL Cluster: Geographic Replication Deep-Dive</h1>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;"><strong>Thursday, September 10, 2009</strong></p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">MySQL Cluster has been deployed into some of the most demanding web, telecoms and enterprise / government workloads, supporting 99.999% availability with real time performance and linear write scalability.</p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">Tune into this webinar where you can hear from the Director of MySQL Server Engineering provide a detailed &#8220;deep dive&#8221; into one of MySQL Cluster&#8217;s key capabilities &#8211; Geographic Replication.</p>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">In this session, you will learn how using Geographic Replication enables your applications to :</p>
<ul style="margin-top: 0px; margin-right: 4px; margin-bottom: 8px; margin-left: 16px; list-style-image: url(http://www.mysql.com/common/img/list-orange-disc.png); list-style-type: initial; list-style-position: initial; padding: 0px;">
<li style="margin-bottom: 5px; margin-left: 8px; font-size: 12px; line-height: 18px;">achieve higher levels of availability within a data center or across a WAN</li>
<li style="margin-bottom: 5px; margin-left: 8px; font-size: 12px; line-height: 18px;">locate data closer to users, providing lower latency access</li>
<li style="margin-bottom: 5px; margin-left: 8px; font-size: 12px; line-height: 18px;">replicate to other MySQL storage engines for complex data analysis and reporting of real time data</li>
<li style="margin-bottom: 5px; margin-left: 8px; font-size: 12px; line-height: 18px;">how to get started with Geographic Replication</li>
</ul>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHO:</h4>
<ul style="margin-top: 0px; margin-right: 4px; margin-bottom: 8px; margin-left: 35px; list-style-image: url(http://www.mysql.com/common/img/list-orange-disc.png); list-style-type: initial; list-style-position: initial; padding: 0px;">
<li style="margin-bottom: 5px; margin-left: 8px; font-size: 12px; line-height: 18px;"><strong>Tomas Ulin</strong>, Director, MySQL Server Technologies</li>
<li style="margin-bottom: 5px; margin-left: 8px; font-size: 12px; line-height: 18px;"><strong>Matthew Keep</strong>, MySQL Cluster Product Management</li>
</ul>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHAT:</h4>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 15px; padding: 0px;"><strong>MySQL Cluster: Geographic Replication Deep-Dive</strong> web presentation.</p>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHEN:</h4>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 15px; padding: 0px;">
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;"><strong>Thursday, September 10, 2009: 09:30 Pacific time (America)</strong></p>
<table border="0">
<tbody>
<tr>
<td>Thu, Sep 10:</td>
<td>06:30 Hawaii time</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>10:30 Mountain time (America)</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>11:30 Central time (America)</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>12:30 Eastern time (America)</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>16:30 UTC</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>17:30 Western European time</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>18:30 Central European time</td>
</tr>
<tr>
<td>Thu, Sep 10:</td>
<td>19:30 Eastern European time</td>
</tr>
</tbody>
</table>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px;">The presentation will be approximately 45 minutes long followed by Q&amp;A.</p>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHERE:</h4>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 15px; padding: 0px;">Simply access the web seminar from the comfort of your own office.</p>
<h4 style="font-weight: bold; font-size: 13px; margin-top: 14px; margin-right: 0px; margin-bottom: 2px; margin-left: 0px;">WHY:</h4>
<p style="font-size: 12px; line-height: 21px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 15px; padding: 0px;">To learn more about how you can use Geographic Replication in MySQL Cluster 7.0 to build real time, high performance applications delivering continuously available database services.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/mysql-cluster-geographic-replication-deep-dive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using NDB API Events to mask/hide colum data when replicating</title>
		<link>http://www.clusterdb.com/mysql-cluster/using-ndb-api-events-to-maskhide-colum-data-when-replicating/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/using-ndb-api-events-to-maskhide-colum-data-when-replicating/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 13:10:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NDB API]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=479</guid>
		<description><![CDATA[If you  have asynchronous replication where the slave database is using MySQL Cluster then you can use the NDB API events functionality to mask/overwrite data. You might do this for example if the replica is to be used for generating reports where some of the data is sensitive and not relevant to those reports. Unlike [...]]]></description>
			<content:encoded><![CDATA[<p>If you  have asynchronous replication where the slave database is using MySQL Cluster then you can use the NDB API events functionality to mask/overwrite data. You might do this for example if the replica is to be used for generating reports where some of the data is sensitive and not relevant to those reports. Unlike stored procedures, NDB API events will be triggered on the slave.</p>
<p>The first step is to set up replication (master-&gt;slave rather than multi-master) as described in <a href="http://www.clusterdb.com/mysql-cluster/setting-up-mysql-asynchronous-replication-for-high-availability/" target="_blank">Setting up MySQL Asynchronous Replication for High Availability</a>).</p>
<p>In this example, the following table definition is used:</p>
<pre style="padding-left: 30px;color: #993300;font-size: 11px">mysql&gt; use clusterdb;
mysql&gt; create table ASSETS (CODE int not null primary key, VALUE int) engine=ndb;</pre>
<p>The following code should be compiled and then executed on a node within the slave Cluster:</p>
<pre style="padding-left: 30px;color: #993300;font-size: 11px">#include &lt;NdbApi.hpp&gt;
#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;unistd.h&gt;
#include &lt;cstdlib&gt;
#include &lt;string.h&gt;

#define APIERROR(error) \
  { std::cout &lt;&lt; "Error in " &lt;&lt; __FILE__ &lt;&lt; ", line:" &lt;&lt; __LINE__ &lt;&lt; ", code:" \
  &lt;&lt; error.code &lt;&lt; ", msg: " &lt;&lt; error.message &lt;&lt; "." &lt;&lt; std::endl; \
  exit(-1); }

int myCreateEvent(Ndb* myNdb,
const char *eventName,
const char *eventTableName,
const char **eventColumnName,
const int noEventColumnName);

static void do_blank(Ndb*, int);

int main(int argc, char** argv)
{
  if (argc &lt; 1)
 {
    std::cout &lt;&lt; "Arguments are &lt;connect_string cluster&gt;.\n";
    exit(-1);
  }
  const char *connectstring = argv[1];

  ndb_init();

  Ndb_cluster_connection *cluster_connection=
  new Ndb_cluster_connection(connectstring); // Object representing the cluster

  int r= cluster_connection-&gt;connect(5 /* retries               */,
  3 /* delay between retries */,
  1 /* verbose               */);
  if (r &gt; 0)
  {
    std::cout &lt;&lt; "Cluster connect failed, possibly resolved with more retries.\n";
    exit(-1);
  }
  else if (r &lt; 0)
  {
    std::cout &lt;&lt; "Cluster connect failed.\n";
    exit(-1);
  }

  if (cluster_connection-&gt;wait_until_ready(30,30))
  {
    std::cout &lt;&lt; "Cluster was not ready within 30 secs." &lt;&lt; std::endl;
    exit(-1);
  }

  Ndb* myNdb= new Ndb(cluster_connection,
                      "clusterdb");  // Object representing the database

  if (myNdb-&gt;init() == -1) APIERROR(myNdb-&gt;getNdbError());

  const char *eventName= "CHNG_IN_ASSETS";
  const char *eventTableName= "ASSETS";
  const int noEventColumnName= 2;
  const char *eventColumnName[noEventColumnName]=
  {"CODE",
   "VALUE"};

  // Create events
  myCreateEvent(myNdb,
  eventName,
  eventTableName,
  eventColumnName,
  noEventColumnName);

  // Normal values and blobs are unfortunately handled differently..
  typedef union { NdbRecAttr* ra; NdbBlob* bh; } RA_BH;

  int i;

  // Start "transaction" for handling events
  NdbEventOperation* op;
  printf("create EventOperation\n");
  if ((op = myNdb-&gt;createEventOperation(eventName)) == NULL)
    APIERROR(myNdb-&gt;getNdbError());

  printf("get values\n");
  RA_BH recAttr[noEventColumnName];
  RA_BH recAttrPre[noEventColumnName];

  for (i = 0; i &lt; noEventColumnName; i++) {
    recAttr[i].ra    = op-&gt;getValue(eventColumnName[i]);
    recAttrPre[i].ra = op-&gt;getPreValue(eventColumnName[i]);
  }

  // set up the callbacks
  // This starts changes to "start flowing"
  if (op-&gt;execute())
    APIERROR(op-&gt;getNdbError());

  while (true) {
    int r = myNdb-&gt;pollEvents(1000); // wait for event or 1000 ms
    if (r &gt; 0) {
      while ((op= myNdb-&gt;nextEvent())) {
        NdbRecAttr* ra = recAttr[0].ra;
        if (ra-&gt;isNULL() &gt;= 0) { // we have a value
          if (ra-&gt;isNULL() == 0) { // we have a non-null value
            printf("CODE: %d ", ra-&gt;u_32_value());
            do_blank(myNdb, ra-&gt;u_32_value());
          } else
            printf("%-5s", "NULL");
          } else
            printf("%-5s", "-"); // no value
            ra = recAttr[1].ra;
            printf("\n");
          }
        }
      }
    }

int myCreateEvent(Ndb* myNdb,
                  const char *eventName,
                  const char *eventTableName,
                  const char **eventColumnNames,
                  const int noEventColumnNames)
{
  NdbDictionary::Dictionary *myDict= myNdb-&gt;getDictionary();
  if (!myDict) APIERROR(myNdb-&gt;getNdbError());

  const NdbDictionary::Table *table= myDict-&gt;getTable(eventTableName);
  if (!table) APIERROR(myDict-&gt;getNdbError());

  NdbDictionary::Event myEvent(eventName, *table);
  myEvent.addTableEvent(NdbDictionary::Event::TE_INSERT);

  myEvent.addEventColumns(noEventColumnNames, eventColumnNames);

  // Add event to database
  if (myDict-&gt;createEvent(myEvent) == 0)
    myEvent.print();
  else if (myDict-&gt;getNdbError().classification ==
            NdbError::SchemaObjectExists) {
    printf("Event creation failed, event exists\n");
    printf("dropping Event...\n");
    if (myDict-&gt;dropEvent(eventName)) APIERROR(myDict-&gt;getNdbError());
    // try again
    // Add event to database
    if ( myDict-&gt;createEvent(myEvent)) APIERROR(myDict-&gt;getNdbError());
  } else
    APIERROR(myDict-&gt;getNdbError());

    return 0;
}

static void do_blank(Ndb* myNdb, int code)
{
  const NdbDictionary::Dictionary* myDict= myNdb-&gt;getDictionary();
  const NdbDictionary::Table *myTable= myDict-&gt;getTable("ASSETS");

  if (myTable == NULL)
  APIERROR(myDict-&gt;getNdbError());

  NdbTransaction *myTransaction= myNdb-&gt;startTransaction();
  if (myTransaction == NULL) APIERROR(myNdb-&gt;getNdbError());

  printf("Replacing VALUE with 0 for CODE: %d ", code);

  NdbOperation *myOperation= myTransaction-&gt;getNdbOperation(myTable);
  if (myOperation == NULL) APIERROR(myTransaction-&gt;getNdbError());

  myOperation-&gt;updateTuple();
  myOperation-&gt;equal("CODE", code);
  myOperation-&gt;setValue("VALUE", 0);

  if (myTransaction-&gt;execute( NdbTransaction::Commit ) == -1)
    APIERROR(myTransaction-&gt;getNdbError());

  myNdb-&gt;closeTransaction(myTransaction);
}

shell&gt; slave_filter 127.0.0.1:1186</pre>
<p>From the master Cluster, insert some values (note that the example can easily be extended to cover updates too):</p>
<pre style="padding-left: 30px;color: #993300;font-size: 11px">mysql&gt; insert into ASSETS values (101, 50),(102, 40), (103, 99);</pre>
<p>and then check that on the slave the value has been set to 0 for each of the entries:</p>
<pre style="padding-left: 30px;color: #993300;font-size: 11px">mysql&gt; select * from ASSETS;
+------+-------+
| CODE | VALUE |
+------+-------+
|  100 |     0 |
|  103 |     0 |
|  101 |     0 |
|  102 |     0 |
+------+-------+</pre>
<p>How this works&#8230;. The table data is replicated as normal and the real values are stored in the slave. The &#8220;slave_filter&#8221; process has registered against insert operations on this table and when it&#8217;s triggered it sets the VALUE field to 0. The event is processes asynchronously from the replication and so there will be some very narrow window during which the true values would be stored in the slave.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/using-ndb-api-events-to-maskhide-colum-data-when-replicating/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Cluster &#8211; flexibility of replication</title>
		<link>http://www.clusterdb.com/mysql-cluster/mysql-cluster-flexibility-of-replication/</link>
		<comments>http://www.clusterdb.com/mysql-cluster/mysql-cluster-flexibility-of-replication/#comments</comments>
		<pubDate>Tue, 26 May 2009 16:49:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL Cluster]]></category>
		<category><![CDATA[MySQL Replication]]></category>
		<category><![CDATA[HA]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[MySQL Cluster CGE]]></category>

		<guid isPermaLink="false">http://www.clusterdb.com/?p=120</guid>
		<description><![CDATA[One of the better kept secrets about MySQL Cluster appears to be the flexibility available when setting up replication. Rather than being constrained to implementing a single replication scheme, you can mix and match approaches. Just about every Cluster deployment will use synchronous replication between the data nodes within a node group to implement High [...]]]></description>
			<content:encoded><![CDATA[<p>One of the better kept secrets about MySQL Cluster appears to be the flexibility available when setting up replication. Rather than being constrained to implementing a single replication scheme, you can mix and match approaches.</p>
<p>Just about every Cluster deployment will use synchronous replication between the data nodes within a node group to implement High Availability (HA) by making sure that at the point a transaction is committed, the new data is stored in at least 2 physical hosts. Given that MySQL Cluster is usually used to store the data in main memory rather than on disk, this is pretty much mandatory (note that the data changes are still written to disk but that&#8217;s done asynchronously to avoid slowing down the database).</p>
<div id="attachment_119" class="wp-caption alignleft" style="width: 410px"><a href="http://www.clusterdb.com/wp-content/uploads/2009/05/cluster-replication.jpg"><img class="size-medium wp-image-119" title="MySQL_Cluster_Replication" src="http://www.clusterdb.com/wp-content/uploads/2009/05/cluster-replication-300x241.jpg" alt="MySQL Cluster Replication" width="300" height="241" /></a><p class="wp-caption-text">MySQL Cluster Replication</p></div>
<p>MySQL asynchronous replication is often used for MySQL Cluster deployments in order to provide Geographic Redundancy. At the same time as the synchronous replication within a Cluster, the changes can be replicated asynchronously to a second Cluster (or to more than one) at a remote location. Asynchronous rather than synchronous replication is used so that the transaction commit is not delayed while waiting for the remote (could be thousands of miles away, connected by a high latency WAN) Cluster to receive, apply and acknowledge the change. A common misconception is that changes being made through the NDB API will not be replicated to the remote site as this replication is handled by a MySQL Server instance &#8211; the reality is that the MySQL Replication implementation will pick up the changes even when they&#8217;re written directly to the data nodes through the NDB API.</p>
<p>A third use of replication is to store the Cluster&#8217;s data in a seperate database &#8211; for example to have a read-only, up-to-date copy of the data stored within the MyISAM storage engine so that complex reports can be generated from it. And the best news is that this can be done at the same time as the local HA and remote Geographic Redundancy replication!</p>
<p><a title="Johan's MySQL Cluster BLOG" href="http://johanandersson.blogspot.com" target="_blank">Johan&#8217;s Blog</a> provides the technical details around <a title="HA MySQL, write scaling using Cluster to non-cluster replication " href="http://johanandersson.blogspot.com/2009/05/ha-mysql-write-scaling-using-cluster-to.html" target="_blank">configuring replication in order to provide some extra scaling by setting up non-Cluster slave databases </a>that pick up all changes from the Cluster database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clusterdb.com/mysql-cluster/mysql-cluster-flexibility-of-replication/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
