
Can anyone shoot me their (fact-based) opinion as to why Twisted is more appropriate than Webware? I'm not trolling here, I've just never used Webware. Thanks Tom Fillmore in traffic-clogged southern California

Tom Fillmore <tfillmor@socalbahai.org> writes:
Can anyone shoot me their (fact-based) opinion as to why Twisted is more appropriate than Webware? I'm not trolling here, I've just never used Webware.
This is not fact-based, but "fact-based opinion" sounds oxymoronic to me ;) Anyway, I found twisted to be much more intuitive and "pythonic" (yes! vagueness!) than Webware. I first started a project with webware and rather liked it initially, but became increasingly frustrated with Webware forcing me to write my code in a certain way (specifically forcing certain class-tree layouts and disallowing multiple-inheritance in templates) so I started looking for another toolkit and settled with Twisted (which allows a lot more freedom, inheritance-wise, due to the use of interfaces/components). Webware also, IIRC, forces directory-layouts on you, too, which is just a Bad Idea, IMO (I was trying to map URIs in some arbitrary fashion and found it quite painful). This was a while ago, though: perhaps some of these things are no longer true. Of course, any toolkit is going to do a certain amount of "forcing", but, FWIW, I prefer Twisted (perhaps I just prefer the way it forces me). Also, Twisted appears to have support for many more protocols, etc., so if you are looking at integrating some web app with other things eventually (as I am), then it seems to make even more sense. HTH, -- mike [at] mike [dash] warren [dot] com <URL:http://www.mike-warren.com> gpg --keyserver 80.71.227.37 --recv-key 579911BD 87F2 4D98 BDB0 0E90 EE2A 0CF9 1087 0884 5799 11BD

Thanks - that was helpful! Tom On Oct 22, 2004, at 9:24 AM, Mike Warren wrote:
Tom Fillmore <tfillmor@socalbahai.org> writes:
Can anyone shoot me their (fact-based) opinion as to why Twisted is more appropriate than Webware? I'm not trolling here, I've just never used Webware.
This is not fact-based, but "fact-based opinion" sounds oxymoronic to me ;) Anyway, I found twisted to be much more intuitive and "pythonic" (yes! vagueness!) than Webware. I first started a project with webware and rather liked it initially, but became increasingly frustrated with Webware forcing me to write my code in a certain way (specifically forcing certain class-tree layouts and disallowing multiple-inheritance in templates) so I started looking for another toolkit and settled with Twisted (which allows a lot more freedom, inheritance-wise, due to the use of interfaces/components). Webware also, IIRC, forces directory-layouts on you, too, which is just a Bad Idea, IMO (I was trying to map URIs in some arbitrary fashion and found it quite painful). This was a while ago, though: perhaps some of these things are no longer true.
Of course, any toolkit is going to do a certain amount of "forcing", but, FWIW, I prefer Twisted (perhaps I just prefer the way it forces me). Also, Twisted appears to have support for many more protocols, etc., so if you are looking at integrating some web app with other things eventually (as I am), then it seems to make even more sense.
HTH,
-- mike [at] mike [dash] warren [dot] com <URL:http://www.mike-warren.com> gpg --keyserver 80.71.227.37 --recv-key 579911BD 87F2 4D98 BDB0 0E90 EE2A 0CF9 1087 0884 5799 11BD
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Can anyone shoot me their (fact-based) opinion as to why Twisted is more appropriate than Webware? I'm not trolling here, I've just never used Webware.
Simple: Webware is threaded, Twisted is aynchronous event-based. That's all you need to be able to choose, even without mentioning all the rest. :-) - -- Nicola Larosa - nico@tekNico.net "Mind like water" doesn't mean you should try to configure the ripples. - -- Christoph Vorwerk, August 2004 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBeUcOXv0hgDImBm4RAvUMAJ0StPg0HtKcvY6TfAktNj2CnT08DgCfVRnt Bt8D3Y7oa2HzKg6OBA2hGbk= =YIY6 -----END PGP SIGNATURE-----

Tom, It would depend on what sort of application you are constructing. What did you have in mind? Clark

Hi - I have a couple on the drawing board - one will be a _very_ data intensive app for commercial real estate, while the other will be a front end to a text search engine for various types of text/writings, with PDF output, etc. The commercial real estate app would sustain a fair level of hits (several hundred per hour to start I am imagining), the other significantly less. Thanks Tom On Fri, 22 Oct 2004 15:37:43 -0400 "Clark C. Evans" <cce@clarkevans.com> wrote:
Tom,
It would depend on what sort of application you are constructing. What did you have in mind?
Clark
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

On Fri, 22 Oct 2004 12:55:31 -0700, Tom Fillmore <tfillmor@socalbahai.org> wrote:
Hi -
I have a couple on the drawing board - one will be a _very_ data intensive app for commercial real estate, while the other will be a front end to a text search engine for various types of text/writings, with PDF output, etc. The commercial real estate app would sustain a fair level of hits (several hundred per hour to start I am imagining), the other significantly less.
I tested Nevow with ab (which, actually, is not the perfect tool for the job) and I have been able to reach (with 2-3 long queries to a DB in the same page, and by long I mean that there is a subquery processed for every row in the outer select that counts the elements (with COUNT(*)) with a fixed attribute on another table) over 7 clients/sec with no particular optimizations like query caching or page caching, which corresponds to 142ms per page. With this speed you can handle (with no efforts) 25200 hits per hour 7*60*60, which is quite a fair number for 'serveral hundred' :). Of course, if you do query result caching and you cache rendered pages for later use (with a cache lifetime) you will get to much better speeds. Just for the curious ones :): 25200 is also 18M hits/month (which is quite good). This was achieved with very low ram usage (nevow was 'capped' at ~15MB, the rest were the queries) and a 'modest' Athlon XP 2000+ with 2GB RAM under FreeBSD 5.3-rc1. If what you need is just to serve static pages, then Twisted.web can handle quite a big number of them. -- Valentino Volonghi aka Dialtone Now running FreeBSD 5.3-beta6 Blog: http://vvolonghi.blogspot.com Home Page: http://xoomer.virgilio.it/dialtone/

On Fri, Oct 22, 2004 at 12:55:31PM -0700, Tom Fillmore wrote: | I have a couple on the drawing board - one will be a _very_ data | intensive app for commercial real estate, while the other will be a | front end to a text search engine for various types of | text/writings, with PDF output, etc. It sounds like you have some pretty traditional requirements -- both Twisted or Webware will work for you well. I was using Webware about 2-3 years ago, so I can't tell you what is new since then, but I've switched to Twisted and have been very happy. Perhaps if I explained why I switched, it might be helpful. First, I wanted a built-in web server, I got tired of configuring Apache separately and at the time Webware didn't have its own HTTPS server implementation. I've been using Twisted's HTTPS for some time now and have been very happy; just recently I've written digest authentication for Twisted -- its in my sandbox if you wish. Second, I wanted 'ftp' server support "built-in" since many operating systems allow these to be mounted and used just like file systems. This seemed quite a useful feature, and when I saw a built-in 'smtp' implementation I got a fuzzy feeling inside. Third, when I first started to play with Twisted, I really loved how it handled resources. Webware has 'page' objects, whil Twisted's resource is similar, it is more flexible and since I was writing a very serious HTTP URL based system I needed quite a bit of flexibility in how my system should handle URLs. For Webware I was maintaining a series of patches -- with Twisted I didn't need the patches and this made me very happy. Fourth, Twisted uses 4-space indentation, usually at 76 columns, and if it isn't, they don't mind me patching it so that it does fit on my 80-column-huge-font-for-blind-people-screen. By contrast, Webware used tabs mixed with eight-space-indents that often put their source code at 159 columns and out. This may seem nit-picky, but when you have to read the source code to really "grok" what is going on... having to squint sucks. Fifth, I actually dislike threads, and to my suprise, people here had the same opinion. Twisted's deferreds take some time getting use to, but once you do they are simple and powerful. Probably the major difference is scope. Twisted is very large framework and growing. It is a application framework plus all of the lower-level guts you need. Webware, on the other hand, was small and focused application layer that used Apache and didn't try to do everything. If you want to hammer out a quick application -- perhaps Webware may be better. That said... if you go with twisted, you may want to hang out on IRC to get to know people some. Clark
participants (5)
-
Clark C. Evans
-
Mike Warren
-
Nicola Larosa
-
Tom Fillmore
-
Valentino Volonghi