Home

Previous 20

Apr. 27th, 2006

Django and SCGI

Recently, I had a Django based app that needed to be executed under Apache. I found several problems getting it to run under mod_python (mainly because of segfaults due to library mismatch between python and other installed Apache modules). After struggling with fastcgi for a bit, I installed it with scgi.


  1. Install scgi: I'm running Apache 2 on CentOS, so I installed the apache2 module from the tarball

  2. Install flup: Flup provides a bridge between some web server protocols like fastcgi, scgi, ajp, and wsgi. Django ships with a WSGI connector.

  3. Create a script to execute the scgi listener for my app. In my case, it was as simple as
    #!/usr/bin/env python
    
    if __name__ == '__main__':
            from flup.server.scgi import WSGIServer
            from django.core.handlers.wsgi import WSGIHandler
            WSGIServer(WSGIHandler()).run()
    


  4. Execute the app with the scgi listener. I am using runit to execute services. In this case, I run the following script
    #!/bin/sh
    
    APPROOT=/home/fawad/workspace
    export PYTHONPATH=${APPROOT}
    export DJANGO_SETTINGS_MODULE=myapp.settings_modpython
    
    
    
    exec chpst -u apache:apache python /home/fawad/code/python/flup/django_scgi.py
    


  5. Configure apache vhost to use this app
    <IfModule !scgi_module>
            LoadModule scgi_module modules/mod_scgi.so
    </IfModule>
    <VirtualHost *:80>
            ServerName myapp.fawad.net
            ErrorLog /tmp/myapp_errors.log
            DocumentRoot /var/empty
            SCGIMount / 127.0.0.1:4000
    </VirtualHost>
    




And that's it. Restart the apache server and the app should be up and running.

Feb. 3rd, 2006

Free VMWare Server

According to Mike Gundeloy, VMWare Server (Renamed from VMWare ESX Server) will be free as of this Monday. Can't wait.

Jan. 23rd, 2006

ipodified software

Chris Stone (formerly the Opensource voice at Novell) has posted an op-ed piece on SDTimes about writing software for the users. We in the software industry tend to lose sight of what the end goal of our efforts should be: delivering quality products to the end user. Chris hits the nail right on the head. We tend to get too emotionally involved with the nitty gritty of the tools: Java vs. .NET, RMI vs. Web Services. Think of what impact these things have on the end user. The user doesn't really care what you do behind the scene as long as the delivered app works to spec.

Here's hoping that we can start worrying more about the end itself more than the means we use to get there.

Jan. 16th, 2006

History of BASIC and C

Billy Hollis has posted a pair of insightful articles on the histories of the BASIC and C family of languages.


1982 – It is discovered that 97% of all C routine calls are subject to buffer overrun exploits. C programmers begin to realize that initializing a variable to whatever happens to be lying around in memory is not necessarily a good idea. However, since enforcing sensible variable initialization would break 97% of all C programs in existence, nothing is done about it.

Dec. 7th, 2005

Hooking to technorati

Ignore this post. It's just fodder for technorati.

Technorati Profile

Oct. 25th, 2005

PDC '05 Contents online

Microsoft has been kind enough to post the PDC '05 presentations (videos, powerpoints, etc.). They are free for online access for six months. I know how I'm spending my afternoons for the next couple of weeks. Go and watch the presentations, tell your friends, neighbours and significant others. The site doesn't seem to work on firefox, though.

Oct. 10th, 2005

Earthquake in Pakistan. Help needed

From Sajjad's blog

It has been just over 32 hours since the earthquake struck and the death toll is still rising. The last count was over 19,000 dead and over 42,000 injured. Aftershocks had stopped after the early morning ones, but they have returned in groups of 3 or 4, separated only by minutes. There were quite a few very long ones this afternoon.

Though most of the images on TV show the single apartment block in Islamabad, virtually all the damage was done in the mountainous region north of here. There are reports of mudslides there and there isn't much aid getting through due to blocked roads and bad terrain. Last night's thunderstorm and rain didn't help either. All this would make it very difficult to get accurate casualty and death figures.


The people in the devastated areas desparately need help. Links to places where people can donate are below.
---
President fund, accepts paypal(credit cards)
http://akhbar.urdupoint.com/khas/charity_projects/quake/

--
https://remit.ublny.com/ can be used to send donations
to Mir Khalil UR
Rehman Foundation - MKRF using the following

MKRF - Pakistan Earthquake Relief Fund
A/C: 0102598-5
Branch Code: 1234
Branch Name: Al Rehman Branch
Address: I.I Chundrigar Rd.

----
ICNA relief can be also used to send donations.
http://reliefonline.org/
Tax exempt id is available if donated through ICNA
relief.

-----
Ummah Welfare Trust UK (Credit Cards)
http://www.uwt.org/

---
Hidaya is also a trusted way to donate. Tax-exempt
donations can be made online.
http://hidaya.org/

---
Muslim Aid (credit cards)
http://www.muslimaid.org/

---
Muslim Hands (Credit cards)
http://www.muslimhands.org/Site/Pages/Appeals/PakistanKashmirEarthquake

Jul. 15th, 2005

django framework

Last night's ChiPy meeting had a presentation by Adrian Holovaty on the django web applications framework. All I can say is: Rails ain't got nothin on django. I can't wait to start playing with it.

Jul. 12th, 2005

Link: The Game is Afoot

Link: The Game is Afoot

Commentary on marketing software projects. for geeks.

Jul. 8th, 2005

php xmlrpc crap

I'd like to say that this post by Ian surprises me, but I can't. There's way too much crappy code out there, and I've prolly contributed my fair share.

Go mod_security

Jun. 19th, 2005

Vasters on Pakistan

Clemens Vasters on Pakistan

Well… What I can say about Pakistan is that the people are great. It’s difficult to find a room with 600-800 people who are so exuberantly enthusiastic about information technology as in Karachi.


Clemens is one of the people in .NET development I really admire for their technical expertise. This post by him really makes me feel proud to be a Pakistani.

Apr. 15th, 2005

(no subject)

Matthew Thomas of Canonical has posted a thorough review of the Linux desktop under the guise of an Ubuntu review titled My first 48 hours enduring Ubuntu 5.04. It is probably the most thorough critique of the Linux I've had the pleasure to read.

Us mere mortals can only go far as to say 'this sucks'. This article pinpoints several of the sucky points in the Linux (GNOME to be more precise) desktop today. A must read article.

Mar. 28th, 2005

Links 20050328


  1. Python at Google

  2. Mark Cox (Red Hat) responds to "days of risk" report for Windows vs. Red Hat Linux

  3. Discussion on VSTS pricing


My take on things:

  1. Python r0x0rz!!!

  2. RedHat has been good enough at providing timely updates to critical packages. Windows to RHEL is an apples to oranges comparison. We'll talk when Microsoft bundles 4 CDs of packages with Windows.

  3. Eric Sink's post on the topic pretty much sums up my feeling about this. We're probably not getting a copy of VSTS any time soon. The OSS stack we currently use (Subversion, mantisbt, nunit, nant...) works well enough, and is cross-platform to boot. Microsoft is going after the Rational / Borland ALM crowd with these pricings as opposed to the typical starving coder; to which I say: More power to them.



Update: IronPython 0.7 is released, but with the Microsoft Shared Source license. Meanwhile, boo is actively/openly developed and has an Opensource license. Goodbye IronPython, hello boo.

Jan. 20th, 2005

Free Culture

If you haven't already, read Free Culture. Buy the book, download it, listen to it, read the Cliff notes version, or watch the presentation. Do whatever it takes to soak in the information. Find out why the freedoms Mr. Gates calls Communistic are so important to the progress of humanity.

Jan. 13th, 2005

Apple iProduct

The iProduct

Jan. 10th, 2005

BillG and IP Communism

Copyleft Commie

Some comments from around the blogosphere (how I hate that word).

Quote of the day:

If I had the time, and the money, I'd do the deep analysis that it would take to explain to myself why it is I constantly hope to be surprised by Mr. Gates. Yet I never am.

Jan. 7th, 2005

Nerd King. Hear me roar


I am nerdier than 91% of all people. Are you nerdier? Click here to find out!

Dec. 31st, 2004

opensource == choice

via Red Hat Magazine:

Imagine a world where technology is allowed to connect naturally and simple elements create complex systems. Where choice is multiplied and the system finds the best way. Watch this video and see why open source allows choice, choice equals freedom, and freedom equals power.

watch the video

Dec. 8th, 2004

That, or Duder. His Dudeness. Or El Duderino...

dude.

"It's like man or buddy, there is often this male-male addressed term that says, "I'm your friend but not much more than your friend," said Kiesling.
</a>

Dec. 1st, 2004

Mono bundling support

Bundles in mono. Quote:

A mono bundle allows you to ship your Mono application as a single binary: no runtime necessary: everything is "statically linked", there are no external dependencies on a Mono installation of any kind.


All I can say is 'Holy crap!'. If this works as advertised, it could be a serious boost to the adoption of mono as a development platform.


Gentlement, start your svn.



Tom 'Spot' Callaway has an annotated guide to APC's Pet.

Previous 20

April 2006

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Advertisement

Syndicate

RSS Atom
Powered by LiveJournal.com