Hi all. I just started using fapws3 and I have the following feedback (questions, etc)

91 views
Skip to first unread message

Mike S

unread,
Sep 4, 2011, 5:22:11 PM9/4/11
to Fast Asynchronous Python Web Server

First of all, great work. Even on my little netbook I can get well
over 2000 requests per second for the hello world as per its homepage
(around 2200). This compares favourably with node.js which gets around
1700. Fapws with bottle gets about 1200. Bottle with cherryp on pypy
gets about 800. bottle with cherrypy on cpython about 400. If curious
a simple hello world with orbit on luajit is about 700.

I love that it's wsgi compliant. This means I can just use existing
knowledge of wsgi.

I would like more information on evwsgi.defer, as I would like to use
fapws3 with mongodb. Is defer similar to deferred/futures/promises?
how does it compare to python's concurrent.futures or javascript's
common/JS promises (then, when, done etc)?

Thanks.

Mike S

unread,
Sep 5, 2011, 10:50:54 AM9/5/11
to Fast Asynchronous Python Web Server
Silly me, I looked at the c source code last night, it has nothing to
do with deferred/futures/promises. It's an idle watcher, that defers
tasks till there's nothing else going on, and then executes them from
a queue.

One question though about defer; what's the last argument? "combined"
what? I get that the first argument is the callback, the second is the
arguments to the callback, but what's the third?

william opensource4you

unread,
Sep 5, 2011, 5:47:45 PM9/5/11
to fa...@googlegroups.com

First. Thanks for your positive remarks concerning fapws.
Second. Very sorry for the limited documentation. The best approach is to look at the samples and the code. Contribution to.improve the documentation is very welcome.

Indeed "defer" is just to perform some tasks with a very low priority; typically when system becomes idle.
The third parameter is to combine the different defer and execute only one.
In other words, if 3rd parameter is true we will not enqueue an action already listed in the queue. We check the action AND his associated parameters.

William

Reply all
Reply to author
Forward
0 new messages