Monday, May 18. 2009flup 1.0.2 on the horizon...
I guess I've sat on these changes long enough:
I'm looking to release in a week or so. Testing/comments are welcome: http://hg.saddi.com/flup-server/ And, as you probably have noticed, I don't cut releases that often (not a big fan of "release early, release often"...) But my public repository is always up-to-date. So it's almost the same thing... without the overhead. Friday, December 5. 2008Dabbling in Python 3.0
Well, Python 3.0 was released a few days ago. I admit, I really haven't been keeping up much with Python development. Up until yesterday, Python 2.5 was all that I've used.
Anyway, I was curious. I was curious about all the backwards-incompatible changes to the language/libraries. I was curious about how WSGI dealt with Python 3.0. With the list of proposed WSGI 1.0 amendments for Python 3.0 (and the Web-SIG posts it referenced), I attempted to port both flup and ajp-wsgi. It was interesting, at least, to see the issues in two different lights. Though flup and ajp-wsgi do the same thing conceptually, flup is pure-Python and ajp-wsgi is pure-C. The most pain for both, unsurprisingly, came from the new str/bytes distinction. While it was an annoying issue to deal with (and I realize as far as the spec is concerned, all details about it still haven't been worked out), I do welcome the change. I've published both repositories, for the curious. They work for simple "Hello World" type applications. I kind of doubt that any frameworks have been ported to Python 3.0 yet. I probably won't touch them again until the spec has been clarified more. (Encoding of environ key/values? file_wrapper support with e.g. text-mode files?) Interestingly, I didn't actually test the FastCGI and SCGI adapters with "real" web servers. (I don't have anything set up.) I used the flup client implementations to cross-test clients/servers on 2.x/3.0. So those flup WSGI servers might actually be broken. The repositories: Tuesday, July 22. 2008flup 1.0.1 released
A very minor update to flup. If you aren't having any problems now, then there's probably no need to upgrade.
This update concerns certain web servers & 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). Thanks to Richard Davies for the patch. Wednesday, October 17. 2007Random changes
Just a few updates on some non-happenings. I recently discovered hg convert and hg transplant. I decided to re-do my Mercurial repositories (most originated in Subversion, while others came from CVS). I was entirely obsessed with converting the entire 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.
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 #2086), so my catch-all Trac page, http://trac.saddi.com/projects, 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. Tuesday, September 25. 2007Middleware, publisher alternatives
With the advent of flup 1.0 and the disappearance of the middleware modules (I don't think anyone really cares about Publisher
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. For users of flup's SessionMiddleware, I recommend Beaker. 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.) GzipMiddleware and ErrorMiddleware have analogues in Python Paste. flup's Publisher is probably most like Colubrid, though I haven't personally tried it. (Also remember that flup's Publisher was inspired by mod_python's Publisher, which was apparently inspired by Zope's ZPublisher Anyway, I updated the old flup 0.5 branch and uploaded the source distribution to the Cheese Shop. I really don't want to maintain two branches, so consider this 0.5 release final. Tuesday, September 18. 2007yafic 1.3 beta 1
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.
It can be found at http://www.saddi.com/software/yafic/dist/ I've done very basic testing, so use at your own risk. I plan to add another feature or two (like XML output) before making an official 1.3 release. And as usual, it may be found in my Mercurial repository: http://hg.saddi.com/yafic-sha256 (I don't plan to merge it into the main yafic repository until it's undergone more testing.) Monday, September 10. 2007flup 1.0 released
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 previously mentioned, I went ahead and removed the publisher and middleware modules.
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. I also uploaded the tarball and 2.5 egg to the Cheese Shop. Further updates will also go to the Cheese Shop. 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. And as a bit of editorializing, did I ever mention how much I hate FastCGI? Oh well, I don't even use flup myself anymore. I've switched to ajp-wsgi... Thursday, July 12. 2007Mercurial repository
I'm currently trying out Mercurial, 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 http://hg.saddi.com/.
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!) 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... 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... Monday, June 11. 2007TranQL Connector for PostgreSQL
As far as Java development goes, for personal projects and for work, I find myself in that odd place between needing only 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 mentioned 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.
Well, the problem for me is still unresolved, but I did try out Jencks 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. Which brings me to the point of this post. In the past I've blogged about problems with PostgreSQL/XA/TranQL (here and here). Although the problem was resolved 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.) Anyway, the connectors: http://maven.saddi.com/org/tranql/ 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: http://www.saddi.com/software/tranql/. You'll probably need to use the latest 8.2 JDBC driver (which includes the above-mentioned fix). 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??? Friday, April 6. 2007ajp-wsgi 1.0 released
ajp-wsgi 1.0 has been released. It may be downloaded here (ChangeLog). 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.
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.) Anyway, 1.0... so what now? Thursday, February 15. 2007ajp-wsgi future directions
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:
http-wsgi 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... mod_wsgi 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. 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? 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. Wednesday, February 14. 2007Updates
Well, not much has been happening. ajp-wsgi 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...)
On site moderation...
I'd also like to document a news site/comment moderation system that I've been thinking about for a very long time. I'll only paint the broad picture since really, I haven't given it much thought. I credit this discussion from long ago on kuro5hin for inspiration. (Some of "my" ideas may be blatant rips too... so I give credit where credit is due.
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. 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. 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. "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...?) 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. Saturday, December 16. 2006ajp-wsgi released
Well, after a week of coding, I decided to "release"
ajp-wsgi (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. 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 ticket #4, 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. Now maybe I can get back to Flannel... 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. Ah, no Google hits for mod_proxy_scgi. Oh well. At least this entry may eventually show up.
(Page 1 of 5, totaling 64 entries)
» next page
|
LinksCalendar
QuicksearchCategoriesSyndicate This BlogBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||
