sayap's blog

while 1: yield None

Archive for March 2010

Screw Android, I am going Maemo

written by sayap, on Mar 28, 2010 11:47:00 PM.

As the first and only Maemo 5 device, Nokia N900 is simply amazing. Unlike other smartphones that give you thousands of silly Apps, with N900 you can have real, actual, full-length Applications.

For example, this screenshot below shows a fully ajax web application rendered and functioning nicely in the N900's MicroB browser:

(Btw, that's our Business Intelligence Dashboards developed by my colleagues. Great work guys!)

Of course, this web application might be rendered and functioning nicely with other smartphones also. What seperates N900 from the appsphones, however, is that it can actually host the backend of the web application, all by itself.

In this case, the backend uses these services:

along with apache modules mod_wsgi and mod_php.

The speed isn't great, since N900's hardware spec is comparable to the laptop I had 10 years ago. Nevertheless, it works. So, screw Android with its non-standard Java and tiny SQLite database, I am going Maemo with N900 :D

Installing a contrib module for Greenplum

written by sayap, on Mar 12, 2010 12:49:00 AM.

Installing a contrib module for Greenplum must be a dead simple task, because it was no where to be found in the otherwise comprehensive Greenplum Admin Guide.

However, google for "greenplum contrib" only returns one relevant result to a Chinese blog post, which despite best intention, only serves to discourage a newbie like me from ever trying to install a contrib. Recompiling postgresql and hand-editing Makefile just to install a small module? That just doesn't sound right, even for a Gentoo user.

After some messing around with a few contrib, I finally found the right way, which is indeed dead simple:

  1. Get any of the postgresql 8.2 source package from the official site
  2. su - gpadmin
  3. Unpack the source, then go to ~/postgresql-8.2.xx/contrib/xxx
  4. make USE_PGXS=1 COPT="-Wno-error" install
  5. (Optional for Greenplum MPP) Use gpssh to copy whatever .so file that just get installed under /usr/local/greenplum-db/lib/postgresql to other nodes
  6. psql -f xxx.sql [DBNAME]

There you have it. Simple, no fluff, even an Ubuntu user can get it to work (seriously, I am not joking).