Monday, January 31, 2005

ISAPI-WSGI What else should I do before release?

Almost ready to release the beta, but still concerned I may have missed something or will make a fool of myself. Based on Ian Bicking "like a school play" blog entry, the Python community should be kind to me. :-) As a final test of my implementation I decided to look for apps that support WSGI. Found Titus Brown's WSGI middleware: a simple commenting system so will try running it under isapi_wsgi. Also will see if I can get the latest checkout of CherryPy2 running with it.

Saturday, January 29, 2005

ISAPI-WSGI now has a Trac/Subversion site

Thanks to the guys at the project development will be hosted at Will import the source into Subversion in the next couple of days.

Thursday, January 27, 2005

ISAPI-WSGI Getting ready for first release

I am happy with the current functionality of the ISAPISimpleHandler. Used Ian Bicking's WSGI Webkit unit tests for the final testing. It highlighted a couple of issues in SCRIPT_NAME and PATH_INFO handling but these are now fixed. So arranging for a either a CVS or Subversion location on the net to hold the "small" source tree and download files. Will hopefully create a distutils package over the weekend, send it to a couple of friends to test, then make the announcement.


Tuesday, January 25, 2005

My other interest is wine

Just to prove that I do have other interests, I decided to create this entry. Four years ago I decided that I needed to consider life after programming (not the fun programming, but the stressful, corporate, day job programming). Also it was mid-life crisis time, so I looked for what else I was passonate about and came up with wine. 13 years ago my cousin, his wife and my parents started a vineyard called Hatton Estate. At the time I was searching for the future, they decided that we needed to expand into winemaking, so I became a shareholder. So every March/April I head back across the Tasman Sea to my place of birth, New Zealand and work the vintage. It's great to spend time out in the open air working with nature, or plunging the open top frementors. It really clears the mind.

The good news is our premium wine, Hatton Estate Tahi (tahi is the Maori word for One) has been selected as one of the top 22 New Zealand wines by the San Francisco Chronicle wine panel.


Monday, January 24, 2005

ISAPI - How do you use ReadClient

While working on my ISAPI-WSGI implementation I needed to create a wrapper so i could emulate stdin. After a quick read of the Python isapi docs, I decided I needed to use the EXTENSION_CONTROL_BLOCK.ReadClient method. 30 minutes of blocked input and debugging, I started searching on Goggle for more info on ReadClient. It turns out that you only call ReadClient if ecb.TotalBytes is greater than ecb.AvailableBytes and that you must pass the value of difference to ReadClient else it blocks. So the code needed to be something like:

self._ecb = ecb
if self._ecb.AvailableBytes > 0:
data = self._ecb.AvailableData
# Check if more data from client than what is in
# ecb.AvailableData
excess = self._ecb.TotalBytes - self._ecb.AvailableBytes
if excess > 0:
extra = self._ecb.ReadClient(excess)
data = data + extra
# rewind to start

Morale of story: win32 extension docs are light, due to it being a Python wrapper around the Windows API, and you need to read the Microsoft docs to get all the info.

Now just need to find some Microsoft docs that I can understand about Windows completion ports. Then I can start work on the threaded extension.

The simple ISAPI-WSGI handler seems to be working. Need to create some unit tests to exercise it.


Sunday, January 23, 2005


Peter Hunt is working on an interesting project called Subway

From the homepage it is:

"The Subway project aims to create a Web development stack for Python similar to Ruby on Rails, utilizing as many pre-written software components as possible."

Two of the software components are Cheetah and SQLObject, favorites of mine. It is currently pre-alpha, but after checking out from the Subversion trunk and having a play, it looks like something worth keeping track of.



As I said in the previous post, I decided to become more involved in the community. I have been following the development of various web server implementations of Python WSGI. There have been a number of requests for an implementation for IIS using ISAPI and since I was playing with ISAPI filters using Python's win32 extensions, I decided to see if I could do it. So in conjunction with Peter Hunt (someone with WSGI implementation experience and a much better Python programmer than me) I have been moving forward. To date I have a non-threaded version that works but does not fully support the WSGI spec yet. Hopefully in the next week or so, we can release a beta.


Python and Open Source Community

Last December I attended the Open Source Developers Conference in Melbourne. As well as speaking there, I got to hear and meet many members of the Open Source community. My main reason for attending was the Python Track, but the keynotes, lighting talks and discussion after each day in the pub really "expanded" my mind. It also got me thinking about what I give back to the Open Source community. Apart from the ZInformixDA and abit of beta testing and some patches for a couple of projects, I decided not enough. So the New Year resolution is to become more involved in the community.


Everyone's doing it, so why not me

I read other people's blogs, I learn things I didn't know from them, so I decided I should give it a go myself.

In my day job I manage a software development team for a small private company based in Sydney, Australia. And since programming and technology are my interests, this blog will contain ramblings about these. And of course any other things I consider are worth recording.