add 3 snippets:
    1. simulate thread using generator.
    2. use a logger that can be decorated.
    3. make a restful web interface handy.