Sunday, January 27, 2013

Prepare all the ingredients for a websites

    I did some research on the web technologies today's websites are using, and decide to go to the following directions.
   Server:  I have a couple of used computers and laptops at home. Most of them were bought a couple of years ago.  They are becoming extremely slow when running today's software --- pretty bad  practice of today's software industry, software developers don't care about memory when writing software . After did some testing,  I decided to reuse Lenovo 3000 N100 as the development server by upgrading its memory to 3GB.
   Home router:   I want to put my website on the Internet, thus I could test anywhere, anytime.  Though
I don't have static IP, my Internet provider bound one IP to my home router.  Most time,  it does not change.
So I could set it up by doing port forward.
   Operating System:  On this side, I am conservative.  Linux is good, but it evolves very fast!  What does that mean?  It means you could enjoy the latest features if you keep upgrading your Linux box.  This is the good side. The bad side is you sacrifice the stability of your system.  I decide to go with CentOS, which does not upgrade that often, and still give the stability I need.  In my opinion, stability is much important than new technology. A stable OS could lower the long term cost of website maintenance.
    Web Server:  I decide to use nginx. Why choose it?  First,  it was small and written in C language, which is my daily language.  I can easily read the source code to see whether I need to customize it.  Most time, I don't think it is necessary. Just in case.  2nd,  it is more scalable and can service more links with the same memory after some reading.  Whether this is true,  time and practice will tell.
    Web Framework: Nobody build a website from nothing.  We build websites today using the way the kids play legos.  The easiest way is to find some web framework and to start from there. There are a lot of web frameworks there. To choose one, first check what language you want to use for web programming, PHP,  Java, Python or Scala;  then choose one to see whether you can understand its design -- sometimes it is too complex, while other times, it does not allow you to customize.  After walk all the tutorials of Django,   I  think Django is what I am looking for.
    Database: In addition to traditional relation database,  there are more choices today because of data explosion.  You must have heard a lot of buzz words like big data,  No SQL and so on.  I would like to start from relation database and expand it to those latest until I find it is necessary.  Still , there are a lot of choices ---Microsoft SQL Server,  IBM DB2,  Oracle, MySQL and PostgreSQL. I don't want to pay for this. So what I could choose are open source projects --- MySQL or PostgreSQL. I pick up PostgreSQL.
   In short, all the ingredients for a website are here. What's next?  Install them one bye one and integrate them together. 

No comments:

Post a Comment