MySQL UC 2007 Videos are Available!
25 May2007

Thanks to MySQL community members we’ve got really great collection of media files from the recent mysqluc. Thanks to Seeri for all that work he’s done to collect everything in one place so we could watch/listen/read information from this great event.

So, if you did not attended mysqluc07, then you definitely should visit Technocation page, dedicated to this conference.

P.S. I’m going to post links to these videos and descriptions for the sessions on the Best Tech Videos soon, so If you are not sure to watch some video or not, just wait while I’m merging these links with information from mysqluc site.

MMM Release 1.0-pre4
16 May2007

New alpha release 1.0-pre4 of the MySQL Master-Master Replication Manager. This release has lots of major fixes and I’m glad to announce first sponsored port of mmm to non-linux platform – it has been ported to Solaris 10. So, here are our changes in this version:

  • Real checks timeouts – I’ve found and fixed lots of problems in checks timeout code and now if you specified in your mmm_mon.conf, that some check should timeout in 5 sec, it would timeout correctly on all supported platforms.
  • External third-party tools using – On all supported non-linux platforms mmm will use system binaries for fping and arp_ping so porting to another platforms would be much easier.
  • Agent notifications fix – Now we don’t try to notify dead agents about cluster changes and additionally we have 10 sec timeout on notification sends to prevent monitoring from lagging on network connection timeouts.
  • Bundled fping and send_arp – We have both used third-party tools used in mmm bundled in our distribution as separate build trees (you could find and build/install them from contrib directory).
  • Flexible perl binary location – We’re using “#!/usr/bin/env perl” as shebang line in our perl scripts so you can use any perl interpreter just by placing it earlier in your PATH variable.

Notice: If you’ll try to install this version, try to run bin/sys/fping and bin/sys/send_arp on your server before installation. If you’ll notice any errors, feel free to build binaries for your platform using contrib/* sources (you’ll need gcc and libnet installed).

So, as you can see, mmm development goes forward and we’re fixing some problems trying to make this software mature. If you want to help us, you can send your comments to mmm-devel mailing list, post your bug reports to our bug tracking or sponsor any changes you need 😉

Dynamic Specifications with Rspec
11 May2007

Sometimes you may need to create a set of rspec specifications with pretty similar structure and small differences. I’ve got such situation in my project and decided to try to use Ruby’s dynamic code generation features to make my spec file shorter.

I have some multiplexing helper in my templates which allows me to use the same template for different similar pages. This helper returns URL from the set of params and a type. It could accept 5 different url types and raises an Exception when requested URL type is invalid. Without this dynamic code generation feature I would need to create 5 different specifications (one for each URL type) to be able to see each URL type test as a separate line in test results log. But with this simple technique my code looks like following now:

describe VideoHelper, 'when profile_video_url method called' do
  before do
    @user = mock('user')
  url_types = {
    'personal_feed' => 'personal_feed',
    'favorites' => 'favorites',
    'voted' => 'voted_videos',
    'posted' => 'posted_videos',
    'commented' => 'commented_videos'
  url_types.each do |url_type, route|
    it "should return #{route}_url for #{url_type} type urls" do
      profile_video_url(url_type, @user, 2, 'expert').should == send("#{route}_url", @user, 2, 'expert')
  it 'should raise ArgumentError("Invalid feed type") on invalid url_types' do
    lambda { profile_video_url('crap', @user, 2, 'expert') }.should raise_error(ArgumentError, 'Invalid feed type')

This technique could be used even to create entire describe sections, but I would not like to show tons of code here. Anyways, the idea is pretty simple: you could use some loop with nested describe section and send() method calls to dynamically construct your code.

MMM Release 1.0-pre3
6 May2007

MySQL Master-Master Replication Manager version 1.0-pre3 has been released today. Changes list is really short now:

  • Major fix in multiple clusters support – now you can use many clusters with one monitoring node (details are in mmmd_mon man page)
  • Man pages for mmmd_mon, mmmd_agent and mmm_control scripts
  • Startup scripts added/fixed for mmmd_mon and mmmd_agent
  • Installation script now requires iproute package to be installed on server.

As always, if you have any questions/suggestions, post them here or in mmm-devel mail list.