Tie to Rawr, Fluffy White Stuff articles on Python web server performance. Consider implementing part of test app in something like Flask and/or Pecan for context.
(FalconExample)chads-mac-mini:FalconExample chadlung$ pip install falcon
Downloading/unpacking falcon
Could not find any downloads that satisfy the requirement falcon
No distributions at all found for falcon
Exception information:
Traceback (most recent call last):
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/basecommand.py", line 107, in main
status = self.run(options, args)
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/commands/install.py", line 256, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py", line 1011, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Users/chadlung/PythonProjects/FalconExample/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/index.py", line 157, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for falcon
Having a mechanism for taking control of exception handling and response generation from them would be ideal in many circumstances. This allows applications to use Exception classes that better fit their domain without having to do any implicit Exception mapping or re-throwing.
In Python 3, the body will always be unicode, but in Python 2 it may not be, so have to check.
Watch for performance regression.
Need to convert resp.body to a byte string (Python 2) or bytearray (Python 3). Test with gunicorn and such to see if we can just always return a bytearray.
Allow specifying the encoding, but default to UTF-8.
Make sure to test with some crazy code points to ensure this all works OK.
Mandatory query params (when literals are specified, will also need query continuation support)
Max length? Maybe not, because would mean 404 if exceeded unless rearchitect how route matching works. Have to match and then throw a different exception if too long.
Need to figure out whether an auto-serializer is needed/necessary/should be encouraged for data APIs? If so, look into implementing as a before/after hook.
Also, benchmark WSME to see if it a viable alternative. Con: json-patch support may be wonky?
Add optional support for executing ingress hooks in parallel using greenlets, asyncio, and/or Twisted. Processing should not continue until all parallel hooks return success (need to be able to specify conditions on the ctx that must all be true before proceeding to the next group). If any hook fails/bails out, the remaining hooks and the main app do not execute, and any parallel hooks that are still running are killed.