<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/software/news/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://www.saddi.com/software/news/feeds/atom.xml" rel="self" title="Allan Saddi's projects blog" type="application/atom+xml" />
    <link href="http://www.saddi.com/software/news/"                        rel="alternate"    title="Allan Saddi's projects blog" type="text/html" />
    <link href="http://www.saddi.com/software/news/rss.php?version=2.0"     rel="alternate"    title="Allan Saddi's projects blog" type="application/rss+xml" />
    <title type="html">Allan Saddi's projects blog</title>
    <subtitle type="html">Announcements and ramblings about projects new and old.</subtitle>
    <icon>http://www.saddi.com/software/news/templates/default/img/s9y_banner_small.png</icon>
    <id>http://www.saddi.com/software/news/</id>
    <updated>2008-07-24T09:28:24Z</updated>
    <generator uri="http://www.s9y.org/" version="1.0.4">Serendipity 1.0.4 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://www.saddi.com/software/news/archives/63-flup-1.0.1-released.html" rel="alternate" title="flup 1.0.1 released" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-07-22T18:50:55Z</published>
        <updated>2008-07-24T09:28:24Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=63</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/4-flup" label="flup" term="flup" />
    
        <id>http://www.saddi.com/software/news/archives/63-guid.html</id>
        <title type="html">flup 1.0.1 released</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A very minor update to flup. If you aren't having any problems now, then there's probably no need to upgrade.<br />
<br />
This update concerns certain web servers &amp; configurations that don't correctly supply PATH_INFO and/or QUERY_STRING to flup. When missing these environment entries, the flup servers will now attempt to deduce PATH_INFO and/or QUERY_STRING from REQUEST_URI (if it is present) before defaulting to the empty string (as it did before).<br />
<br />
Thanks to Richard Davies for the patch. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/62-Random-changes.html" rel="alternate" title="Random changes" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-10-17T18:09:28Z</published>
        <updated>2007-10-17T18:09:28Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=62</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/1-General" label="General" term="General" />
    
        <id>http://www.saddi.com/software/news/archives/62-guid.html</id>
        <title type="html">Random changes</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Just a few updates on some non-happenings. I recently discovered <a href="http://www.selenic.com/mercurial/wiki/index.cgi/ConvertExtension">hg convert</a> and <a href="http://www.selenic.com/mercurial/wiki/index.cgi/TransplantExtension">hg transplant</a>. I decided to re-do my Mercurial repositories (most originated in Subversion, while others came from CVS). I was entirely <em>obsessed</em> with converting the <em>entire</em> history to HG. (Projects like yafic and newsfish had the most history, being converted from CVS to SVN, then SVN to HG. Unfortunately, I didn't preserve history when going to SVN.) Anyhow, I'm pretty happy with the results.<br />
<br />
On another note, I went ahead and upgraded Trac to 10.4. I also installed the Mercurial plugin and switched to that. Unfortunately, Trac doesn't currently support multiple repositories (see <a href="http://trac.edgewall.org/ticket/2086">#2086</a>), so my catch-all Trac page, <a href="http://trac.saddi.com/projects">http://trac.saddi.com/projects</a>, only tracks a single project. (And that happens to be yafic since it's had recent activity...) I don't really feel like switching to one Trac environment per project, so I guess I'll wait out that feature request. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/61-Middleware,-publisher-alternatives.html" rel="alternate" title="Middleware, publisher alternatives" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-09-26T00:06:12Z</published>
        <updated>2007-09-26T00:06:12Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=61</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/4-flup" label="flup" term="flup" />
    
        <id>http://www.saddi.com/software/news/archives/61-guid.html</id>
        <title type="html">Middleware, publisher alternatives</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                With the advent of flup 1.0 and the disappearance of the middleware modules (I don't think anyone really cares about Publisher <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" />), I've been getting a few queries here and there about alternatives.<br />
<br />
Rather than continue to answer people individually, here are some alternatives to flup's middleware and publisher modules. However, they represent alternatives that I've personally chosen. (And considering how far removed I am nowadays from the world of Python web development, take my choices with a grain of salt.) Suggestions for other alternatives (alternative alternatives?!?) are welcome.<br />
<br />
For users of flup's SessionMiddleware, I recommend <a href="http://beaker.groovie.org/">Beaker</a>. Switching over is a simple matter of changing the environ key from 'com.saddi.service.session' to 'beaker.session' and ensuring that session.save() is called before the WSGI application returns. (After you've appropriately swapped out flup's SessionMiddleware with Beaker's in the WSGI stack, of course.)<br />
<br />
GzipMiddleware and ErrorMiddleware have analogues in <a href="http://pythonpaste.org/">Python Paste</a>.<br />
<br />
flup's Publisher is probably most like <a href="http://wsgiarea.pocoo.org/colubrid/">Colubrid</a>, though I haven't personally tried it. (Also remember that flup's Publisher was inspired by mod_python's <a href="http://www.modpython.org/live/current/doc-html/hand-pub.html">Publisher</a>, which was apparently inspired by Zope's ZPublisher <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" />).<br />
<br />
Anyway, I updated the old <a href="http://hg.saddi.com/flup">flup 0.5 branch</a> and uploaded the source distribution to the <a href="http://pypi.python.org/pypi/flup/0.5">Cheese Shop</a>. I really don't want to maintain two branches, so consider this 0.5 release final. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/60-yafic-1.3-beta-1.html" rel="alternate" title="yafic 1.3 beta 1" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-09-19T00:14:49Z</published>
        <updated>2007-09-19T00:14:49Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=60</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    
    
        <id>http://www.saddi.com/software/news/archives/60-guid.html</id>
        <title type="html">yafic 1.3 beta 1</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've been wanting to do this for a while now, especially after hearing that SHA-1 was broken. (Ok, I guess that's rather old news.) Anyhow, I added SHA-256 to yafic. Adding support for future hashes should be fairly trivial now as well.<br />
<br />
It can be found at <a href="http://www.saddi.com/software/yafic/dist/">http://www.saddi.com/software/yafic/dist/</a><br />
<br />
I've done very basic testing, so use at your own risk. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> I plan to start using it regularly to test it a bit more.<br />
<br />
I plan to add another feature or two (like XML output) before making an official 1.3 release.<br />
<br />
And as usual, it may be found in my Mercurial repository: <a href="http://hg.saddi.com/yafic-sha256">http://hg.saddi.com/yafic-sha256</a><br />
(I don't plan to merge it into the main yafic repository until it's undergone more testing.) 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/58-flup-1.0-released.html" rel="alternate" title="flup 1.0 released" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-09-10T23:59:33Z</published>
        <updated>2007-09-14T19:46:54Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=58</wfw:comment>
    
        <slash:comments>7</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/4-flup" label="flup" term="flup" />
    
        <id>http://www.saddi.com/software/news/archives/58-guid.html</id>
        <title type="html">flup 1.0 released</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I resolved a few more outstanding issues with flup and decided to make a release. I went ahead and called it 1.0. And as I <a href="http://www.saddi.com/software/news/archives/45-QUERY_STRING-changes-to-servers,-API-changes-to-GzipMiddleware,-future-changes.html">previously mentioned</a>, I went ahead and removed the publisher and middleware modules.<br />
<br />
If you've been following the Subversion repository for flup (which has been quiet due to my switching to Mercurial), there have only been 1 or 2 new fixes.<br />
<br />
I also uploaded the tarball and 2.5 egg to the <a href="http://pypi.python.org/pypi/flup/1.0">Cheese Shop</a>. Further updates will also go to the Cheese Shop.<br />
<br />
And on the subject of further updates, consider flup to be in maintenance mode - there won't be any more new development. Bug fixes and bug reports are still welcome, of course. (Though this has been the way I've run flup for quite a while now, so I'm just making a formal announcement. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" />)<br />
<br />
And as a bit of editorializing, did I ever mention how much I <strong>hate</strong> FastCGI? <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> Around the time I first released flup, I had transitioned my apps from FastCGI to AJP, and I never missed FastCGI since. But much to my disappointment, the FastCGI module was the most popular... most likely due to ubiquitous &amp; cheap shared hosting services (e.g. Dreamhost).<br />
<br />
Oh well, I don't even use flup myself anymore. I've switched to ajp-wsgi... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/57-Mercurial-repository.html" rel="alternate" title="Mercurial repository" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-07-13T05:13:01Z</published>
        <updated>2007-07-13T05:13:01Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=57</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/1-General" label="General" term="General" />
    
        <id>http://www.saddi.com/software/news/archives/57-guid.html</id>
        <title type="html">Mercurial repository</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I'm currently trying out <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a>, a distributed SCM that's 99% pure Python. I was able to migrate some of my recent projects (including full history) over to it. My repository is <a href="http://hg.saddi.com/">http://hg.saddi.com/</a>.<br />
<br />
I haven't fully committed yet, but it's very tempting since it's far easier to install (it's literally a "python setup.py install"). Setting up the web interface was a breeze too (it's built on top of WSGI!)<br />
<br />
Oh well, I mention this now because I've finally committed something to my Hg repository. In other words, my SVN and Hg repositories are now out of sync...<br />
<br />
Anyway, I know there's a Trac plugin for Hg which I will have to try out as well. Not sure if and when I'll fully commit. Only time will tell and I really haven't been working on any personal projects lately... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/56-TranQL-Connector-for-PostgreSQL.html" rel="alternate" title="TranQL Connector for PostgreSQL" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-06-11T16:39:28Z</published>
        <updated>2007-06-14T11:36:11Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=56</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/5-Java" label="Java" term="Java" />
    
        <id>http://www.saddi.com/software/news/archives/56-guid.html</id>
        <title type="html">TranQL Connector for PostgreSQL</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                As far as Java development goes, for personal projects and for work, I find myself in that odd place between needing <em>only</em> a servlet container (e.g. Tomcat) and needing a full JEE container. I'm sure this situation is quite common. The one thing that I almost always end up needing beyond plain servlets is JTA. As I've <a href="http://www.saddi.com/software/news/archives/35-On-Containers....html">mentioned</a> in the past, I've tried various solutions from plugging in JOTM, which I'm not at all too happy with, to using stripped-down versions of full application servers.<br />
<br />
Well, the problem for me is still unresolved, but I did try out <a href="http://jencks.org/">Jencks</a> over the weekend. It was fairly easy to set up, and it worked as expected. (Just have to remember to set the connection manager's transaction type to XA to actually get XA transactions!) And rather than using DataSourceMCF, one would probably want to use a real MCF for your database for XA functionality.<br />
<br />
Which brings me to the point of this post. In the past I've blogged about problems with PostgreSQL/XA/TranQL (<a href="http://www.saddi.com/software/news/archives/36-Adventures-in-JTA.html">here</a> and <a href="http://www.saddi.com/software/news/archives/37-Continuing-adventures-in....html">here</a>). Although the problem was <a href="http://archives.postgresql.org/pgsql-jdbc/2006-10/msg00043.php">resolved</a> in the driver long ago, I don't believe I ever published the actual PostgreSQL TranQL connector I made. (And believe me, I would rather fold it back into the original project... but I'm having a hard time finding contact information... or a working mailing list... anything.)<br />
<br />
Anyway, the connectors: <a href="http://maven.saddi.com/org/tranql/">http://maven.saddi.com/org/tranql/</a><br />
<br />
I've tested it with Jencks and Geronimo. (And by "test", I mean I just verified that the PostgreSQL driver is indeed using 2PC.) The source can still be found in the same place: <a href="http://www.saddi.com/software/tranql/">http://www.saddi.com/software/tranql/</a>. You'll probably need to use the latest 8.2 JDBC driver (which includes the above-mentioned fix).<br />
<br />
Hopefully anyone searching for TranQL/PostgreSQL will eventually stumble upon it. I mean, I can't be the only person interested in using XA transactions with PostgreSQL in Geronimo, right??? <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/55-ajp-wsgi-1.0-released.html" rel="alternate" title="ajp-wsgi 1.0 released" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-04-06T18:07:24Z</published>
        <updated>2007-04-07T05:21:41Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=55</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=55</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/55-guid.html</id>
        <title type="html">ajp-wsgi 1.0 released</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="/software/ajp-wsgi/">ajp-wsgi</a> 1.0 has been released. It may be downloaded <a href="/software/ajp-wsgi/dist/">here</a> (<a href="/software/ajp-wsgi/dist/ChangeLog">ChangeLog</a>). It's been sitting around for a few months now, in heavy use at my server for both "production" and development WSGI apps. I think it's pretty safe to say it's at least on par with flup's ajp WSGIServer now. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
The only lingering issue is a core dump with Trac and only Trac, and only when it is killed or SIGHUP'd. Unfortunately, with so many variables (Trac imports quite a few C extension modules), I haven't been able to isolate problem. (And maybe it's just my environment... sadly, I don't have the resources to try elsewhere.)<br />
<br />
Anyway, 1.0... so what now? <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/54-ajp-wsgi-future-directions.html" rel="alternate" title="ajp-wsgi future directions" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-02-16T00:25:17Z</published>
        <updated>2007-02-21T11:12:23Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=54</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/54-guid.html</id>
        <title type="html">ajp-wsgi future directions</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                My C WSGI implementation is relatively decoupled from the transport code (AJP). It's conceivable that replacing the transport layer with something else is entirely possible. Like say... a full HTTP 1.1 server. I guess there could be two directions to take that:<br />
<br />
<strong>http-wsgi</strong><br />
I suppose one could take an embeddable HTTP server (or write one from scratch, if so inclined) and glue the WSGI code into the request handling pipeline. Personally, it's not a project that interests me much. Leave web server writing to the web server experts, I say. However, suppose one wrote it as an extension module for one of the popular web servers...<br />
<br />
<strong>mod_wsgi</strong><br />
How about an extension module for say, Apache HTTPD or lighttpd? The problem I see with this is that, functionally, it would just be equivalent to mod_python. (After all, you're just embedding Python into the web server and patching into its request processing.) I think the only difference would be that the WSGI-adapter code (the layer that sits just above Python) would be written in C. Additionally, you inherit some of the more interesting problems of mod_python... namely conforming Python's process/threading model to that of the web server's. In all likelihood, you would be running multi-process, not multi-threaded. I guess if you were clever, you could run the Python interpreter in only a single process, similar to how CGI works in modern versions of Apache HTTPD.<br />
<br />
But then, if you do that, all it buys you is automatic process management versus using an external server model like AJP/SCGI. So why bother with yet another mod_somethingsomething?<br />
<br />
Anyway, ajp-wsgi will remain ajp-wsgi for the foreseeable future. (If I'm sufficiently bored and curious, I may try creating an scgi-wsgi someday.) Though http-wsgi does pique my interest somewhat... I just have to find a suitably feature-laden embeddable C web server. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/52-Updates.html" rel="alternate" title="Updates" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-02-14T22:44:38Z</published>
        <updated>2007-02-15T20:11:40Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=52</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=52</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/52-guid.html</id>
        <title type="html">Updates</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Well, not much has been happening. <a href="http://www.saddi.com/software/ajp-wsgi/">ajp-wsgi</a> has been humming along, stable as a rock. It's been running all of my Python-based websites for a little over a month now (longer, really, since I had to reboot my server early January to update FreeBSD). Once I make a few documentation updates, I think it would be safe to declare a 1.0 release. (Seemingly a big milestone nowadays...) 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/53-On-site-moderation....html" rel="alternate" title="On site moderation..." />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-02-14T22:44:00Z</published>
        <updated>2007-02-14T22:44:00Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=53</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/1-General" label="General" term="General" />
    
        <id>http://www.saddi.com/software/news/archives/53-guid.html</id>
        <title type="html">On site moderation...</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I'd also like to document a news site/comment moderation system that I've been thinking about for a <em>very</em> long time. I'll only paint the broad picture since really, I haven't given it much thought. I credit this <a href="http://www.kuro5hin.org/story/2000/9/30/214129/356">discussion</a> from long ago on <a href="http://www.kuro5hin.org/">kuro5hin</a> for inspiration. (Some of "my" ideas may be blatant rips too... so I give credit where credit is due. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/tongue.png" alt=":-P" style="display: inline; vertical-align: bottom;" class="emoticon" />)<br />
<br />
Since moderation systems tend to get gamed... why not just turn it into a game? The site would revolve around fictitious money. I was thinking of having certain actions (like submitting a story or posting a comment) cost money. Not only that, but it would be like an investment. Highly rated comments or active stories would yield profit for the originator. Comments that are universally rated down or stories marked as spam would end up with all or most of the initial investment lost.<br />
<br />
It works for people doing moderation/rating as well. For example, it would cost a small amount of money to rate a comment. When you rate a comment, you are basically saying: "I am betting that the average rating of this comment will be X" After some amount of time, an amount of money would be returned to you based on how close you were to the "actual" rating.<br />
<br />
It would be a dynamic system. The cost of submitting a story, leaving a comment, rating, etc. would all be variables. As would things such as the return factor for positively-rated stories/comments. It would be adjusted (preferably automatically) to keep the economy adequately sized vs. the number of active users as well as encourage users to say, post more stories under a specific topic.<br />
<br />
"New user inflation" (where the economy explodes due to a large influx of new users who get a starting balance) can be combated by transforming the site into something akin to a social network or an invite-only service. Basically, new users start out with a 0 balance and they are given loans, with interest, from existing users. The system enforces the loans by automatically paying it back in installments. (Though what to do with a deadbeat user...?)<br />
<br />
Anyhow, the goal of the entire system, ultimately, would be to deter spamming and gaming by the use of multiple accounts. The system can be controlled, albeit indirectly, by setting various prices and rates. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/51-ajp-wsgi-released.html" rel="alternate" title="ajp-wsgi released" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2006-12-17T03:49:18Z</published>
        <updated>2006-12-17T03:49:18Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=51</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/51-guid.html</id>
        <title type="html">ajp-wsgi released</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Well, after a week of coding, I decided to "release" <code>ajp-wsgi</code> (i.e. make its existence known beyond my web sites and blog). It's a rather niche project, but if one other person finds it useful, then hey, cool. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> Releasing it costs me nothing.<br />
<br />
I found it highly educational to create, illuminating the mysteries of the Python C API. Plus I'm using it everywhere now. And after having closed <a href="http://trac.saddi.com/projects/ticket/4">ticket #4</a>, the solution of which seems to have been a panacea to all current issues, it's pretty much complete as far as I envisioned it.<br />
<br />
Now maybe I can get back to <a href="http://www.saddi.com/software/flannel/">Flannel</a>...<br />
<br />
And I have thought about writing an SCGI version as well... but it's not something I would use. So what's the point? I don't really like supporting something I don't use regularly, though by virtue of being free software, I'm not really obligated to provide any support. (But I still do because I'm a nice guy. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" />) Maybe if Apache HTTPD eventually adds a mod_proxy_scgi though...<br />
<br />
Ah, <a href="http://www.google.com/search?q=mod_proxy_scgi">no Google hits</a> for mod_proxy_scgi. Oh well. At least this entry may eventually show up. 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/50-Ah-ha!.html" rel="alternate" title="Ah-ha!" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2006-12-15T00:30:24Z</published>
        <updated>2006-12-15T00:30:24Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=50</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/50-guid.html</id>
        <title type="html">Ah-ha!</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Apparently, I did not read the AJP13 spec nor my original code very closely:<br />
<blockquote>Note: The content-length header is extremely important. If it is present and non-zero, the container assumes that the request has a body (a POST request, for example), and immediately reads a separate packet off the input stream to get that body.</blockquote>Here I was <em>requesting</em> the first block. Anyway, a quick and easy fix.<br />
<br />
<code>ajp-wsgi</code> is moving along... and actually, development has slowed down immensely (a marked sign of stability?). I've converted all Python WSGI applications on my server to use it now. It may just be psychological, but I <em>do</em> notice application responses being a bit snappier. But who knows.<br />
<br />
Trac seemed to be the most non-trivial to convert. It doesn't provide a ready-made application factory to create the WSGI app object. I basically had to mimic (using my config options) the operations that its main() method performed. Other applications (my own blog &amp; shorten projects, moinmoin) had readily-available app objects though. And I'm also glad to say that Paste Deploy-based apps are easily deployed with <code>ajp-wsgi</code> as well.<br />
<br />
Anyhow, I went ahead and decoupled the C WSGI code from the AJP code today. Now the next time I'm bored, I think I'll write drivers for both ends of an SCGI connection. It would be interesting if I could write that FastCGI->SCGI adapter wholly in C (using the standard C FastCGI dev kit). Actually, I guess I should check if there's already a C SCGI implementation... 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/49-ajp-wsgi.html" rel="alternate" title="ajp-wsgi" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2006-12-13T07:58:04Z</published>
        <updated>2006-12-14T06:36:58Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=49</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=49</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/49-guid.html</id>
        <title type="html">ajp-wsgi</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I moved all the WSGI stuff out of my AJP C library project into its own project: ajp-wsgi. I polished it up a bit, gave it a command-line interface, wrote a better build system, and even wrote a simple README for it. You can find it <a href="ftp://ftp.saddi.com/pub/software/ajp-wsgi-0.2.tar.bz2">here</a>.<br />
<br />
Note that this is <em>not</em> a Python extension. Rather, it is a 100% C WSGI implementation... that executes the application in an embedded Python interpreter. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
It's moved beyond a proof-of-concept and is quickly becoming more and more practical. (At this moment, my personal wiki is running atop it. Maybe I'll switch my Trac sites and shorten over to it as well.) But make no mistake, it is very much alpha-quality and untested. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
Future directions:<br />
<ul><li>Decouple the WSGI code from AJP, opening it up to an SCGI implementation. I have <strong>no</strong> interest in making a FastCGI version, so don't ask.</li><li>If not thread pooling, then maybe a thread limit at least?</li><li>Multi-app support. Maybe read configuration from an INI-style file (each section header would define the module:object for the app).</li><li>Figure out/understand the oddity with mod_proxy_ajp. It seems to stream the request body whether solicited or not. It also sends an unsolicited EOF packet. If this is the case, then mod_jk seems like a saner implementation... but maybe this is the future direction of the protocol?</li></ul> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.saddi.com/software/news/archives/48-Its-alive!.html" rel="alternate" title="It's alive!" />
        <author>
            <name>Allan Saddi</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2006-12-12T06:54:21Z</published>
        <updated>2006-12-12T08:36:30Z</updated>
        <wfw:comment>http://www.saddi.com/software/news/wfwcomment.php?cid=48</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.saddi.com/software/news/rss.php?version=atom1.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    
            <category scheme="http://www.saddi.com/software/news/categories/2-Python" label="Python" term="Python" />
    
        <id>http://www.saddi.com/software/news/archives/48-guid.html</id>
        <title type="html">It's alive!</title>
        <content type="xhtml" xml:base="http://www.saddi.com/software/news/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                A continuation from <a href="http://www.saddi.com/software/news/archives/47-Another-AJP-implementation.html">the weekend's entry</a>... I actually finished the WSGI implementation in C and glued it to the AJP library I wrote. It was an interesting endeavor... programming for Python in C.<br />
<br />
I was going to cop out and just implement wsgi.input in Python, but I went all the way and wrote that in C as well. And I'm glad too, because it's far more efficient. Data copies are <em>greatly</em> minimized. And data is streamed from the server. Assuming the application reads wsgi.input in decent-sized chunks, the memory usage will always remain manageable. (For example, I uploaded a 600+ MB file and hashed it. The server never used more than 2-3MB of memory.)<br />
<br />
And from my braindead (i.e. "Hello World!") benchmarks, the server is capable of about 900 requests per second. This is a 10X improvement compared to the pure-Python server serving the same application. Not bad at all.<br />
<br />
I'm glad to say that as far as I can tell, the server is pretty close to 100% WSGI compliance. At least, <code>wsgiref.validate</code> doesn't complain. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> One thing I haven't tested is its ability to handle erroneous WSGI applications. But I'm not sure if I'll want to do much validation (e.g. are the header names/values strings? Is the status code/reason code a string?). My goal is to make <em>this</em> server a production-grade server... so it will assume that your application is WSGI compliant itself.<br />
<br />
Anyhow, still a bit of work to do. It would be nice if it was configurable somehow. Also, I should probably investigate if I can just turn it into a simple Python extension module (vs. being a C server that embeds a Python interpreter). I haven't looked how the hybrid FastCGI servers are packaged, but I'm sure it's something much more sane than the route I went. <img src="http://www.saddi.com/software/news/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> 
            </div>
        </content>
        
    </entry>

</feed>