[Reprint] Knowledge of technical solutions--a Python-based tornado framework

Source: Internet
Author: User
Tags virtual environment virtualenv

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.