Jump to content

User:Cipherking/Falcon (computer software)

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Avicennasis (talk | contribs) at 04:51, 25 July 2016 (Avicennasis moved page User:Falcon (computer software) to User:Cipherking/Falcon (computer software) without leaving a redirect: move to subpage). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Falcon
Original author(s)Kurt Griffiths (kgriffs)
Developer(s)Rackspace
Initial release19 March 2013; 12 years ago (2013-03-19)[1]
Written inPython
TypeWeb application framework
LicenseApache
Websitefalconframework.org

Falcon is a Python web framework which aims at developing cloud APIs keeping in mind speed as its topmost priority.[2] 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.[2] It uses WSGI.[2]

History

[edit]

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. [1]

Version History

[edit]

Following is a list of releases of Falcon in the decreasing chronological order.[1]

Date of Release Version Date of Release Version
May 22, 2015 0.3.0.1 Jan 14, 2014 0.1.8rc3
May 22, 2015 0.3.0 Jan 8, 2014 0.1.8rc2
May 8, 2015 0.3.0rc2 Jan 8, 2014 0.1.8rc1
Apr 23, 2015 0.3.0rc1 Jan 6, 2014 0.1.8.rc1
Feb 18, 2015 0.2.0 Sep 13, 2013 0.1.7
Feb 13, 2015 0.2.0rc2 Aug 5, 2013 0.1.6.post3
Feb 6, 2015 0.2.0rc1 Jul 19, 2013 0.1.6.post2
Dec 29, 2014 0.2.0b2 May 20, 2013 0.1.6.post1
Nov 14, 2014 0.2.0b1 May 16, 2013 0.1.6
Sep 15, 2014 0.1.10 May 16, 2013 0.1.5
Sep 11, 2014 0.2.0a1 Apr 4, 2013 0.1.4
Jul 21, 2014 0.1.9 Apr 4, 2013 0.1.3
Jan 16, 2014 0.1.8 Mar 19, 2013 0.1.2

Design Goals

[edit]

High Speed

[edit]

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

Minimalist Framework Design

[edit]

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.[2]

Flexibility

[edit]

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.[2]

Features

[edit]

Installation

[edit]

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.[3]

$ pip install --upgrade cython falcon


Sample code

[edit]

Below code snippet shows a simple sample code for Falcon.[2]

# sample.py
import falcon
import json
 
class QuoteResource:
    def on_get(self, req, resp):
        """Handles GET requests"""
        quote = {
            'quote': 'I\'ve always been more interested in the future than in the past.',
            'author': 'Grace Hopper'
        }

        resp.body = json.dumps(quote)
 
api = falcon.API()
api.add_route('/quote', QuoteResource())

Importance and Relevance

[edit]

Performance

[edit]

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.[2]

Freedom

[edit]

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[2]

Reliability

[edit]

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.[2]

[edit]

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

[edit]

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.[4]

Implementation

[edit]

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[4]

Maturity

[edit]

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

Benchmarks

[edit]

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[5]. In case of more realistic scenarios results have shown that falcon can work through 14,384 req/sec[5]. 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[6][7][8].

[edit]

For further reading the following links may be referred to :

References

[edit]
  1. ^ a b c d e f g h "Falcon - github.com/falconry/falcon". github.com/falconry/falcon. Retrieved 2015-09-16.
  2. ^ a b c d e f g h i j k l m "Falcon - The minimalist Python WSGI framework". falconframework.org. Retrieved 2015-09-16.
  3. ^ "Falcon - Documentation". http://falcon.readthedocs.org/en/stable/. Retrieved 2015-09-16. {{cite web}}: External link in |website= (help)
  4. ^ a b c Griffiths, Kurt. "An Unladen Web Framework : Blog – Software is for Humans". blog.kgriffs.com. Retrieved 2015-09-16.
  5. ^ a b "Falcon - The minimalist Python WSGI framework - Metrics". falconframework.org. Retrieved 2015-09-16.
  6. ^ "TechEmpower Web Framework Performance Comparison". TechEmpower. Retrieved 2015-09-16.
  7. ^ "Benchmarking Go and Python Web servers". ziutek.github.io. Retrieved 2015-09-16.
  8. ^ "Express vs Flask vs Go vs Sparkjava vs Sinatra". Medium. Retrieved 2015-09-16.