The Lean Architecture
First, look at "Protecting your MySQL database from SQL injection attacks with GreenSQL ". Okay, a longish article on the ins and outs of installing something that blah blah blah
Wait -- what? GreenSQL is a proxy for MySQL that checks the SQL for certain kinds of injection attacks!?!?!
Now read Twisted …
more ...