2012/05/24

2012 Tencent Hackathon

Hey guys, I signed up the Tencent Hackathon which scheduled on Jun. 9 - 10, 2012. Note that the whole process lasts 33 hrs, and take snaps if necessary. It seems pretty fun. The better news is that I got a team of four excellent colleagues. We got a great idea, and feel like we are going to be very high in the future event.

Lately, I read lots of hackathon news from TechCrunch, NYC, YCombinator etc. I love hackathon and deadly want to be part of it. H5ere it comes.

Today we discussed the poster design, idea presentation, and even the domain name register. The domain part is my favourite one.

We discussed the UI design and user interactions details, and also revised the recommend algorithms. It's time to take off. Hang on ……

This morning I did some stupid thing: write a shell script with 'rm *' in it. Then I learned some geek trick to alias the real command.

The day came. Come on, guys, rock and roll, it's party time for geeks. The most important thing is have fun as much as you can.

Live from Tencent Hackathon: our idea comes top ranking.  After 48 hours fighting, our team won the best ** award.

To be continued ...

2012/01/05

Nginx - overview - 2



The source folder constructs as:

core -- the core data structures and functions.

event -- event-related data structure etc.

http -- http protocol specific data structures etc.

mail -- since ng also acts as mail server.

misc -- some miscellaneous files.

os -- ng supports multiple os(s), os specific files.

I suppose that Igor is an organized guy in code, since when you compile ng project, no compile warning is outputed. You may be aware that Igor turned on gcc flags: -Wall -Wno-unused-parameter -Wunused-function, -Wunused-variable, -Wunused-value.

I mainly focus on core, event, and http, others might be omitted.

In core folder, many basic data structures are implemented without importing third party library. I wonder why Igor bother to do this. After one month reading, I figured it out: the efficiency concern. Importing extra third party means giving your efficiency control to other unknown guys. Put yourself in third party developers' shoes, at some design trade-off, you could achieve better generic goal by scarifying some time efficiency and memory space. Ooooh, no, wait a minute, that's exactly not what we want. To support high concurrency, we must try very hard to be fast and occupy less memory. Then, you get the point.

To address the structure or design clear, I will posts some picture or flow chart if necessary. Draw tool is avaiable here(http://www.graphviz.org/).

Nginx - preface - 1



Lately, the design of nginx attracted my attention. So, I started to hack the nginx source and try to deep understand inside. FYI, you can download the source code from nginx.org(Or direct download from http://sharesend.com/20amd). FYI, the term "ng" is short for nginx.

The recommended version choice is 1.1.4. The reasons lie as follows:
1) The total lines is about 100,000. With my limited time, this could be the better choice.
2) I've been using this version for a while, kind of familiar.
3) The main feature of HTTP server are ready to go.

After days of search, I found these following related resources available. Hope it would save you bunch of time :)
1)LXR http://lxr.evanmiller.org/http/source/ (Only support version 1.0.11 and 1.1.12)
2)Geek blog http://blog.sina.com.cn/s/blog_677be95b0100iivb.html (Brief introduce the structure, design pattern, and config specifictions etc. unfortunately, the post is written in Chinese.)
3)Nginx wiki http://wiki.nginx.org (Read the doc and search over the community as you need.)
4)Linux man http://linux.die.net/man/ (Geek like you , may not need this.)
5)Dev guide http://www.evanmiller.org/nginx-modules-guide.html (Advanced tutorial for guys that want to get their hands dirty. )

Maybe some day, another guy would add this blog to the tail of his recommend list.

Just as Linus said, “RTFSC", Let's do this.