using python in web applications

Chris Angelico rosuav at
Sun Sep 11 05:53:44 CEST 2011

On Sun, Sep 11, 2011 at 9:35 AM, Laurent <laurent.payot at> wrote:
> [troll]
> For a serious web based MMO you'd rather stick to low level and forget about bloated Object Relational Mapping java-like layered kind of frameworks that are made for Rapid Applications Development, not for efficiency.
> [/troll]

I have been trolled. :)

For any sort of web-based real-time game, here's two things to avoid:

1) Snoopability and modifiability of crucial data. Everything should
be stored on the server, so that if anyone fiddles, all they do is
break their own client so it has to reload from the server.
2) Massive waste of resources due to unnecessary frameworks/facilities.

I play a lot of Flash games, and right now I'm playing one that has
coped poorly with a miniature slashdotting. A spike in popularity
resulted in a spike in server lag. I fired up a little packet sniffer,
and discovered that every time you do anything in the game, the client
makes a new POST request to its server. Why?! It's not that hard to
hold a socket connection open!

In another context, a similar issue - not a problem as yet (that I
know of), but would be if the system were to be slashdotted. A server
whose sole purpose is to handle script-instigated requests (using HTTP
POST for its transport) sends back a Set-Cookie header with a session
id. This implies that the server is holding session data for all these
clients that are never going to send that cookie back. The server
appears to be IIS with ASP scripts, so presumably stateful sessions
are enabled by default, so it's costing memory and processing to hold,
then discard, all those useless (and probably empty) session state
tags. And presumably many MANY other servers have the same thing.

What's YOUR framework doing that you don't need, and how much is it costing you?

Yeah, I was trolled bad. :)


More information about the Python-list mailing list