User:Cipherking/Falcon (computer software)

Falcon is a Python web framework which aims at developing cloud APIs keeping in mind speed as its topmost priority. Falcon works on the concept of creating RESTful services such that each transition maps to an HTTP verb. This encourages the programmer to think more towards managing resources and transitions. It uses WSGI.

History
Falcon was created by Kurt Griffiths (kgriffs) in March 2013. Falcon is currently maintained by him and a number of other contributors of Falcon. Falcon is an Apache-licensed community project developed by Rackspace. It has had 26 releases till now. Its first version (version 0.1.2) came into existence on March 19, 2013.

Version History
Following is a list of releases of Falcon in the decreasing chronological order.

High Speed
Falcon is basically designed for APIs that require a high speed. It responds much faster than most other web frameworks.

Minimalist Framework Design
Only the most essential elements are included in Falcon along with a few others such as six and mimeparse. This makes Falcon lighter and easier to test and deploy.

Flexibility
Falcon is not rigid to any particular deployment method. It is compatible with CPython 2.6/2.7, PyPy, Jython 2.7, and CPython 3.3/3.4. It is not dependent on any database in turn increasing its flexibility.

Features

 * Less cluttered code base, enabling easy extensibility
 * URI templates for intuitive routing
 * Individual classes for headers and bodies, enabling easy access to HTTP requests and responses
 * Independent of WebOb
 * Easy to interpret HTTP exceptions via extensible classes.
 * Fully integrated unit testing framework
 * CPython 2.6/2.7, PyPy, Jython 2.7, and CPython 3.3/3.4 support
 * Considerable boost over various frameworks.

Installation
Falcon compiles itself with Cython depending upon the availability in order to give high performance and increased speed. To install cython along with falcon the following command is used.

Sample code
Below code snippet shows a simple sample code for Falcon.

Performance
Falcon has optimizations built it to ensure that overall application level performance is not affected even when it is subjected to concurrent workloads. Since falcon handles it at framework level it doesn’t need extra/modified hardware to do so.

Freedom
Unlike most web frameworks falcon doesn’t impose much restrictions and coding conventions on the programmer. This may result into more code but can also be viewed as an aspect that lets programmers choose their own implementation

Reliability
Falcon has kept dead and unused code to a minimum. This leads to lighter code with fewer bugs. The project uses some automatic code coverage tools to keep in check.

Fitment in current trends
Given a choice Falcon may not be the most appropriate choice for a web project. It depends a lot on what a programmer looks for. The following points summarize what may encourage a developer to consider falcon for a project

Reusability
If the development activity is such that it has a mix of front-end and back-end development then Falcon may not be the right choice. However, if the design is more centric on creating static assets then it can support it pretty well.

Implementation
The focus of this framework is to help write cleaner code but also improve upon the performance it brings in. Falcon interacts at the lower-levels of development to enable such performance improvements, hence it is not suitable for rapid application development. For fast development alternatives like Django, Pecan or Flask may be considered

Maturity
Although it has been under active development for quite sometime, it is still not fully tested for all scenarios.

Benchmarks
Falcon has been subjected to many benchmark tests which were compared to many other frameworks. Tests have proven a tremendous speed up in cases where Falcon was used. Under almost all idealistic scenario simulated on Rackspace servers, version 0.3.0 of falcon has proved falcon’s ability to handle 21,858 req/sec. In case of more realistic scenarios results have shown that falcon can work through 14,384 req/sec. various such results have been well documented on falcon’s website. Although performance of Falcon may look very promising in terms of Python, it is still slower as compared to many frameworks running on Go (programming language), Java (programming language) and PHP.

Links and important documentation
For further reading the following links may be referred to :
 * Framework's homepage - http://falconframework.org/
 * Comments and views about falcon - https://news.ycombinator.com/item?id=8835776
 * Tutorial and documentation by Falcon's team - http://falcon.readthedocs.org/en/latest/user/tutorial.html
 * Tutorial by Chad Lung - http://www.giantflyingsaucer.com/blog/?p=4342
 * Git repository page - https://github.com/falconry/falcon
 * Blog by Kurt Griffiths - http://blog.kgriffs.com/2013/07/02/python-fast-web-service-framework.html