Original source: http://nonfu.me/p/5935.html
The entire site structure is as follows:
Technical Solutions
It is very rare to use Python to develop a Web site, but also a lot of places that we can learn from, let us also know some of the new web technology.
First, the Python framework
The current use of the tornado framework is known. Tornado Full name Tornado Web server, a Web servers and Web application framework written in Python, is used by FriendFeed company in its own website FriendFeed and is Facebook The framework is open to the public in the form of open source software after acquisition.
Reference Link: Http://zh.wikipedia.org/wiki/Tornado
Learning Document: Http://www.tornadoweb.cn/documentation
Second, the database
It is now known that MySQL is used as the primary storage, using SQLAlchemy to model or map the database for ORM.
Third, caching technology
Using Redis for caching, queuing, counting, or tasks, use Redis-py to connect to clients.
Redis Reference Link: http://redis.readthedocs.org/en/latest/index.html
Redis-py Reference Link: http://redis-py.readthedocs.org/en/latest/index.html
Iv. JavaScript Framework
Use Google's closure library as the front-end JavaScript framework.
V. Load handling
It is now known that the use of nginx to do reverse proxy, with Nginx to do static files and other large data volume of I/O operations.
Vi. Image Services
Upyun, which has been used before, has now migrated to the image service that it has built.
VII. Mail Service
The e-mail message was first used by Amazon SES, which has now been converted to Mailgun due to the inability of SES to meet the requirements.
Viii. Messaging System
The message system uses the comet implementation, and Comet is a "server push" technology based on HTTP long connections.
Nine, Virtual environment
As a Python website, it is possible to use virtualenv to solve the problem of pure package environment.
Chinese document Address: http://virtualenv-chinese-docs.readthedocs.org/en/latest/index.html
X. Deployment of code
Common python projects are basically deployed using fabric, and don't know which one to use.
Xi. Search Implementation
Know to use mmseg to do Chinese word segmentation, the corresponding root exists in Redis as key, database ID as value, each data item is a Zset collection. Find the corresponding value based on key when querying.
[Reprint] Knowledge of technical solutions--a Python-based tornado framework