Archive for the ‘Open Source’ Category

KDE 4.1: On Windows Vista

Wednesday, August 6th, 2008

It’s been a very long journey, from promises to reality. From potential to something we can really see. Qt decision on supporting other platform, in this case Windows, has been correct afterall. Enabling Qt to run on Windows, significantly has made many application become more portable. It was once before Qt 4 came, portabily is somewhat some people can only dream. Now, google earth runs in Windows, on Qt (need fact check). Marble, was really written in Linux, can now be enjoyed by Windows user.

That are not all. This year KDE came along as well. Having been built on top of Qt, KDE follows where Qt has gone. KDE 4.1, is now available as well in Windows. Not all bells and whistles are available, but still it’s a pretty awesome stuff not to be missed. Not only KDE 4.x has been a major architecture revamping effort within KDE history, KDE 4.x also brought new experiences to taste. Plasma has been the most discussed matter, as it is the frontline of KDE. The first thing user will see would be the desktop, as plasmoid.

Having KDE 4.x desktop has been refreshing (here is KDE in all its glory), though not all experiences are polished. However, Windows has been a lonesome OS without not many refreshment within short interval — Windows 7 still far on the horizon. On the other side users have been loving new fresh stuff in every seconds of their life. Desktop shell has been ranging from a openbox-like UI, without many user friendliness on configuration and usability aspect, into style enhancement (Windows Blind, StyleXP) or desktop enrichment like the once popular Object Desktop.

Now the time has come to enjoy new experience, a new concept of usabilty implementation, KDE style. Yes it means, configurable, DIY while still focusing on best user experience out of the box. Some may said the have been the not the less complicated desktop environment. Some other say it’s the most powerful jack of all trades (hint: KIO, KPart, DCOP/DBUS).

KDE 4.1 has been pretty. There are still more steps to go to give a solid usability. Hopefully it’ll be there by 4.3 or even 4.2. For Windows user, don’t let yourself left alone. Install kde-win-installer and taste the new juicy KDE yourself!

Dear lazy web, does Lua have regex support?

Thursday, February 14th, 2008

mysql-proxy, being developed by MySQL AB itself, is very powerful tool to have. It can intercept raw mysql packets from authentication to query and query result. Creating a read/write load balancer has never been easier. Instead of filtering query (as seen in sqlrelay), we can use mysql-proxy to defines which back-end should be used for reading (–proxy-read-only-backend-addresses) or writing. No need to mess with each query executed. However, I miss regex in query filter or router of sql-relay. I wonder if we can use regex in Lua so we don’t have to do substr thingy in read_query() hook.

Powered by ScribeFire.

sqlrelay and mysql-proxy

Wednesday, February 13th, 2008

I am not yet going to have the vs tag. I just want to do a simple comparison here. Installation and a quick glimpse on both tool.

I have been astonished by the query filter/route feature in sqlrelay. I’ve setup a simple simulation in my box using two databases. And I have been happy about how I can direct my query based on some lines of regex. Working with mysql client directly and sqlrsh tool was totally smooth. However, making it works with LAMP(hp) was totally PITA. The mysql drop-in library can’t help here. Casting LD_PRELOAD spell before starting httpd was futile. Maybe it has something to do with mod_php or something else. I haven’t dig deeper. There’s only one option left — as working directly with sqlrelay-PHP API is no-option — that is using the available PEAR::DB driver for sqlrelay. That would be scwheet if only Drupal doesn’t start dropping PEAR::DB support in 4.6. Gah.

Okay, it’s now time for mysqlproxy to shine. There’s no ready library for CentOS/RHEL 5. Compiling from source. Requires Lua. Must compile Lua to get the recent 5.1.3. `make linux install` is failed on doc section. Commented out doc section. make linux install passed. but no lua.pc in any pkgconfig directory, ./configure on mysqlproxy failed. Copying lua.pc manually doesn’t work with configure. Manually use pkg-config –libs and –cflags to supply LUA_CFLAGS and LUA_LIBS for ./configure. make failed on dlopen stuff. Browsed Google. Google said: ./configure LDFLAG=’-ldl’. make && make install is OK.

Run mysqlproxy. Fired up mysql -u root -P 4041. show databases;. Errrrr. Nanni .. Nanni … Stuck. Bump. Will see you later tomorrow.




Update:


On one end:

toni@toni:~/public_html$ mysql -u root -P 4040
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 0 to server version: 5.0.0

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>show databases;
ERROR:
Failed to get a cursor id.
 A network error may have ocurred. Success
mysql>

And on the other end:

toni@toni:~/Devs/mysql-proxy-0.6.1$ sudo /usr/local/sbin/mysql-proxy
file network-mysqld-proto.c: line 210 (network_mysqld_proto_get_int_len): assertion failed: (*_off < packet->len)
Aborted


Update #2:


mysql-proxy works swell today. Dunno, maybe I needed to restart mysql yesterday. mysql-proxy fives a more granular filter feature compared to sqlrelay simple regex. However, it must be paid by learning Lua.



Another tips, always use explicit mysql –host=localhost when you want to use mysql-proxy proxy feature. Otherwise your connection will likely goes via local socks, which is sucks. Eg: mysql -P 4040, this one will not connect to mysqld instance via port 4040, alas (apparently) it will use socket and ignores the port. Crazy param bastard took me forever to figure out.


Powered by ScribeFire.