[Web-SIG] WSGI -- usable for other protocols?
Ian Bicking
ianb at colorstudy.com
Wed Oct 18 01:25:46 CEST 2006
Bill Janssen wrote:
> I've been working on Python IMAP server that uses PyLucene for
> indexing. It's mainly IMAP, but also speaks a bit of HTTP for an
> administrative interface. Does it make any sense to wrap it with
> WSGI? That is, does WSGI make sense for other protocols than HTTP
> (specifically IMAP)?
I would probably wrap it in WSGI, because that would please me. For
something like IMAP, FTP, etc., you'd have to have some persistent
server that holds the connection open, then turns certain commands into
requests. I've been thinking about doing this for dbus
(http://www.freedesktop.org/wiki/Software/dbus)
But I dunno... is there some WSGI libraries you'd like to leverage in
your IMAP server? Do you want to maintain a IMAP server with a parallel
HTTP interface? Anyway, I don't think it would be particularly hard to do.
> And, what WSGI-supporting environments will also support PyLucene (the
> limiting factor is that the GCJ runtime has to be linked in, and all
> threads must be GCJ threads).
Yikes, not sure about that. Can the normal threads communicate via some
queue to gcj threads? Otherwise the WSGI server is where the threads
are handled, so it would require tweaking some server for that (none use
gcj threads currently).
You'd also need a WSGI server that handled IMAP and persistent
connections. So maybe another server is called for, or an adaptation of
an existing multi-protocol server.
--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org
More information about the Web-SIG
mailing list