A few days ago I saw an article about Semi-Synchronous Replication in MySQL 5.5. It
asks questions, and doesn't give answers beyond gut feeling. So I
thought that I would do some practical testing of this new
feature.
Before we go that way, though, let's revisit the theory.
How semi-synchronous replication works
Figure 1. A transaction with regular replication
With regular replication, you send a transaction to the master
(1). When the COMMIT
is received, the master
executes it (2), and if successful it logs the transaction to the
binary log (3). The the master answers the client request (4)
with a successful result. In the meantime, the slaves replicate
the record (5).
What happens if the master crashes after point #4 and before a
slave has had a chance of getting the data in point #5?
…
If you have tried Quick start guides: MySQL cluster in 10
minutes, you may have realized that it is really quick
and easy. However, it leaves some typing to be done. Users of MySQL Sandbox have a horror of repetitive typing, and this got me thinking. "Could I integrate MySQL Sandbox and Cluster?" The answer was: "Sure." But then I started thinking of all the minor and major changes that I wanted to do to the Sandbox and have delayed for too long. What I need, is a radical refactoring. And then I remembered that it has been almost two years since I learned a new programming language and that perhaps I could expand my horizons … |
The latest release of MySQL Sandbox, 3.0.12, has integrated plugin
installation features, as mentioned in my previous post. Not only that. This version has also more tests, fixes a couple of bugs, and introduces basic instrumentation. Now each script released with MySQL Sandbox, and every one that the Sandbox itself installs, can leave a trail in a file. |
Let's start with the plugin. The documentation has been updated to cover this
new feature. And 27 new tests give me some confidence that it …
So I told myself "I wish I had a tool that installed plugins
instantly and painlessly, the way MySQL Sandbox installs a
server.
There you go. So yesterday I had enough of suffering and have put
together an installation script that does a good job of
installing several plugins with little or no effort.
OverviewHow does it work? For now, it's a separate script, but it
will soon end into SBtool, the Sandbox tool.
Plugins need different operations, and the difficult part is
finding a clear way of …
|
On January 15th I will be in Sydney, Au, on my way to Wellington, New Zealand. I will be at the MySQL User Group, hosted at the Sydney Mechanics’ School of Arts at 5.30pm. I will talk about testing complex database systems with MySQL Sandbox. The meeting is open to all. If you want to attend, please register at the Sydney MySQL User Group meetup page. |
|
Jeremy Zawodny of Craiglist has written a kind article about MySQL Sandbox. The article, MySQL Sandbox: Treat MySQL Instances like Virtual Machines, is a practical test of MySQL Sandbox with usage examples and warm appreciation. Thanks, Jeremy! |
The article was published in July but I noticed it only today. I
guess I should pay more attention to my favorite topics when I
travel.
|
On Friday afternoon, I went to give a presentation about MySQL advanced features at the Sardegna Ricerche technology park. The presentation included a quick introduction to MySQL Sandbox, something that I have been doing for years, and I thought I could do blindfold, if required. However, something didn't go as expected. |
Just when I was showing off how easy is it to install a MySQL sandbox from a tarball, I was faced by an unexpected error. The tar application was not among the recognized ones. As soon as I saw the error, I immediately knew what had …
[Read more]
|
A few months ago, Brian Aker invited me to have a look at Gearman, saying that I could find interesting combinations with MySQL Proxy. I did not forget, and I kept thinking about interesting ways of using it. The first idea that I managed to apply is not related to Proxy, but to a practical problem that I have been keeping in reserve for years, i.e. installing replication systems from remote, without effort. |
After some fiddling around with the alternatives, I convinced
myself that Gearman is the way to go. Before I proceed to show
what I did, though, perhaps it's useful if I spend a few words
about Gearman …
|
Laziness strikes again. MySQL Sandbox was created with the intent of avoiding repetitive work when creating and using several servers. Turns out that even the current framework, which many say that is really time saving and enhances productivity, was not enough. So my desire for laziness, which is, as everybody should know a chief virtue for a programmer has made me code a shortcut script, which can joggle sandboxes as never before. |
Enter the sb script (available in version 3.0.03). Now I
can shorten my typing experience with sandboxes quite a
lot:
$ sb 5135
# same as calling
# …
[Read more]