Yang baru-baru minggu ini

February 25, 2008 · Filed Under Places, Regular Hours · 9 Comments 

Almari atau lemari ya nyebutnya? Well, almari aja deh. Lemari sepertinya bahasa daerah deh :D. Yak, almari ini sebenanrya sudah nongkrong seminggu menunggu dirakit. Akhirnya baru kesampaian hari minggu kemarin saya rakit sendiri dibantu istri (dengan perkakas meminjam toolbox bapak kos). Almari ini punya sejarah yang tidak mengenakkan alias menyebalkan. Almari ini dibeli di carrefour, yang mana kata bapak kos memang mahal, seharga 200-an ribu (entar saya tanya lagi ke istri berapa kemarin pas-nya). Ongkos nganter ke Tebet 50 ribu. Tidak ada service untuk merakitkan almari ini bagi pembeli which is terribly annoying since who the hell has enough time to do such thing in Jakarta :p. That mindset should be well known enough for carrefour, no? Apparently not. And then, waktu pengantar almari (yang tidak punya service rakit) ini hendak pulang, masih sempat juga minta uang es. Eh, Carrefour bisa bener dikit gk sih ngasih service. udah kena 50 rebu dari Ambassador-Tebet, eh mitra pengangkutnya masih milih yang seperti itu. Amit-amit deh.

Seteah almari selesai dirakit, istri saya take-over merapikan barang-barang yang hendak ditransposisi ke dalam almari. Saya membantu anak ibu kos mengerjakan PR IPS terpadu. Setlah itu diteruskan merakit Tieren Ground Type yang sempat saya beli di Margo City. baru sekali ini seperitnya saya mampir ke Margocity meskipun ebberapa kali bolak-balik Depok-Tebet. Tempatnya luas dan toiletnya pun bersih :).

Okay, berikut ini foto-foto terkait.

step #1

step #2

step #3

voila!

tieren ground type

Oh ya. Beberapa waktu yang lalu, saya mencoba untuk membuat podcast. Yang mana membaut saya ngakak sendiri karena suara saya yang tidak jelas dan tidak bisa melafalkan “r” serta .. lebih mirip suara anak kecil cewe mau nangis :)). Lihat saja di sini: http://neofreko.podbean.com/2008/02/24/first-debute-testing/




Update:

Ternyata, sekitar 3 tahun yang lalu, Abe juga merakit lemari (link via sangprabo via komen). Di-update biar entry abe da[et trekbek.

Database Scalability (and Drupal)

February 21, 2008 · Filed Under Dev Hours, Technology, Web 2.0 · Comment 

Disclaimer:

  1. I am not a DBA nor having any other database expert title attached.
  2. I am not Drupal expert either

Having spend some good days browsing the net and read like crazy, I managed to write up the following.

Database Scalability options:

  • Scale up
    • more powerful hardware: RAM, processors, storage
  • Scale out
    • Federation
      • MySQL 5.x support federated table (remote table). However its still have some issues: heavy traffic between federated server
      • Benefits: spreaded storage, relatively reducing main server load (delegated to federated server)
      • Disadvantages: heavy network traffic between federated server
      • Issues: network connection capacity between federated servers
    • Sharding (Partitioning)
      • Benefits: spreaded server load, spreaded storage
      • Disadvantages: relatively complicated since it’s involving application layer changes
      • Issues: Involves application layer

Federation is more transparent to developer as application can be totally unaware of the federation setup. However, its bottleneck for sure is giving a limit to scaling (out).
More to explore:

  • Replicating federated database.
  • Load balancing federated database;

Sharding on the other hand, while giving enourmous flexibility to scaling (out) options, is likely requiring ‘built-from-scratch’ application setup/environment. A special data hashing/sharding logic must be incorporated to the application layer in order to implement sharding, which sometimes against the intention of some framework.

What about Drupal then? Drupal depends so much on the node table. Though developer can new type of nodes which uses external table (for extra attributes), those nodes will still be related to the core node table (API restriction, eg: node_load, node_save, and other node_xxx)  From these points, the only avaliable scaling option for Drupal would be scaling up or using federated option (which is somehow felt like scaling up, eventually)

There has been rumour about ASQL (automated sharding proxy) but I haven’t found any available code yet.

PS:

  1. For load balancing, there are many options includes using hardware (BIG-IP) or software (mysqlproxy, sql-relay, sequoia)
  2. Sharding approach is similar to BigTable approach which spreads storage to localize (spread) load via colum based database structure.
  3. The more you want to scale (your app/database) the more you will love data redundancy and giving up normalization

References:
[1] http://en.wikipedia.org/wiki/Federated_database_system
[2] http://dev.mysql.com/tech-resources/articles/mysql-federated-storage.html
[3] http://www.onlamp.com/pub/a/databases/2006/08/10/mysql-federated-tables.html
[4] http://buytaert.net/scaling-with-mysql-replication
[5] http://www.johnandcailin.com/blog/john/scaling-drupal-step-four-database-segmentation-using-mysql-proxy
[6] http://mysqldba.blogspot.com/2006/11/unorthodox-approach-to-database-design.html
[7] http://sequoia.continuent.org/HomePage

Nyebelin

February 19, 2008 · Filed Under Mood, Places · 4 Comments 

Disclaimer:
Curhat ahead. Nothing significant unless you like ’snack’ story. Or if you seasonally, somehow, want to be cursed.

Pagi ini di busway nyebelin sekali. Ibu-ibu kantoran bermuka garang bertanya: “Turun senen gk? Klo gk, gantian (geser) sama saya sini”. Gak ada raut meminta tolong, lebih seperti memerintah. Saya jawabnya ya innocent sajalah: “Enggak ..”. Kemudian saya geser. Eh, gk ada terimakasih juga. Sebel banget gk sih.

Lebih sebel lagi pas saya mikir. Mungkin ibu tadi udah manggil-manggil atau berisyarat pada saya beberapa kali. tapi mungkin saya tidak tanggap. Apa sebab? Karena telinga saya tersumbat headset (lagi denger Amafurase-nya Kagrra,) plus tutup jumper sedang saya pakai gara-gara saya berdiri pas di bawah hembusan AC. Sebel saja karena malah saya merasa bersalah dan tidak bisa meluapkan kekesalan akibat mendapat perlakuan tidak santun.

Lebih sebel lagi waktu mikir, wah nanti bakal ada banyak yang bialng saya tidak santun karena memakai tutup telinga sewaktu di tempat umum. Jika saya santun seharusnya saya tidak rapat2 nutup telinganya. Saya berarti harus bertoleransi meskipun tidak nyaman berdiri terbengong di dalam busway supaya saya bsia tanggap kalau ada yang memanggi-manggil saya.

Ya enak juga kalau semua juga berlaku seperti itu. Saya ndak keberata. Lah kalao saya doang yang mikir gitu, bisa-bisa muka saya yang imut ini akan mengalami akselerasi penuaan dini akibat jalanan jakarta. Anjing! Nah loh. Gw kasih kata-kata yang sudah saya pendam beberapa waktu ini. Brengsek!

Dear lazy web, does Lua have regex support?

February 14, 2008 · Filed Under Dev Hours, Open Source · 2 Comments 

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

February 13, 2008 · Filed Under Dev Hours, Open Source · Comment 

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.

Udah ujan, becek, gk ada ojek

February 11, 2008 · Filed Under General · 7 Comments 

Bukan cincya lauwra kok. Tapi memang abis ujan kecil meski tdk becek. Lalu tukang ojeknya? Nah itu dia. Hari ini abang ojek melanggar perlintasan kereta. Saya diem aja walau sebenarnya hati menjerit: wadaaaw, jgn dilanggaaar!. Habis itu di depan gedung ada bapak naik motor cowok keren memandang kita dengan mata penuh amarah. “Kenapa bang, itu?”, tanyaku ke abang ojek. “Tauk”, jawab si abang.
Bener-bener deh. Lain kali mending saya cegah si abang ojek dari nyelonong lintasan kereta. Mungkin si bapak keren tadi merasa tersinggung karena disalip waktu berhenti di depan lintasan kereta. :d
PS:
Ampoon abang, jgn nyerobot lintasan lagi. Copot jantungku ini, rasanya!

Exia: Completed

February 8, 2008 · Filed Under I love Japan · 6 Comments 

Dengan gunting kuku, jepit rambut, dan gunting, akhirnya Exia selesai dirakit. Sebenarnya kalau diburu bsia cepet sih, tapi saya memang sengaja menikmati prosesnya. Merakit beberapa step saja tiap harinya. Mulai dari hari apa ya kemarin sampai akhirnya semalam perakitan was completed.

Hailnya bisa dilihat sendiri. Kalau dilihat secara seksama ada beberapa cacat (tidak rapi) hasil aksi gunting kuku yang tidak bisa memotong dengan bersih. Ngomongin soal cacat, saya menemukan beberapa cacat produk di Exia HG ini. Tutup lutut kirinya ternyata “lodok” alias gampang lepas. Demikian pula dengan pisau yang ditempel di bagian belakang kiri. Sama sekali gk mau nempel, tapi langsung lepas. palagi Posisinya menghadap ke bawah, pas sudah tidak bisa dipasang.

Setelah Exia ini, saya berharap bisa melengkapi koleksi Gundam 00. Sementara istri saya menyarankan untuk mencari seri Zaku saja, biar pena pewaran yang dibeli kemarin tidak terlalu sia-sia. Saya mah sebenarnya setuju saja :D.
Exia: Completed
PS:
Masih menunggu Gundam Unicorn, hon.

Powered by ScribeFire.

Pokok men gundam

February 5, 2008 · Filed Under I love Japan · 6 Comments 

Ya ya ya, saya baru saja mulai ngefans sama gundam. Sebenanrya sudah noton dikit-dikti waktu jaman SEED Destiny. Kemudian mulai mengoleksi gunpla setelah lihat Thomas beli Zaku pas jaman masih di Jogja. Akhirnya saya pun beli, Zaku yang hijau, kemudian pengne lagi, dan beli yang pink. Kemudian, beli lagi versi chibi entah seri apa namanya (pokok men murah).

Sesampainya di Jakarta, pilihan pun menjadi lebih banyak :D. Setelah kemaren (dulu) beli (aduh apa ya namanya) .. Virtue di mall Malioboro, lalu Kyrios, dan akhirnya kmaren kesampean beli Exia HG. nah, pas beli Exia ini, kan muter-muter di PS. Tentu saja maen ke Kinokuniya, eh ndilalah di sana ada itu majalah berbonus Gundam yang penuh warna merah menyala-nyala. Hmm, HG atau MG ya kmaren itu. Harganya lumayan, cm terpaut 20-an ribu dibanding my Exia HG. Setelah dilihat di internet (prasaan dulu pernah liat di dannychoo.com) ternayta beneran. Gundam Unicorn!! Kyaaaaaaaa … nyesel kenapa kmaren kan diambil sekalian :((. Hiks hiks hiks .. Mudah-mudahan gk ada yang beli sebelum saya datang lagi membelinya. HEI, AWAS KAMU JANGAN BELI GUNDAM ITU!!!

Powered by ScribeFire.

Spaced out

February 4, 2008 · Filed Under Mood · Comment 

I feel somewhat weird today. There’s something missing. I’m feeling a space but don’t really know what it is. Deadlines are gone. There’s nothing appears on TODO list (yes, I’ve just received some, just now). It’s a great time to play with all those toys on the web. Social Graph API, etc. But somehow, I’m not really in a good mood today. My eyes feel a bit heavy. Slipknot seems to be dancing happily with me. The cloud is gloomy.

I’m missing my Exia. My Ubuntu is fucking making me mad. And I need to boot into Windows to work on my TODOS.

F***!! (Rebooting)

Powered by ScribeFire.