Archive for the ‘Django’ Category

Introduction to Pip, Virtualenv & virtualenvwrapper

Sunday, August 8th, 2010

A Brief presentation for the Manila Python Hackers Guild meetup. Join the Facebook page here

apache/mod_wsgi vs. uwsgi

Tuesday, August 3rd, 2010

Quick note to self. I was blown away by siege tests this afternoon.

Two servers, identical
Server Hardware
linux kernel 2.6.32-12
512MB RAM

siege -c 90 –time=120s
server 1= running apache 2.2 with mod_wsgi with nginx 0.7.35 as front end wwwsvr.
Lifting the server siege… done.
Transactions: 2735 hits
Availability: 100.00 %
Elapsed time: 120.21 secs
Data transferred: 9.17 MB
Response time: 3.38 secs
Transaction rate: 22.75 trans/sec
Throughput: 0.08 MB/sec
Concurrency: 77.00
Successful transactions: 2735
Failed transactions: 0
Longest transaction: 11.08
Shortest transaction: 0.16

vs.
siege -c 90 –time=120s
no apache, nginx 0.7.35 with uwsgi
Lifting the server siege… done.
Transactions: 20605 hits
Availability: 100.00 %
Elapsed time: 120.06 secs
Data transferred: 74.51 MB
Response time: 0.03 secs
Transaction rate: 171.62 trans/sec
Throughput: 0.62 MB/sec
Concurrency: 4.82
Successful transactions: 20605
Failed transactions: 0
Longest transaction: 9.02
Shortest transaction: 0.01

Who said you need apache?

siege -c 250 –time=30s
apache/mod_wsgi
Lifting the server siege… done.
Transactions: 185 hits
Availability: 100.00 %
Elapsed time: 30.01 secs
Data transferred: 0.62 MB
Response time: 7.69 secs
Transaction rate: 6.16 trans/sec
Throughput: 0.02 MB/sec
Concurrency: 47.42
Successful transactions: 185
Failed transactions: 0
Longest transaction: 27.10
Shortest transaction: 0.15

nginx/uwsgi
Lifting the server siege… done.
Transactions: 8147 hits
Availability: 100.00 %
Elapsed time: 29.60 secs
Data transferred: 29.46 MB
Response time: 0.39 secs
Transaction rate: 275.24 trans/sec
Throughput: 1.00 MB/sec
Concurrency: 108.68
Successful transactions: 8145
Failed transactions: 0
Longest transaction: 21.02
Shortest transaction: 0.01

uwsgi was able to serve 8147 requests to 250 concurrent connections in the same time mod_wsgi could only serve 185

Application Design for People with Disabilites

Thursday, April 15th, 2010

experimenting with django-uni-form brings a valid point. In order to bid on any IT projects with the U.S. Government the interface must be Section 508 Compliant

django’s native form render method is to put out forms as tables. uni-form allows you to use template tags to have a real control of the divs and layout of your forms which is great for designing for people with disabilities and enhancing the overall user experience.

here’s a great slideshare i ran into on the topic