วันเสาร์ที่ 11 มกราคม พ.ศ. 2557

mod_php to mod_fcgid

10 Years with mod_php. Today i decide to migrate to mod_fcgid.

Mod_php had been served our services for long time and work well from beginning. But now we have more need to go than mod_php can serve.

Then we are going to move to mod_fcgid. With fcgid we can do a lot of configuration style. Easy process management and we can install many php-version to serve our legacy php application.

For management purpose, we can freely control easy application and license more efficiency.  Developers and Implementation Man can do their job without know each other.


วันจันทร์ที่ 18 พฤศจิกายน พ.ศ. 2556

Git


I'm moving our repository from SVN to Git.  Here is one of information you can see why? 

5 Years ago i'd used SVN to server our need. Create main branch (Trunk) and then fork our code to new branches for each project. But all folk projects have the way is. It's difficult to merge back to trunk.

But Git is build from branch idea! And this is new idea to see what new in my life.




วันพฤหัสบดีที่ 7 พฤศจิกายน พ.ศ. 2556

The way to cloud!

I have installed our system in private servers on Data Center in Thailand more than 5 years. This is the time to decide to stay with old infrastructure or going to try new technologies.

By the way!

Buy new servers and setup new system or try cloud!

Why Cloud?

The answer for future is "We need to scale".

Service Models


It's seem like i need to go to IaaS. Because our components can not fit in PaaS. But in the future i will go to provide our solution to SaaS.





วันจันทร์ที่ 4 พฤศจิกายน พ.ศ. 2556

dovecot sieve duplicate email message discard

After we finished install ISPConfig3, and configure all email forward and do redirect script in sieve. Unfortunately many duplicate messages happen!

So we try to google to find the way we can solve this issue!

-- We need develop package , dovecot-dev and dovecot-managesieved

# aptitude install dovecot-dev dovecot-managesieved
-- Unfortunately without pigeonhole we can not implement pigeonhole extension.

# wget http://pigeonhole.dovecot.org/releases/2.1/dovecot-2.1-pigeonhole-0.3.6.tar.gz
# tar xzvf dovecot-2.1-pigeonhole-0.3.6.tar.gz
# cd dovecot-2.1-pigeonhole-0.3.6
dovecot-2.1-pigeonhole-0.3.6# ./configure --with-dovecot=/usr/lib/dovecot
dovecot-2.1-pigeonhole-0.3.6# make
dovecot-2.1-pigeonhole-0.3.6# make install
# cd ..
-- Download and install duplicate extension

# wget http://hg.rename-it.nl/pigeonhole-0.3-sieve-duplicate/archive/tip.tar.gz# tar xzvf tip.tar.gz# cd pigeonhole-0-3-sieve-duplicate-6319bd61b834/pigeonhole-0-3-sieve-duplicate-6319bd61b834# ./autogen.shpigeonhole-0-3-sieve-duplicate-6319bd61b834# ./configure --with-dovecot=/usr/lib/dovecot --with-pigeonhole=/usr/include/dovecot/sievepigeonhole-0-3-sieve-duplicate-6319bd61b834# makepigeonhole-0-3-sieve-duplicate-6319bd61b834# make install
-- When finished install duplication we need to link seive to /usr/local/lib/dovecot/sieve


/usr/lib/dovecot/modules# ln -s /usr/local/lib/dovecot/sieve sieve

-- Then need to do sieve_before script to serve all custom_mailfilter for every user.

# cd /home/vmailhome/vmail# mkdir sievehome/vmail/sieve# vi duplicate-discard.sieve

--- edit file duplicate-discard.sieve like this

require "vnd.dovecot.duplicate";  
if duplicate {
     discard;
     stop;
}
-- compile sieve script

home/vmail/sieve# sievec duplicate-discard.sieve
-- edit dovecot configuration file in plugin directive

# vi /etc/dovecot/dovecot.conf

.. edit plugin like this

plugin {  quota = dict:user::file:/home/vmail/%d/%n/.quotausage  sieve=/home/vmail/%d/%n/.sieve  sieve_plugins = sieve_duplicate  sieve_extensions = +vnd.dovecot.duplicate  sieve_duplicate_period = 10m  sieve_before = /home/vmail/sieve/duplicate-discard.sieve}
-- Restart dovecot

# /etc/init.d/dovecot restart


reference

วันจันทร์ที่ 21 ตุลาคม พ.ศ. 2556

Hosting Service with ISPConfig

After we've run our solution for Web, Mail Hosting for long time. We decide to use ISPConfig (http://www.ispconfig.org/) in our solution.

With now ISPConfig 3.0.5 (http://www.ispconfig.org/) You could do most of things that administrator can do to manage your client.

It's very good product. It's very easy to start hosting.


วันเสาร์ที่ 3 พฤศจิกายน พ.ศ. 2555

Python? Django?

ช่วงนี้ Python กำลังรุมเข้ามา รวมทั้งคำถามต่าง ๆ มากมาย
ส่วนตัวแล้วใช้งาน Python ทำงานอยู่แล้ว  มันไม่ได้มีอะไรพิเศษมากมาย ไปกว่า ภาษาอื่น ๆ เท่าไหร่ แต่ที่ผมสนใจคือ ความเรียบง่าย และการจัดการที่เป็นระเบียบ มันเรียบง่าย แบบ "Simple is all complexities behind"

มันเป็นระเบียบจนบางคน บอกว่ามันเกินไปด้วย

แต่สำหรับผมที่เคยใช้ C PHP Java ผมคิดว่าสิ่งที่สำคัญของการพัฒนาร่วมกันคือ coding standard ซึ่งถ้าเป็นภาษาอื่น ๆ นั้น เวลาพัฒนาต้องมากำหนดกันให้รัดกุมเลยทีเดียว

อีกสิ่งหนึ่งที่สำคัญคือ Document on Coding หรือไม่ก็คู่มือการใช้งาน เพราะการพัฒนาอะไรขึ้นมานั้น ถ้าหากมีที่ไปที่มาได้แล้ว การดำเนินการต่อโดยตนเองหรือผู้อื่น นั้น ก็จะเป็นอะไรที่ง่ายต่อการเข้าใจได้

เพราะว่าหากเรากำลังพัฒนาอะไรซักอย่าง แล้วสามารถมีคนนำไปใช้ต่อได้นั้น ย่อมเป็นประโยชน์ไม่มากก็น้อย

เมื่อกล่าวถึงตรงนี้ ก็ขอ รวบรวมสิ่งที่ผมได้จากประสบการณ์ในการทำงานพัฒนาระบบ ดังนี้


  1. กำหนดไปให้แน่นอนเลยว่าเราจะพัฒนาอะไร
  2. ในสิ่งที่จะพัฒนานั้น สามารถแยกเป็นส่วนย่อย ๆ ได้หรือไม่ ถ้าได้ก็กำหนดให้แต่ละส่วนแยกออกจากกัน และสามารถรวมกันได้ในภายหลัง (http://en.wikipedia.org/wiki/Separation_of_concerns)
  3. จากส่วนต่างๆ ที่แยกออกมาจากกันนั้น ก็ให้ทำในแต่ละส่วนให้ดีที่สุด
  4. ถ้าหากในส่วนย่อย ๆ ใดมีคนที่เคยทำไว้แล้ว ให้นำกลับมาใช้ หรือนำมาปรับปรุงให้ดีขึ้น
  5. กำหนดอายุของระบบที่เราจะพัฒนา เช่น 5 ปี 10 ปี เพราะว่าไม่มีอะไรยืนยาว หรือไม่ก็กำหนดไปเลยว่าเมื่อถึงเวลาที่มีเทคโนโลยีอะไรที่ดีกว่า ก็แนะนำให้ลองเปลี่ยนแปลงดู
  6. นึกถึงคนอื่นที่ต้องมาสานต่อด้วย
  7. ทำทุกอย่างให้ง่าย เข้าใจง่าย อ่านง่าย ไว้

และสิ่งที่ผมเขียนไว้ ผมจะลองทำดูกับ django ที่ผมกำลังทำระบบอยู่
ref: http://en.wikipedia.org/wiki/Separation_of_concerns

วันศุกร์ที่ 2 พฤศจิกายน พ.ศ. 2555

ผ่านไปอีกวัน

มันผ่านไปด้วยอาการหืดหอบ

  1. ถ้าเป็นเมื่อ 5 ปีที่แล้ว ตัดสินใจได้เลย
  2. สิ่งที่ผมคิดจะทำ เหมือนกันกับที่ท่านกำลังจะทำ
  3. python มันยังครองโลกต่อไปอีก
  4. ชีวิตมีอะไรมากกว่างาน