summaryrefslogtreecommitdiff
path: root/vendor/CherryPy-3.2.0/sphinx/source/appendix
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/CherryPy-3.2.0/sphinx/source/appendix')
-rw-r--r--vendor/CherryPy-3.2.0/sphinx/source/appendix/cherrypyspeed.rst251
-rw-r--r--vendor/CherryPy-3.2.0/sphinx/source/appendix/faq.rst203
-rw-r--r--vendor/CherryPy-3.2.0/sphinx/source/appendix/index.rst11
-rw-r--r--vendor/CherryPy-3.2.0/sphinx/source/appendix/success.rst81
4 files changed, 0 insertions, 546 deletions
diff --git a/vendor/CherryPy-3.2.0/sphinx/source/appendix/cherrypyspeed.rst b/vendor/CherryPy-3.2.0/sphinx/source/appendix/cherrypyspeed.rst
deleted file mode 100644
index 6659958..0000000
--- a/vendor/CherryPy-3.2.0/sphinx/source/appendix/cherrypyspeed.rst
+++ /dev/null
@@ -1,251 +0,0 @@
-.. _cherrypyspeed:
-
-**********************
-How fast is CherryPy ?
-**********************
-
-Introduction
-============
-
-When people ask this question, they usually mean "how fast will my CherryPy-based application be ?".
-
-In 99% of the cases, the answer is "this depends on your actual application code, not on !CherryPy itself".
-
-The reason is that, for 99% of the real-world dynamic applications, most of the time spent to return a page will be spent in your actual application code, and the time actually spent in the CherryPy code will be negligible.
-
-For instance, a typical page that requires a few database calls to be built might take in total 200ms to be served. Out of these 200ms, about 2ms will be spent by CherryPy itself, and 198ms will be spend in your actual database calls and page rendering...
-
-So you can see that, if you want to optimize anything, you should really optimize your actual application code before you try to optimize !CherryPy
-
-Raw speed of the CherryPy HTTP server
-=====================================
-
-Despite the real-life most common scenario explained in the introduction, some people still want to know the raw speed of the CherryPy HTTP server.
-So I sat down and did some benchmarking...
-
-About the benchmark
--------------------
-
-This benchmarking only makes sense on very small documents, otherwise we're no longer measuring the raw speed of the HTTP server, but also the speed of the application ...
-
-This benchmarking was performed on a laptop in the following environment:
- * Processor: Pentium M 1.6 Ghz
- * RAM: 1GB
- * Windows XP 2
- * Load testing tool: ab from Apache2
- * CherryPy version: SVN snapshot on 2005/01/13
-
-Note that "ab" was running on the same machine as the CherryPy server, so CherryPy is probably a bit faster than what we're getting.
-
-Test 1: Dynamic content / single threaded server
-------------------------------------------------
-
-I used the following basic CherryPy app::
-
- #!python
- from cherrypy import cpg
- class Root:
- def index(self):
- return "OK"
- index.exposed = True
-
- cpg.root = Root()
-
- cpg.server.start(configMap = {'socketPort': 10000})
-
-Here are the "ab" results::
-
- $ ./ab.exe -n 1000 http://localhost:10000/
- This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
- Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking localhost (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Finished 1000 requests
-
-
- Server Software: CherryPy/2.0.0b
- Server Hostname: localhost
- Server Port: 10000
-
- Document Path: /
- Document Length: 2 bytes
-
- Concurrency Level: 1
- Time taken for tests: 1.789044 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 127000 bytes
- HTML transferred: 2000 bytes
- Requests per second: 558.96 [#/sec] (mean)
- Time per request: 1.789 [ms] (mean)
- Time per request: 1.789 [ms] (mean, across all concurrent requests)
- Transfer rate: 69.31 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 1.9 0 15
- Processing: 0 1 4.2 0 15
- Waiting: 0 0 0.8 0 15
- Total: 0 1 4.5 0 15
-
- Percentage of the requests served within a certain time (ms)
- 50% 0
- 66% 0
- 75% 0
- 80% 0
- 90% 15
- 95% 15
- 98% 15
- 99% 15
- 100% 15 (longest request)
-
-As you can see, CherryPy averaged 558 requests/second, which is pretty good ...
-
-Test 2: Dynamic content / multi threaded server
------------------------------------------------
-
-I used the same code as test 1, but started CherryPy in thread-pool mode, with 10 threads.
-I also told "ab" to simulate 10 concurrent users ...
-Here are the "ab" results::
-
- $ ./ab.exe -c 10 -n 1000 http://localhost:10000/
- This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
- Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking localhost (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Finished 1000 requests
-
-
- Server Software: CherryPy/2.0.0b
- Server Hostname: localhost
- Server Port: 10000
-
- Document Path: /
- Document Length: 2 bytes
-
- Concurrency Level: 10
- Time taken for tests: 2.327670 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 127000 bytes
- HTML transferred: 2000 bytes
- Requests per second: 429.61 [#/sec] (mean)
- Time per request: 23.277 [ms] (mean)
- Time per request: 2.328 [ms] (mean, across all concurrent requests)
- Transfer rate: 53.27 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 2.3 0 15
- Processing: 15 21 8.9 15 47
- Waiting: 0 16 6.2 15 47
- Total: 15 22 9.0 15 47
-
- Percentage of the requests served within a certain time (ms)
- 50% 15
- 66% 31
- 75% 31
- 80% 31
- 90% 31
- 95% 31
- 98% 47
- 99% 47
- 100% 47 (longest request)
-
-As you can see, CherryPy averaged 429 requests/second, which is a bit less than test 1 (there is a small thread-switching overhead), but is still pretty good ...
-
-Test 3: Static content / single threaded server
------------------------------------------------
-
-This time, I used CherryPy to serve a static file from disc.
-The file was a simple text containing "OK".
-Here was the config file for CherryPy::
-
- [server]
- socketPort = 10000
-
- [staticContent]
- static.html = static.html
-
-
-Here are the "ab" results::
-
- $ ./ab.exe -n 1000 http://localhost:10000/static.html
- This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
- Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking localhost (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Finished 1000 requests
-
-
- Server Software: CherryPy/2.0.0b
- Server Hostname: localhost
- Server Port: 10000
-
- Document Path: /static.html
- Document Length: 4 bytes
-
- Concurrency Level: 1
- Time taken for tests: 1.979130 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 175000 bytes
- HTML transferred: 4000 bytes
- Requests per second: 505.27 [#/sec] (mean)
- Time per request: 1.979 [ms] (mean)
- Time per request: 1.979 [ms] (mean, across all concurrent requests)
- Transfer rate: 85.90 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 2.2 0 15
- Processing: 0 1 4.3 0 15
- Waiting: 0 0 0.5 0 15
- Total: 0 1 4.8 0 15
-
- Percentage of the requests served within a certain time (ms)
- 50% 0
- 66% 0
- 75% 0
- 80% 0
- 90% 15
- 95% 15
- 98% 15
- 99% 15
- 100% 15 (longest request)
-
-
-As you can see, CherryPy averaged 505 requests/second. Again it is a little bit less than a dynamic page, but it is still pretty good ...
diff --git a/vendor/CherryPy-3.2.0/sphinx/source/appendix/faq.rst b/vendor/CherryPy-3.2.0/sphinx/source/appendix/faq.rst
deleted file mode 100644
index 0544ff3..0000000
--- a/vendor/CherryPy-3.2.0/sphinx/source/appendix/faq.rst
+++ /dev/null
@@ -1,203 +0,0 @@
-.. _faq:
-
-**************************
-Frequently Asked Questions
-**************************
-
-General
-=======
-
-:Q: How fast is CherryPy ?
-
-:A: Have a look at :doc:`/appendix/cherrypyspeed`.
-
-:Q: When will it be added to the standard python library?
-
-:A: Probably never. The standard python library is not the place to distribute
- an application server.
-
-:Q: Who uses CherryPy?
-
-:A: See :ref:`SuccessStories`.
-
-
-Server Features and Configuration
-=================================
-
-:Q: How do I serve multiple domains on one host?
-
-:A: You can use the :class:`cherrypy._cpdispatch.VirtualHost` dispatcher.
-
-:Q: Does CherryPy support https?
-
-:A: CherryPy has built-in SSL support as of 3.0.0beta. See the `ssl_*`
- properties of :mod:`cherrypy._cpserver`.
-
- Earlier versions do not have built-in SSL support, but Tim Evans has
- written a module called `SslCherry <http://tools.cherrypy.org/wiki/SSLWithM2Crypto>`_
- that uses M2Crypto for https support. It's not quite ready for production
- use, but it looks promising.
-
-:Q: Does CherryPy prevent cross-site scripting?
-
-:A: See `Malicious HTML Tags Embedded in Client Web Requests <http://www.cert.org/advisories/CA-2000-02.html>`_
- and `Understanding Malicious Content Mitigation for Web Developers <http://www.cert.org/tech_tips/malicious_code_mitigation.html>`_
- at `CERT <http://www.cert.org/>`_ for an overview of Cross-Site Scripting
- (XSS) issues. It is ultimately up to the developer to remove potential XSS
- vulnerabilities from their apps and sites.
-
-:Q: Why does CherryPy take CPU/RAM even though it's not yet receiving requests?
-
-:A: CherryPy runs some tasks in the background by default, and some when you
- turn on certain tools. To strip CherryPy down to nothing, you might have to:
-
- * Turn off the :ref:`timeoutmonitor`
- via ``cherrypy.engine.timeout_monitor.unsubscribe()``.
- * Turn off the :class:`Autoreloader <cherrypy.process.plugins.Autoreloader>`
- via ``cherrypy.engine.autoreload.unsubscribe()``.
- * Examine the number of worker threads that WSGIServer uses.
- See :attr:`cherrypy._cpserver.Server.thread_pool`.
-
-:Q: CherryPy serves my HTML but not my CSS, Javascript, or images. Why does
- CherryPy wait to serve one resource before serving the next? Can it not
- handle more than one connection at a time?
-
-:A: CherryPy certainly can handle multiple connections. It's usually your
- browser that is the culprit. Firefox, for example, will only open two
- connections at a time to the same host (and if one of those is for the
- ``favicon.ico``, then you're down to one). Try increasing the number of
- concurrent connections your browser makes, or test your site with a tool
- that isn't a browser, like ``siege``, Apache's ``ab``, or even ``curl``.
-
-Development Questions
-=====================
-
-:Q: I can browse pages from my local machine, but not from other machines. What gives?
-
-:A: Set the config entry `server.socket_host` to either your server name/IP,
- or to '0.0.0.0' to listen on all interfaces.
- See :mod:`cherrypy._cpserver` for more details.
-
-:Q: How do I serve URL's with dots in them, like "/path/to/report.xml"?
-
-:A: Two ways: 1) Convert the dots to underscores for your page handler names,
- e.g. ``def report_xml(self)``
- (see :ref:`defaultdispatcher`) or 2) use a :ref:`default method<defaultmethods>`.
-
-:Q: How do I upload BIG files? (Or what is the best thing to do if I have many
- concurrent users uploading files?)
-
-:A: Please see :doc:`/progguide/files/uploading` for examples.
-
-:Q: Can I perform HTTP based authentication (.htaccess)?
-
-:A: There are two tools implementing :rfc:`2617`: :doc:`/refman/lib/auth_digest`
- and :doc:`/refman/lib/auth_basic`.
-
-:Q: What templating systems does CherryPy support?
-
-:A: All of them! One of the core idea of CherryPy is to be templating
- language independent. It is important to us to let developers keep
- their habits and preferred tools. Hence CherryPy does not favor any
- templating language. But for some ideas, see
- :doc:`/progguide/choosingtemplate` and the
- `Tools wiki <http://tools.cherrypy.org/wiki/>`_.
-
-:Q: My default handler throws an exception complaining about the number of
- arguments. How to handle this?
-
-:A: Suppose you have the following handler class setup: ::
-
- class Root:
- def project(self, id):
- data = db.query("project", id)
- return "Details for project %d: %r" % (id, data)
-
- and you want to provide project information based on urls of the form ::
-
- /project/123
-
- Here, 123 is a project id to search in a database. The above project()
- method will do the trick, but, when someone adds more arguments than the
- method expects, e.g. ::
-
- /project/123/456/789?x=blah
-
- those extra elements are passed on to the project() method as parameters, which
- is not able to handle the extra arguments and results in an exception being thrown.
-
- You can catch this by appending ``*args``, ``**kwargs`` to the default()
- method's parameter list. This way, the values 456 and 789 in the example
- will be placed in the 'args' list and the 'kwargs' dictionary will contain
- the string 'blah' for the key 'x'. In the following example, we just
- ignore any extra params: ::
-
- class Root:
- def project(self, id, *args, **kwargs):
- data = db.query("project", id)
- return "Details for project %d: %r" % (id, data)
-
-:Q: How do I publish objects with reserved Python names?
-
-:A: Example: ::
-
- class SomeClass(object):
- def __init__(self):
- setattr(self, 'print', self._print)
- setattr(self, 'class', self._class)
-
- def _print(self):
- ...
- _print.exposed = True
-
- def _class(self):
- ...
- _class.exposed = True
-
- Object attributes can have reserved names as long as you dynamically
- bind them so the Python parser doesn't choke on them.
-
-:Q: How does CherryPy compare to projects like mod_python, Twisted, and Django?
-
-:A: mod_python requires you to be running `Apache <http://httpd.apache.org/>`_.
- See http://www.modpython.org for more info. Since CherryPy 2.1, you can
- use mod_python as an interface to bridge CherryPy and Apache.
-
- Twisted is, well, twisted. You really have to spend the time to understand
- how the twisted framework works. It is deep and very powerful, but has a
- steep learning curve. CherryPy is, arguably, simpler to understand, due to
- its more traditional approach. Part of this comes from it not trying to do
- all the things that twisted does (SMTP, IRC, NNTP, etc etc). See
- http://twistedmatrix.com for more info.
-
- For a 3rd party discussion, refer to the
- `PyWebOff blog <http://pyre.third-bit.com/pyweb/index.html>`_ which concluded:
-
- "In no time at all, I was finished the library program. It took me
- significantly less time than it did with either of Quixote or Webware,
- and I'm very happy with the code that was produced. CherryPy needs more
- documenting, but otherwise it gets two enthusiastic thumbs up."
-
-:Q: When you run cherrypy and two dudes browse your website at the same time,
- does cherrypy create two instances of your root object? How does that work?
- I don't get it.
-
-:A: No, just one instance. It's no different than having two threads in any
- other Python application call the same method at the same time: each
- thread has its own set of local variables so they don't stomp each other.
-
-:Q: How do I get CherryPy to work if I don't have root?
-
-:A: Just append it to the path. Put the following at the top of the files
- you need CherryPy for: ::
-
- import sys
- sys.path.append("your local dir path")
-
-:Q: Can I change my root class, refresh my web page and see what is changed
- without restarting the CherryPy server?
-
-:A: See :class:`cherrypy.process.plugins.Autoreloader`. Note that this solution
- works properly only if the changes you make are syntactically correct.
- Re-compilation errors will exit the entire application.
-
diff --git a/vendor/CherryPy-3.2.0/sphinx/source/appendix/index.rst b/vendor/CherryPy-3.2.0/sphinx/source/appendix/index.rst
deleted file mode 100644
index 0f79c15..0000000
--- a/vendor/CherryPy-3.2.0/sphinx/source/appendix/index.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-********
-Appendix
-********
-
-.. toctree::
- :maxdepth: 2
- :glob:
-
- *
-
-
diff --git a/vendor/CherryPy-3.2.0/sphinx/source/appendix/success.rst b/vendor/CherryPy-3.2.0/sphinx/source/appendix/success.rst
deleted file mode 100644
index 83363d2..0000000
--- a/vendor/CherryPy-3.2.0/sphinx/source/appendix/success.rst
+++ /dev/null
@@ -1,81 +0,0 @@
-.. _successstories:
-
-***************
-Success Stories
-***************
-
-You are interested in CherryPy but you would like to hear more from people using it, or simply check out products or application running it.
-
-If you would like to have your CherryPy powered website or product listed here, contact us via our [wiki:CherryPyMailingLists mailing lists] or [wiki:CherryPyIrcChannel IRC].
-
-
-Websites running atop CherryPy
-==============================
-
-http://www.yougov.com - International market research firm, conducts millions of surveys on CherryPy yearly
-
-http://www.cuil.com - "The world's biggest search engine"
-
-`PictureHouse cinemas web sale <http://sales.picturehouses.org.uk/>`_ - E-commerce site for the !PictureHouse cinema chain in the UK
-
-`http://jammersbase.com <http://jammersbase.com>`_
-
-`http://www.pennspurchase.com <http://www.pennspurchase.com>`_
-
-`Almad's Homepage <http://www.almad.net/>`_ - Simple homepage with blog (Czech only, sorry)
-
-`http://bank.muratordom.pl] & [http://bank.muratorplus.pl http://bank.muratorplus.pl <http://bank.muratordom.pl>`_ - Sorry, Polish only
-
-[http://www.defuze.org/] - A blog based on CherryPy2
-
-`CTChallenge <http://ctchallenge.org>`_ - A small, but growing site about a bicycle tour that raises money to fight cancer.
-
-`Food on line <http://www.foodfileonline.com>`_ - An online calorie counter and nutrition database
-
-`Personal site of Maries Ionel Cristian (ionel_mc) <http://ionel.zapto.org/>`_ - source code for the site and supporting projects available for download.
-
-`diggdot.us] - Built using [http://www.turbogears.org/ TurboGears <http://diggdot.us/>`_, running CherryPy: Cycling Digg, slashdot, and del.icio.us/popular news items.
-
-`stratolab <http://stratolab.com/>`_ - Video Game Courses for Children
-
-`Serpia <http://www.serpia.org/>`_ - A place for Pythoners with some interesting tutorials
-
-`hosted-projects.com <http://www.hosted-projects.com/>`_ - hosted-projects is a company specialized in web hosting services for software project teams offering the Subversion revision control system coupled with project and issue management software like Trac and Bugzilla. hosted-projects.com uses CherryPy for its web control panel.
-
-`eswap.com <http://www.eswap.com>`_ - website for financial charts, tagging stocks and researching investment ideas.
-
-I have built (and I'm maintaining it now) the `PennsPurchase <http://www.pennspurchase.com>`_ website. It uses Cherry, compiled (or not) !CheetahTemplates and PostgreSQL database (with sqlobject module). -- ''Pawel Maczewski''
-
-`indextar.com/ba <http://www.indextar.com/ba>`_ - a comprehensive directory of Buenos Aires businesses and services for expatriates.
-
-[http://www.worldwildweather.com/] - Personalized marine weather forecasts.
-
-Products based on CherryPy
-==========================
-
-`TurboGears <http://www.turbogears.org/>`_ - The rapid web development megaframework
-
-`Indigo <http://www.perceptiveautomation.com/indigo/index.html>`_ - An X10 home control server for Mac
-
-`Subway <http://www.gosubway.org/>`_ - Web development stack
-
-`SlikiWiki <http://www.sf.net/projects/slikiwiki>`_ - A simple wiki
-
-`opkee <http://svn.defuze.org/oss/opkee/>`_ - A simple blogging example
-
-`BAOW <http://www.baow.org>`_ - A lightweight content manage system based on CherryPy, Python language and SQL database.
-
-`Planet Plus <http://planetplus.python-hosting.com/>`_ is an add-on for Planet, the feed aggregator.
-
-`Brockman <http://projects.dowski.com/projects/brockman>`_ - A simple software project catalog example
-
-`read4me <http://read4me.sourceforge.net/wiki/index.php/Main_Page>`_ - read4me is a Python feed-reading web service.
-
-`Skeletonz <http://www.daimi.au.dk/~amix/skeletonz/>`_ - Skeletonz is an Ajax approach on a content management system (CMS)
-
-Firebird QA tools are based on CherryPy
-
-Products inspired by CherryPy
-=============================
-
-`OOWeb <http://ooweb.sourceforge.net/>`_ ''is a lightweight, embedded HTTP server for '''Java''' applications that maps objects to URL directories, methods to pages and form/querystring arguments as method parameters.'' ... ''OOWeb was unashamedly inspired by CherryPy'' =======