The end of May - such a lovely time of the year and a bit of a hell for each and every student. But this year it is completely different for me in the way I was selected for GSoC (omg still cannot believe I was). Anyway it is exactly one week left before the coding for GSoC 2008 starts. The right time to analyze what has been done so far and what should be done during the summer.
The first step that I took the day I was selected I started reading the MySQL documentation. No way! I let myself to relax and enjoy the life for a few days. And after that the work on the project started. And there are few things that i just have to point out. The most important one is when you start hacking into something large and new for you is a proper documentation. From this point of view MySQL documentation is just a perfect example of how things should be done. You can find almost everything related to MySQL server under documentation and internals links. The coding rules are nice and clear - exactly how I like.
The next step was investigating SIGAR API. The class structures their methods and return types are well documented. So the guys from Hyperic really deserve a big thanks, as they are doing a really great job and what is most important made my life much easier. :)
After years of coding in OO languages, going back to old C philosophy is a really hard trial. Actually for the first time you will feel yourself surrounded with enemy structures and functions which never fire an exceptions and never care about cleaning garbage after themselves but instead prefer to amuse you with unexpected stack overflows. But after you spend some time coding C you start feeling the real power of this language and the spirit of ancient code guru standing behind you. But seriuosly when we deal with DBMS the main thing we consider is how fast it operates. And nobody cares how nice your code is if it takes two hours to execute simple SELECT statement. At this point I said bye to Java and installed Netbeans C/C++.
And the last but very important thing is the research on the information_schema plugins which was done by Mark Leith and Roland Bouman. Their work helped me to better understand the basics of plugin implementation.
And now that's what you have been waiting for - the report itself. :)
Report [2008-04-21 - 2008-05-19]:
KEY ACCOMPLISHMENTS LAST WEEK
Reading, reading and after that reading again. I spend a lot of time reading the MySQL Internals guide and the MySQL 6.x server documentation. That let me gain basic concepts of information_schema database, plugins API and on how the coding is being done with MySQL. After that I made an investigation on SIGAR API. Keeping apart all the "hardest" work like IDE installation and MySQL source code downloading, I have been mostly playing with creating a simple Hello World plugins. I came up with the basic table model that is available here. (http://uosis.mif.vu.lt/~much1973/table_design.pdf)
KEY TASKS THAT STALLED LAST WEEK
Fortunately none.
KEY CONCERNS
I like the code I create to be OS independent. That's actually one of the things why I adore Java. When I started hacking deeper into the plugins implementation, I noticed that plugins cannot be used under the Windows OS. Well actually they can, but to do that you will certainly need to compile plugin's sources along with the server source code. So every time when plugin's code is being changed you will need to recompile them both. That means one thing - plugins could not be loaded at runtime they have to be built-in once and forever. The good news are that MySQL team is working on changing the way MySQL interacts with Windows API.
My next concern is about loading multiple tables. Each plugin corresponds to exactly one table in the information_schema database. As you can see above the table design includes multiple table instances. So we really need to find a way to load them all with a single "install" command (as from the end-user point of view you want the things to be done quick and without too much overhead). Fortunately, there is a very simple and nice workaround (suggested by my mentor) . We simply load the so-called loader plugin, which in turn installs all the plugins/tables we need.
TASKS IN THE UPCOMING WEEK
The primary target is finalizing the table model. As I pointed out above it is almost ready and what it needs - just a few final touches and ok from my mentor Mark Leith. The columns need to be logically grouped and sorted, a new table os_resources should be introduced and mysql_info should be converted to instance-like representation.
The second goal is to prepare myself for the actual beginning of coding. As I certainly need to have a starting point, around which the rest of the code will grow. For now I consider implementing the "loader" plugin to be that point. It will become absolutely clear by the end of this week, so you can expect an extra report with an update on that.
понедельник, 19 мая 2008 г.
Подписаться на:
Комментарии к сообщению (Atom)
Комментариев нет:
Отправить комментарий