bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.39k stars 1.46k forks source link

ThreadingMixIn for the development server? #752

Open defnull opened 9 years ago

defnull commented 9 years ago

After reading this: http://ychaouche.wikispot.org/HowBottleAppsWork

Pro: You don't run into the one-request wall while developing long polling stuff. Con: You run into the wall later because you think everything works with the default server.

Thoughts?

ychaouche commented 9 years ago

IMO this should be fixed inside the standar library itself in WSGIServer code. It's not a problem with bottle.py per se. I don't know why the standard library works with this simplistic, synchronus implmentation by default for web servers where it is usually safe to work with forks and threads, unless some state data is stored in-memory, but this is usually not the case in web apps. In web apps, data is usually stored and retrieved from databases or files. Just my two cents.

ychaouche commented 9 years ago

I would be very interested in knowing what things wouldn't work with the default server ? I might be overlooking things.