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 😉


[lang_en]Dynamic Specifications with Rspec[/lang_en][lang_ru]Динамические спецификации в Rspec[/lang_ru]
11 May2007

[lang_en]

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:

[/lang_en]

[lang_ru]

Иногда бывают моменты, когда Вам может быть нужно создать набор спецификаций для rspec, отличающихся одним-двумя вызовами или параметрами. У меня в проекте сложилась такая ситуация, и я решил попробовать использовать возможности Ruby для динамической генерации кода чтобы, сделать spec-файлы короче и избежать дублирования.

У меня есть хелпер, который используется в нескольких универсальных темплейтах для генерации похожих страниц. Этот хелпер возвращвет URL по набору параметров и типу ссылки. Он может принимать 5 различных типов ссылок и выбрасывает исключение с случаях, когда тип ссылки не поддерживается. Без использования динамической генерации кода мне пришлось бы создать 5 различных спецификаций (по одной для каждого типа ссылок) для того, чтобы иметь возможность видеть каждый тип ссылок отдельной строкой в результатах теста. С использованием же динамической генерации код выглядит примерно так:

[/lang_ru]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
describe VideoHelper, 'when profile_video_url method called' do
  before do
    @user = mock('user')
  end
 
  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
      @user.should_receive(:login).at_least(1).times.and_return('login')
      profile_video_url(url_type, @user, 2, 'expert').should == send("#{route}_url", @user, 2, 'expert')
    end
  end
 
  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')
  end
end

[lang_en]

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.

[/lang_en]

[lang_ru]

Эта техника может быть использована даже для целых describe-секций, но я не буду приводить здесь гору кода, который получился у меня. Так или иначе, идея предельно проста: вы можете использовать любые циклы с секцией describe внутри и вызовами метода send() для динамического конструирования Вашего кода.

[/lang_ru]


MMM Release 1.0-pre3
6 May2007

[lang_en]

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.

[/lang_en]

[lang_ru]

Очередной релиз MySQL Master-Master Replication Manager – сегодня версии 1.0-pre3. Список изменений в этой версии – совсем короткий:

  • Важное исправление в поддержке нескольких кластеров – теперь вы можете использовать один мониторинговый сервер для управления несколькими кластерами (детальнее – в man-странице для mmmd_mon)
  • Добавлены man pages для скриптов mmmd_mon, mmmd_agent и mmm_control
  • Стартовые скрипты для mmmd_mon and mmmd_agent
  • Инсталляционный скрипт теперь требует наличия пакета iproute на сервере.

Как всегда, если у вас есть какие-то дополнения/пожелания/комментарии, вы можете оставить их здесь или отправить в список рассылки mmm-devel.

[/lang_ru]


MySQL Conference 2007: First Impressions and Findings
25 Apr2007

So, first two days of mysqlconf’07 are finished now. What can I say is that without any doubts: It worth it! If you’re working on some high traffic projects, some high-loaded database driven systems, etc, you definitely should attend such conferences – you’d never be able to get such big amounts of information from the best people in the industry as you can get here.

I’ve been attending mostly practical MySQL scale-out sessions and BOFs and I’ve got really controversial impressions. No – everybody was great, controversial thing is my own level – I never before was so sure that I know nothing at all! I see people here for which most of new things for me (especially in MySQL scaling) are pretty obvious and it is hard to keep myself from some kind of self-beating because I don’t know these things.

Interesting thing happened today – I clearly realized why YouTube guys got their billion and we or someone else didn’t – IMHO – one of the major factors was their ability to handle all these users traffic efficiently. They’ve got one of the best (imho) technical people in their command. I was really impressed by one of their guys (sorry, but I’m too bad in remembering people’s names) – one of the two founders – who participated in MySQL replication and scale out BOF as attendee. He clearly showed me that they’re able to grow almost without any limits because of their skills which is one of the major requirements in today’s fast changung world.

Another interesting thing was that I realized that my spoken English could be really good when people speak clearly and I understand their questions. I spoke with some guys about our mmm project, about maby things and there was no problems at all!

So, its going pretty late and tomorrow going to be a long day so I want to repeat – if you have any chance to get on such conferences, DO IT! If your company can’t help you, spend your own money or find some other solutions, but DO IT! It is the best thing could happen to YOU as professional!

P.S. Just remembered – I saw some women-DBAs today! Really smart girls! I never thought that pretty girl can become such great IT prefessional and now I know – I was really wrong.

P.P.S. Sorry to russian-speaking readers – I will definitely translate my last posts later – just when I’ll come back home from this crazy (but the best) event with 14hrs of load a day


Master-Master Replication Example using MMM
23 Apr2007

Despite of my high load at work I decided to release mmm-1.0-pre2 today. There are some small, but critical fixes added and much more coming next week (or little bit later if mysqlconf will take more time than I think).

After the first alpha release I’ve received lots of emails, some messages in mmm-devel mail list and even some bug reports in Google Code bug tracking. One of the most asked things was documentation. 😉 So, I decided to write some posts in this blog (sorry to non-sql-related readers) and them compose some docs for final release using these posts and comments from readers. This post will be first in mmm-series and will describe how to use mmm in simple master+master scheme where one master accept write requests and both masters accept read requests. This post will provide you with detailed instructions about MySQL setup, permissions setting, mmm installation and configuration and cluster management.

Read the rest of this entry