Wednesday, December 23, 2009

Ubuntu 9.10 + Mono(WinForms) = Problem

We have one very big application written in C# that is using WinForms. So I decided to test this app on my laptop - Dell Ispiron 6400 using my current installation of Ubuntu 9.10. There ware no problems on Ubuntu 8.04 or Windows machines but ... here comes the big BUT :D on my machine (9.10) I see buttons menus, text boxes etc. but no text! All text was missing.
Started to google this problem to locate a solution. After searching and reading for few hours here is the solution ;)

Original Mono thread is here. After reading this I started to understand that this is not a Mono bug but problem with my Intel Xorg driver. I downloaded and installed it as described here (almost)
download needed driver (in my case 2.9.1)
$ ./configure --prefix=/usr
if everything is fine execute the next 2 lines but you will need some extra libraries to install before configure finishes whit no errors.
$ make
$ sudo make install
reboot PC or restart GDM service
Cool, everything went well till now ... but ... oh no one more BUT :D. Well no that big any way.
Next what happened to me is this: I can see only part of the texts. Solutions can be found in the link I posted ;). Change your Appearance -> Fonts settings and you are done. Problem solved!

Monday, December 14, 2009

ExtJS (3.0.3) and paging in GridPanel

I'm writing this in case someone is trying to make GridPanel to work together with PagingToolbar using XML data.

The problem is very simple. Using examples and API documentation I was trying to achieve this goal. No success! Google it ... no sucess! Everything I found was like the thing I did but:

IT WAS NOT WORKIIIIING!

Finaly I went into the ExtJS code to search for the problem and after few minutes I've located the problem. In the documentation is pointed that the name of the total records in XmlReader is: "totalRecords" but in JSON is "totalProperty".

So what I found is that in the code everywhere was used "totalProperty" ... and once I changed this it started to work!

Friday, December 11, 2009

Zend Server and Xdebug on Ubuntu

You can chose how to install your Zend server from here http://www.zend.com/products/server/
The server works fine :) but the problem appears when I tried to install Xdebug extension included in Zend server distribution. Once I do install the extension the server stops working :( and I ... do not like this at all.
I've found a solution to the problem by building it from source.
First install some development tools:
$ sudo apt-get install build-essential
$ sudo apt-get install autoconf
After this step is completed we can continue with downloading and installing xdebug.
$ wget http://www.xdebug.org/files/xdebug-2.0.4.tgz
$ tar -xzf xdebug-2.0.5.tgz
$ cd xdebug-2.0.5/
$ /usr/local/zend/bin/phpize
$ ./configure --enable-xdebug --with-php-config=/usr/local/zend/bin/php-config
$ make
Copy the compiled library:
$ cp modules/xdebug.so /usr/local/zend/lib/debugger/xdebug.so
Then edit file /usr/local/zend/etc/ext.d/debugger.ini and comment everything you see uncommented :D (this probebly is not required but just in case do it)
and add the following line at the end of the file:
zend_extension=/usr/local/zend/lib/debugger/xdebug.so

Restart zend server:
$/etc/init.d/zend-server restart

You are done. And ... you can "live happily ever after" :D

Friday, October 9, 2009

PostgreSQL as in-memory database 2

Hello again :(
There is a good and bad news. The good new is that the described scenario worked whit out any problem. I was able to mount and to create tablespace in memory.
Now I'm publishing the results so you can make your own conclusions:
N = Normal DB on HDD
V = Virtual in memory DB

INSERT 1 Row
N: 0.0095579624176
V: 0.00312209129333

INSERT 10000 Rows
N: 20.2224640846
V: 20.3045837879

SELECT 10000 Rows
N: 1.2087290287
V: 1.10954594612

SELECT 1 Row with LIMIT
N: 0.00473999977112
V: 0.00209808349609

SELECT 1 Row with WHERE
N: 0.00404500961304
V: 0.00110793113708

SELECT 10000 Rows using LIKE
N: 1.10466790199
V: 1.10219192505

SELECT 1 using LIKE
N: 0.163216114044
V: 0.143918991089

DELETE 1 Row
N: 0.0117321014404
V: 0.00280213356018

DELETE 100 Rows
N: 0.00914406776428
V: 0.00478386878967

DELETE 10000 Rows
N: 0.344476938248
V: 0.0865640640259

UPDATE 1 Row
N: 0.00603103637695
V: 0.00130820274353

UPDATE 10000 Rows
N: 0.158715963364
V: 0.48292517662

Wednesday, September 23, 2009

PostgreSQL as in-memory database

I was reading a specifications of few in-memory databases (here and here). So I started to think how can I and can I use PostgreSQL as in-memory DB ...

Yes! This is possible!

There is one feature in PostgreSQL called "table space". You can register a folder from the file system as data storage. This is the basic procedure.

1. In this article Linux Memory/Temporary File System (FS) you can read how to mount a portion of the memory to a folder.
2. Using the "table space" feature of PostgreSQL to link this virtual folder in the server.
3. Create/Delete/Update tables!

This is it, sounds easy right ;)

But what is the practical aplication for this?
This table space can be used for cache or temporary data of any kind. This in my opinion will increase the speed of your applications.

In my next post I'll publish some speed tests.

Wednesday, June 24, 2009

PHP CLI - bad interpreter??

After some changes on one of our internal servers one of the cron jobs stopped to work with this error: /usr/bin/php: bad interpreter: Permission denied

Everything is in place! PHP is there ... the script is executable ... but the cron job is not working!

I have searched google for some answers. And I have found it on one website. The partition where the script was stored is mounted as "noexec".

To fix this you need to edit your fstab file and change mount options for your partition. After this "mount -a" should work, it did not work for me and I've had to remount partitions manualy (reboot will help too).

Greetings

Friday, June 5, 2009

O3Spaces tests

In the company we have decided to test different DMS systems. I will start with the O3Spaces and later will describe my experience with OpenXchange - both using community editions.
Everything was installed very smooth using .deb packages. OK, now what? I'm connecting to the management interface and to the spaces interface using Firefox. I'm able to manage the company, users and spaces. I'm also able to document using web browser.
The next step is to integrate it with OpenOffice (3.x in my case). So I installed the Workplace assistant (no problems here) and tried to install the OO plugin ... ops!!!
I did a lot of different things to make it install in the first place. I was able to install it using the OO extension manager, because the automatic installation was not working. Plugin is installed but still not functional ... why ... why ... ;(
I spend 1 day searching for solution with no success! Then I have decided to test on SuSE. Connected to Spaces server ... installed Workspace assistant ... installed plugin everything was smooth and easy. Then I noticed that SuSE is using Sun Java engine and on Ubuntu I'm using Openjdk?! I removed it and installed the java from Sun. This solved my problem! I was able to install plugin using normal procedure via Workplace assistant. i was able to connect to Spaces from OO and edit files.
My fight was over :)
We ware able to test this DMS in our work environment. I can recommend this one it is very easy to work with it. Also the community edition is free for up to 10 users.