Re: [Zope-dev] Re: [medusa] Twisted, medusa, ZServer, and VFS's

2001-10-10 Thread Don Hopkins

Running Zope on Windows is quite convenient for developing and debugging
portable Python extensions to run on the server.
It's straightforward to run Zope under Visual C++, in order put breakpoints
in Python extensions, single step through the code and catch errors.
Not to start any religious arguments, but for me, the code development tools
on Windows are much faster and easier to use than on Linux: visual symbolic
debugging, precompiled headers, incremental compilation and linking, edit
and continue, etc.
So from that perspective, it's important for Zope and Python extensions to
run identically on Windows and Linux, but not as important for Zope on
Windows be able to stand up under a high load nor run for a long time.

On the other hand, I've had some horrible problems developing Python
extensions that make Windows calls (like showing a window, which triggers
all kinds of windows message callbacks), which regularly crashed Windows so
bad in a way that the debugger couldn't deal with, that I had to cycle the
power each time. But that was caused by not locking and unlocking threads at
the right time, around window related calls.

Skip, I noticed your .sig changed: are you still looking for a flash of
enlightenment after all these years? ;-)
As an old NeWS hacker, Zope looks pretty flashy and enlightening to me!

-Don



- Original Message -
From: "Skip Montanaro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 10, 2001 6:48 AM
Subject: [Zope-dev] Re: [medusa] Twisted, medusa, ZServer, and VFS's


>
>
> Donovan> ZServer grew out of Medusa I'm not sure how tightly tied
to
> Donovan> Zope it is
>
> Not tightly at all.  I use it completely independent of Zope.
>
> Donovan> My problem with Medusa is its http and ftp servers assume
that
> Donovan> the VFS can deliver files wrapped in producers without
> Donovan> blocking.
>
> I believe Sam Rushing has said all along that Medusa is intended for
> I/O-bound situations.  If you have producers that are computationally
bound
> or that do I/O outside of the Medusa framework, you'll suffer.
>
> --
> Skip Montanaro ([EMAIL PROTECTED])
> http://www.mojam.com/
> http://www.musi-cal.com/
>
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [medusa] Twisted, medusa, ZServer, and VFS's

2001-10-10 Thread Skip Montanaro


Donovan> ZServer grew out of Medusa I'm not sure how tightly tied to
Donovan> Zope it is
>> 
>> Not tightly at all.  I use it completely independent of Zope.

Donovan> Hmm, what for? How? What are you serving out of?

I still do Zope-y sorts of things: serve files, execute database searches,
etc.  I just never used full-blown Zope.  I never had any need for its
management framework.

-- 
Skip Montanaro ([EMAIL PROTECTED])
http://www.mojam.com/
http://www.musi-cal.com/

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [medusa] Twisted, medusa, ZServer, and VFS's

2001-10-10 Thread Donovan Baarda

I'm trying to get selective with the cross-posting based on what the thread
is focusing on...

On Wed, Oct 10, 2001 at 08:48:37AM -0500, Skip Montanaro wrote:
> 
> 
> Donovan> ZServer grew out of Medusa I'm not sure how tightly tied to
> Donovan> Zope it is
> 
> Not tightly at all.  I use it completely independent of Zope.

Hmm, what for? How? What are you serving out of?

> Donovan> My problem with Medusa is its http and ftp servers assume that
> Donovan> the VFS can deliver files wrapped in producers without
> Donovan> blocking.
> 
> I believe Sam Rushing has said all along that Medusa is intended for
> I/O-bound situations.  If you have producers that are computationally bound
> or that do I/O outside of the Medusa framework, you'll suffer.

The problem is the existing http and ftp servers use file producers to serve
content, and the framework assumes producers don't block. There is no way to
make a producer that does I/O _inside_ the Medusa async framework, at least
not without using my ready() patch. The proper way to fix this is to change
the ftp and http server so they don't use file producers, instead they use
file dispatchers to push async data onto the http/ftp dispatcher. 

-- 
--
ABO: finger [EMAIL PROTECTED] for more info, including pgp key
--

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [medusa] Twisted, medusa, ZServer, and VFS's

2001-10-10 Thread Skip Montanaro



Donovan> ZServer grew out of Medusa I'm not sure how tightly tied to
Donovan> Zope it is

Not tightly at all.  I use it completely independent of Zope.

Donovan> My problem with Medusa is its http and ftp servers assume that
Donovan> the VFS can deliver files wrapped in producers without
Donovan> blocking.

I believe Sam Rushing has said all along that Medusa is intended for
I/O-bound situations.  If you have producers that are computationally bound
or that do I/O outside of the Medusa framework, you'll suffer.

-- 
Skip Montanaro ([EMAIL PROTECTED])
http://www.mojam.com/
http://www.musi-cal.com/

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: [medusa] Twisted, medusa, ZServer, and VFS's

2001-10-10 Thread kapil thangavelu

On Tuesday 09 October 2001 10:48 pm, Donovan Baarda wrote:
> G'day,
>
> First my impressions of the three contenders; Twisted, Medusa, ZServer.
> Please correct me if I'm wrong in the following summaries;
>
> Medusa seems to be the daddy of them all. It's the oldest, which has
> benefits and problems. It is a little messy from its evolution, but seems
> pretty mature. It uses an async select loop to drive everything. It uses
> "asynchat" derived class objects to communicate on sockets. Data can be
> sent by
> pushing "producers" onto asynchat objects. Producers can be complex objects
> that produce data, execute callbacks, whatever. It's ftp and http server
> classes use a primative VFS to serve from. The asyncore and asynchat
> modules it is built on are now part of Python.
>
> Twisted seems to be a from-the-ground up re-invention of Medusa. It's
> newer, but surprisingly it's bigger, dispite it's apparently less mature
> feature set. It is similar in structure to Medusa, but simplifys it by
> dispensing with producers. It can use a variety of event-loops, including
> Tk and GTK, or it's own. It doesen't have a VFS (yet) so its ftp and http
> servers serve from the underlying os filesystem.

twisted has lots of interesting ideas and architecture, but since i haven't 
used it i'll refrain from comment.

> ZServer grew out of Medusa. It uses the same basic underlying architecture,
> but throws in threads to get around the problem of delayed producers
> blocking the event loop. I'm not sure how tightly tied to Zope it is, but
> its http and ftp servers generally serve from a ZODB database, presumably
> wrapped in a Medusa VFS, though I have a feeling they might have changed
> that. ZServer also supports webDAV serving. It is possible that some of the
> enhancements could be merged back into Medusa, but probably it has changed
> so much it would be difficult.

zserver swallows medusa whole, and leaves it pretty much untouched. it builds 
its functionality ontop of medusa. there is no vfs in zope's interaction with 
medusa. requests are handled by an installed handler and are passed off to a 
thread pool which calls zpublisher (zope's orb) that maps requests directly 
onto the zodb. 

zserver's thread architecure is pretty much separate from medusa. a single 
medusa thread handles most of the network i/o. the thread architecture of 
zope (imo) is indeed mainly for avoiding blocking the event loop and  to 
allow zope and separate processing from i/o. 

i never used webdav so i can't comment, but my understanding is that changes 
to medusa made for zserver are basically things specific to zope, using 
zserver is basically using medusa. but using it without zope means you loose 
all the zope based functionality which includes the webdav implementation.



> I'm sort of fishing for general suggestions, comments, and interest. I'm at
> the point where I've just convinced myself my vfs is worth finishing, and
> my ready () patch to asynchat is worth updating, but I'm not sure what to
> use as the http and ftp server front-end, though I'm still leaning towards
> medusa. It looks like Twister is not ready, and ZServer would be too hard
> to seperate from Zope.

my two cents, i'm not sure why you think twister isn't ready but its probably 
worth experimenting with. as for zserver i don't think there is any 
additional standalone functionality that is offered on top of medusa 
distribution that really makes this make sense (with the possible exception 
that you want to use a threaded async i/o architecture like zservers, in 
which case you might also want to take a look at webware's asyncthreaded 
server.)

cheers

kapil thangavelu

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )