On Mon, Feb 24, 2003 at 01:07:03AM -0600, Ian Bicking wrote:
| It would be kind of interesting to port Webware's servlet model to other
| application servers... I'm not sure how possible that would be.  On a
| certain level it would be fairly easy, but I expect some of the ideas
| might be too different (for instance, an asynchronous model vs. a
| threaded model vs. a multiple process model).

I'm trying Twisted these days for new development of my application,
the current one in production is using Webware (with a few patches)
with great success.

Overall, it seems that the biggest difference between Webware and
Twisted is that Twisted uses an async, aka event pump model where
Webware uses threads.  Twisted does this so that they can work 
nicely on top of and use the message pump of various windowing
systems, such as wxWindows.   Twisted's async "cooperative multitasking" 
requires strict compliance with programming conventions or it is
possible to lock your entire server.  I'm not convinced that this
async approach is better than using threads... it seems like stepping
back into the 80's with big message pumps and all.

As far as the "model", I think I like the twisted model of a 
"request" and "resource" better than Webware's model.  I was always
uncomfortable with the extra abstractions that Webware has and feel
that Webware's attempts to do nice things for you get in the way
more often than they actually help.  To the credit of 
FreeBSD/Apache/PostgreSQL/Webware, I have a process that's been 
up for 4-5 months now without a restart...

To be a bit critical of both groups; they both tend to keep adding
extras and lack a real "charter" with a fine line between what is
part of the framework and what isn't.  Instead both groups tend to add
a bunch of extras that usually arn't all that useful unless you are
doing something very similar to what the original author had in mind.
Not that these extras are bad; they just add, IMHO, unnecessary clutter
that detract from both projects rather than enhancing them.  In this
department I think the Twisted group is probably the worst, as they
have people doing all kinds of things...

That said, I wanted "ftp" support for my next app and I'd rather
not have it in a separate process.  Also, I want to have a single
process rather than using Apache.  So, this is what is currently
attracting me to Twisted -- I guess it's the clutter that I do
find useful.  *grin*.

Really; I think either choice is probably very good.  I'd say
webware is probably a bit more mature, and if you already have
Apache and don't really need "chat" and "ftp" and other services
besides "http", then I'd pick Webware.  On the other hand, if you
are writing a peer-to-peer thingy, I'd pick Twisted.

As for portability between them... Most of my webware code
(inherits from Page) moved over quite nicely with little pain.
The issues when switching frameworks: (a) sessions, (b) database
connections, (c) threading issues for shared memory/resources,  
(d) minor field name changes.  Overall, you could probably port 
a medium sized project between them in a long weekend.... so, 
really, pick either.  If you don't like one, switching wouldn't
be all that painful if you changed your mind later.

Clark

P.S.  One irritant is that Twisted doesn't use FieldStorage, so
I'm not sure how it will handle large file posts and it makes
Twisted code somewhat non-standard (cuz it doesn't use the
cgi.FieldStorage class)... but this is just a uninformed nitpick
with only a few hours of Twisted experience.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to