Aug 312009

At the first glance VMWare ESXi is the right way to go for VM stuffs, but later on once I found out vSphere is actually not free, I got hit, after I reimaged the Vista box and turned it to a dedicated VM box.

After going through various sources, I decided to stay with ESXi for a while, because:

  1. It will be free to me for 60 days (well, another 58 days indeed)
  2. Xen is not that easy to be setup as I can see, need to learn more
  3. VMWare Go just announced today and I will take a try later on to see how it works

So far, running 6 VMs on a dual-core/3G mem machine is acceptable, I’m going to launch more tests on this box and will remove my VMs on Virtual box soon.

Aug 282009

Now I have 5 Linux VMs up and running with mysql replication configured and tested – this is a single master setup.

I did some research around and found that dual/multiple masters is still not a good solution thinking of the potential conflicts. It seems auto increment will not be a big issue as if end user does not have direct mysql access, then they will not be able to change auto_increment_increment and auto_increment_offset. However, it is still possible that two or more masters get updates for the same record at same or close time, which will cause a tricky question – what should be the last status of the record? It’s not totally rely on when the client (of mysql) triggered the update, it also depends on how fast the replication goes.

Some people/application may not care about this too much – such as user update profile information, if it’s user him/herself edit the record from two browsers and hit submit at almost the same time, it’s up to him/her to take the risk. However, this is extrem dangerous if this is a transaction system, that something to do with money, so again, it’s up to developer to decide using dual/multiple masters or not. If the application itself can guarantee different clients won’t write to same record at the same or close time (or better be never), such as data are geo-related, then multiple master is still a good solution.

Anyway, since dual/multiple masters won’t give me any benifit (no performance gain, no improvement on reliability), so I will leave the test to the future. For now, I will just leave the replication there (well, will add some monitoring stuffs) and go with mysql proxy test.


Aug 272009

I don’t run auto-update for all those machines, so I have to run these every couple of days:

ssh -t ubuntu “sudo apt-get update && sudo apt-get -y dist-upgrade”
ssh -t debian “sudo apt-get update && sudo apt-get -y dist-upgrade”
ssh -t fedora “sudo yum -y update”
ssh -t centos “sudo yum -y update”
ssh -t opensuse “sudo zypper -n update ”
ssh -t mandriva “sudo urpmi –auto-update –auto-orphans –force”

Aug 262009

I’m trying to test mysql replication and mysql proxy, and later on will try some grid thing to see how current web sites setup their environment. This is a great chance to me to try out different Linux distro, running in VirtualBox on my home Vista machine (4 core 6G mem 😉 ).

I did some research around and tried to figure out what are the most popular distro, after trying wikipedia, distrowatch, and some other sites, I listed candidates here (by priority):

  • Ubuntu and Debian
  • Fedora and CentOS
  • openSUSE
  • Gentoo
  • Slackware
  • Mandriva

Soon I gave up Gentoo as it may take too long to build up the system, though I’m not quite sure, and I believe small start-up cannot afford the time. I tried Slackware which … I cannot figure out how to proceed installation, I believe I’m just to stupid to dig things out but obviously it is not what I want. Mandriva finally became one (I can install 6 distro in total), though it is not that easy to find its 64-bit free edition.

Alright, time to install – all these distro are really friendly on installation. Put a disc in, boot machines up, and instruction after that were all clear enough. All these distro have both graphical and text mode, and I used to choose text mode. Mandriva and openSUSE don’t have SSH server installed by default, which is not that good, and their firewall setup by default does not open for SSH (sure thing as SSH server is not installed). Ubuntu/Debian and Fedora/CentOS by default installed quite a lot packages that I don’t want them at all, but anyway it’s better than missing packages 🙂 . All distro asked for my own account but at least Mandriva didn’t install sudo for me, which is tricky. I have to say, Ubuntu is doing great job on these stuffs, almost made everything I want on the default installation.

Now, after installation, I want to do couple of things:

  1. Remove unrelated packages
  2. Update the system to latest packages
  3. Install mysql server/mysql proxy, etc

Now, CentOS becomes the worst distro, while I was trying to do “yum remove <some packages>”, it can correctly (?) determine the dependencies. However, it seems it was not doing the right order to uninstall packages, things like gconf and gtk gave me great headache to make things clean, and finally I have to get all (non-necessary) packages back to the system as I don’t want to break anything.

openSUSE is another tricky one – it is not bad but I don’t quite understand the design goal. For example, I was trying to remove some x86_64 packages, it would do that for me, but also try to install 32bit x86_64 packages, or downgrade the version, or install something else (such as for the missing lib). This is ridiculous, if the package is providing some necessary libraries, just tell me there are dependency there and I can decide if I want to remove the dependencies or not, and whenever I want to remove a specific package, I don’t mind if it is 32bit.i386 or 32bit.x86_64, ot 64bit.x86_64 – just remove it for me.

openSUSE got another problem is that CD/DVD is by default in the distro repository (guess it is because I installed from DVD), so without removing the repo, every time it would ask me put the installation disc in, which is too bad. Luckily, zypper clearly told me how to remove a repo entry and things worked perfectly after that.

Mandriva has the same problem as openSUSE and removing CD/DVD from repository is not supported by urpmi, but find out the configuration file is not that hard, and “#” is the standard way to comment entries out, which is fair enough.

I haven’t tested more yet, but based on my experience playing with couple of distros, I would like to rate Ubuntu and Debian as the best, Fedora is really close to these two, Mandriva and openSUSE is a little bit behind, and CentOS is something better to avoid.

All about installation, nothing else. 🙂

Aug 232009

Just to mark here – this is the only one works for me:

I’m trying to migrate some VMs to the Vista Ultimate so that I can utilize all those 4 cores and 6G memory.

I need to test some mysql proxy and master/slave things, and better try it out in different environments.

Aug 212009

I didn’t post anything here in the past couple of days as I was busy on pys60 stuffs, pretty fun and made progress.

Here are some issues I solved or partially solved (say, work around), some of them may look stupid to experience S60 or Python developers but thinking of I’m new to both …

  1. Access point selection, old version used to ask for selecting access point once it’s trying to establish connection to server. Some articles saying by import btsocket module as socket will solve the problem, but actually it does not work. The right solution is using the new feature from pys60 1.9.x (I believe this is the right version), that is, socket itself not support set_default_access_point, which is similar to btsocket’s method in same name, but taking name of the access point (the string) as the parameter which is actually more convenience than btsocket
  2. It seems loading time is really long (well, depends on how many modules to be loaded), so put something like a appuifw.note(“something”) at the very beginning, just after one import appuifw (remember don’t import all other modules) is much more user friendly
  3. combo in Form is way too hard to use, you have to have access to the combo value through form object, which is not convenience at all
  4. e32dbm … support string ONLY, and better encode/decode everything with utf-8, otherwise it will be all sort of problems to sync up the encoding.

There are some other minor findings such as different between list (it’s an array!!!) and a map. However, I’m still having problem in dealing with UI, at this moment I want to have a tab with two text boxes, one for showing the conservation (in and out messages), and the other one used to input message. I haven’t got any ideas how to make it, so far. It seems Canvas is the direction, but output text with line wrapping is way to hard to do to me.

I will post things here once I get any progress, but I would like to guess that won’t be significant in near future.

Aug 172009

Hey, I’ve made good progress on E90’s IM (jabber client).

There are two threads that I’m currently working on, one is UI stuffs that I got everything from a book, the other one is XMPP protocol that I got information from xmpppy project’s sample (and yes, I’m using this project now as it seems to have minimum external dependencies). UI goes well, though I haven’t done anything in real yet, and I just made some good progress with XMPP protocol – I’ve been able to log into my test accounts and send/receive messages.

Now I need to speed up the UI progress as I need some basic UI so to make things working smoothly (such as now I have to shutdown my handset to quit the test program, which is SUPER ugly). I will check around and if there is nothing useful than that, I will register a new project on sourceforge, and wish this becomes my second product-level project (1st one is the mail alert but I’m no longer using it).

Aug 172009

Some guy showed me how to use GarageBand to create fancy music thing during a open house event of a piano school, it was pretty impressive and he told me the software is free from Mac, so I decided to give it a try.

Pity once I got home, after checking the PowerBook (but it’s running the latest Leopard), I found no GarageBand at all. It seems it’s part of iLife, which is not free – It could be free for new Mac buyers but obviously I’m not.

Then someone post a review on Apple’s new Snow Leopard, there are only two things I got from the article – 64-bit support, and office usage. I don’t think my old PowerBook qualifies to either of them, so most likely it will run current Leopard forever.

Aug 172009

I believed the old video card from the HP desktop I purchased last year has no use at all so I threw it away about a week back just after I came back from vacation, but obviously I did something wrong.

Today I got a mail from HP saying that I can get that one replaced, pity I don’t have it any more, and have to mention – I did this while I kept telling myself “be patient”.

Unlucky again, but I will be more patient in the future to make sure I won’t make similar mistakes again, in other more important pieces of my life.