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

2001-10-10 Thread Moshe Zadka

On Wed, 10 Oct 2001, Donovan Baarda [EMAIL PROTECTED] wrote:

 Medusa seems to be the daddy of them all. 

Calling Medusa Twisted's daddy is rewriting history.

 Twisted seems to be a from-the-ground up re-invention of Medusa. 

Only as much as it is a from-the-ground up re-invention of qmail. Or Apache.
Twisted is a new network framework, which takes good ideas from all around.

 It's newer, 
 but surprisingly it's bigger, dispite it's apparently less mature 
 feature set. 

I think Twisted's feature set is very mature. Particularily, it does
have good integration with threads.

 It is similar in structure to Medusa, but simplifys it by dispensing with 
 producers.

Well, you can still have producers -- they are just tied in to connections
rather then the event loop itself.

 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.

Well, the HTTP server can serve from in-memory resources, or for that matter,
any resource that follows the protocol.

-- 
The Official Moshe Zadka FAQ: http://moshez.geek
The Official Moshe Zadka FAQ For Dummies: http://moshez.org
Read the FAQ

___
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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread Chris Withers

Itamar Shtull-Trauring wrote:
 
 Actually, this brings up this idea I had - Zope should replace medusa with
 Twisted.

Well, you're advocating this, so it's fair to paint a rosy picture.
Can anyone see what the downsides would be?

In any case, it does look cool. Perhaps a fishbowl proposal would be the way to
go?

Chris

___
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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread Itamar Shtull-Trauring

Oops, forgot the URL: http://www.twistedmatrix.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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread kosh



Designing the webpages of tomorrow http://webme-eng.com
Designing the MMORPGS of tomorrow http://worldforge.org

On Wed, 10 Oct 2001, Itamar Shtull-Trauring wrote:

 Actually, this brings up this idea I had - Zope should replace medusa with
 Twisted. Why, you ask?

Any ideas what the performance would be compared to medusa?

 1) Twisted separates transport from protocols, and the event loop it uses is
   extendable and generic. That means:

- It can run on Jython (using threads, someday with java.nio), and it can
 be integrated with the Tk and GTK event loops.

- Your protocol doesn't have to worry about the transport - Twisted
 supports SSL, TCP and unix domain sockets right now, without having to make
 any change to the protocols.

SSL support out of the box would be a big deal. It really annoys me that
zope does not support https by default. It is another thing to hunt down
and merge in the config file for and it is necessary for any modern web
server.


 2) Twisted is designed to run multiple servers and protocols at the same
 time, and these can be changed at runtime. It already includes pure python
 support for HTTP, FTP, LDAP, SMTP, POP3, DNS, telnet, AIM TOC, and IRC, all
 integrated with the main event loop (all have server support except DNS and
 LDAP). Adding new protocols to Zope is not easy, at the moment.

It would be really nice if it supported NNTP, SOAP, and XML-RPC also.
However the last two could probably be stuck in fairly rapidly since
python already supports those and they run over HTTP already.

 3) Twisted is being actively developed and extended. medusa less so.

Actively developed would definitely be an improvement.

 4) Good integration with threads - while event based, twisted has a very
 nice model for dealing with threaded apps.
What benefits would this really give? What drawbacks would we have to deal
with? Overall I have noticed that python does not seem to actually thread
very well since there is that global lock.


 5) Twisted has Perspective Broker, an async.ready remote-object protocol
 that supports caching, object migration, and remote messaging, with
 integrated authentication and authorization. And it ideologically meshes
 with the object publisher notion in Zope. No, really :)

This part sounds pretty cool I will definitely have to look at it some
more. I looked at it a little while ago and it looked very cool however
zope has some serious things that twisted does not. Mainly I really like
how the access control system works, the user folder system and the object
store.


 Twisted already includes a high-level web framework, but Zope probably would
 not use it, and instead build its own on top of twisted's low-level http
 support.

We could essentially keep the ZMI however I do think the ZMI is due for a
large rewrite soon. The frames and a few other things have got to go.
Mostly because xhtml 1.0 is the last html version to even have frames and
zope will have to adapt as things progress. It would not surprise me if in
2 or 3 years most new browsers didn't support frames anymore.


___
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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread Tino Wildenhain

Hi Itamar,

this sounds good for me. One would have to see it
in the wild. Would you be able to do a sample integration
for testing?

At the same time unmeshing the publishing process sounds
sexy to me...

Regards
Tino

--On Mittwoch, 10. Oktober 2001 12:11 +0200 Itamar Shtull-Trauring 
[EMAIL PROTECTED] wrote:

 Actually, this brings up this idea I had - Zope should replace medusa with Twisted. 
Why, you
 ask?

 1) Twisted separates transport from protocols, and the event loop it uses is   
extendable and
 generic. That means:

- It can run on Jython (using threads, someday with java.nio), and it can be 
integrated
 with the Tk and GTK event loops.

- Your protocol doesn't have to worry about the transport - Twisted supports SSL, 
TCP and
 unix domain sockets right now, without having to make any change to the protocols.

 2) Twisted is designed to run multiple servers and protocols at the same time, and 
these can
 be changed at runtime. It already includes pure python support for HTTP, FTP, LDAP, 
SMTP,
 POP3, DNS, telnet, AIM TOC, and IRC, all integrated with the main event loop (all 
have server
 support except DNS and LDAP). Adding new protocols to Zope is not easy, at the 
moment.

 3) Twisted is being actively developed and extended. medusa less so.

 4) Good integration with threads - while event based, twisted has a very nice model 
for
 dealing with threaded apps.

 5) Twisted has Perspective Broker, an async.ready remote-object protocol that 
supports
 caching, object migration, and remote messaging, with integrated authentication and
 authorization. And it ideologically meshes with the object publisher notion in 
Zope. No,
 really :)


 Twisted already includes a high-level web framework, but Zope probably would not use 
it, and
 instead build its own on top of twisted's low-level http support.



 ___
 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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread Phil Harris

But kosh, we all know your hatred of all things Microsoft.

You're absolutely right, it could be fixed, and probably should be as well.

Thing is that from what I see win32 is the most popular platform for Zope
(I'm including experimenters here though, not just production sites).
Anyone from ZC want to comment on that.

- Original Message -
From: [EMAIL PROTECTED]
To: Phil Harris [EMAIL PROTECTED]
Cc: Chris Withers [EMAIL PROTECTED]; Itamar Shtull-Trauring
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, October 10, 2001 12:21 PM
Subject: Re: [Zope-dev] A modest proposal: Replace medusa with Twisted


 On Wed, 10 Oct 2001, Phil Harris wrote:

  I'd say the fact that it doesn't work on Win32 is a bit of a downer.
 
 Just a bit but overall I expect that could be changed if it where really
 important. From what I have seen under high load and python program will
 kill windows after a few days with some VM problems so this does not seem
 that important to me. I have seen on irc and the lists a good deal of
 problems to do with windows and zope with VM issues over time. I have not
 done much testing with that though since it seems like kind of a silly
 thing to spend a few thousand on an OS to run a free server on when you
 can run it on a free os also and just pay for the hardware.

 Designing the webpages of tomorrow http://webme-eng.com
 Designing the MMORPGS of tomorrow http://worldforge.org


___
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] Lowlevel python/Zope Errors: asyncore.py and others...

2001-10-10 Thread Dario Lopez-Kästen

Hello!

I have a serious problem with Zope. We repeatedly get the following kind of
errors:

2001-09-05T13:45:12 ERROR(200) ZServer uncaptured python exception, closing
channel zhttp_channel connected XX.XX.XX.XX:1186 at ab1174 channel#: 10
requests:5 (
socket.error:(32, 'Broken pipe')
[/usr/local/zope/dist/Zope-2.4.1/ZServer/medusa/asynchat.py|initiate_send|21
4] [/usr/local/zope/dist/Zope-2.4.1/ZServer/medusa/http
_server.py|send|414]
[/usr/local/python-2.1.1-no_pymalloc/lib/python2.1/asyncore.py|send|330])

and

---
2001-09-28T14:09:40 ERROR(200) zdaemon zdaemon: Fri Sep 28 16:09:40 2001:
Aiieee! 28590 exited with error code: 138

(error code can also be 139, 256
---

and
---

and a lot of these:

--
2001-10-03T15:00:27 INFO(0) Z2 CONFLICT Competing writes at,
/ka/sys/PageHandling/manage_renameObjects
Traceback (innermost last):
  File /usr/local/zope/dist/Zope-2.4.1/lib/python/ZPublisher/Publish.py,
line 175, in publish
  File /usr/local/zope/dist/Zope-2.4.1/lib/python/Zope/__init__.py, line
240, in commit
  File /usr/local/zope/dist/Zope-2.4.1/lib/python/ZODB/Transaction.py, line
302, in commit
  File /usr/local/zope/dist/Zope-2.4.1/lib/python/ZODB/Connection.py, line
324, in commit
ConflictError: '\x00\x00\x00\x00\x00\x009\xda'
---

Our Zope usually locks up big time when this happens. If anybody has some
asyncore.py zen to share and can explain what is going on? We are using
transparent Folders, dunno if it is related to that (I am blaiming most
everything on transparent folders these days ;-).

I found some info on google, suggesting this is an old problem:

with Zope 2.1.6

http://www.zope.org/Members/tseaver/Projects/HighlyAvailableZope/Zope%20hang
ing%20%28poss.%20threads-related%29

and Zope 2.3.1

http://aspn.activestate.com/ASPN/Mail/Message/zope-Dev/531379

We are using the Zope 2.4.1 source release with Python 2.1.1, no pymalloc.
IE Clients.

Thank you for any input.

/dario
- 
Dario Lopez-Kästen Systems Developer  Chalmers Univ. of Technology
[EMAIL PROTECTED]  ICQ will yield no hitsIT Systems  Services



___
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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread Michel Pelletier

On Wed, 10 Oct 2001 16:05:06 +0200
 Itamar Shtull-Trauring [EMAIL PROTECTED] wrote:

 2) Plugging in a different transports instead of TCP (e.g. SSL) is much
 easier in Twisted than medusa, as far as I can tell. In m2crypto's medusa
 ssl code very protocol needs its own subclass in order supports SSL. In
 Twisted that is done transparently - the protocol doesn't have to worry
 about the transport. Basically any protocol (excepting perhaps FTP) could
 run out of the box with SSL in Twisted, using the one SSL support module. Or
 Unix domain sockets for that matter :)
 
 3) Twisted provides a larger number of protocols out of the box (e.g. pure
 python LDAP client, AOL TOC, IRC, POP3, SMTP, telnet) than medusa. Hopefully
we will soon have an integrated DNS server as well, though I can't think
 how *that* would help Zope.

Just to throw out another idea, Amos has discussed with me in the past the idea of 
replacing medusa with Apache 2.0.  Compelling as many of Twisted's features may be, 
Apache 2.0 as far as i can tell supports many of them as well (except perhaps jython 
integration, which is a pipe dream anyway for Zope).  Apache has the upshot in that it 
is rock solid, tested by millions, trusted by even more, and no doubt one of the most 
actively developed peices of software there is.

For ZC the upshots of 1) not needing to maintain it, and 2) it being a excellent 
marketing tool outweight many technical benifits that twisted may have that Apache 
doesn't (I'd like to know what the differences are, however).  For example, does 
twisted do URL rewriting?  proxy?  process/thread job control?

Twisted does have the advantage of 1, but not 2.  Further, our faith in the continuing 
development of Apache is, de facto, more than that of twisted simply based on the age, 
number of users, and number of developers of each project.

I'm not dismissing the idea, I'm just pointing out an alternative to Itamar's 
alternative.  ;)

-Michel

___
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 )



Re: [Zope-dev] A modest proposal: Replace medusa with Twisted

2001-10-10 Thread kapil thangavelu

On Wednesday 10 October 2001 08:09 am, Michel Pelletier wrote:

 Just to throw out another idea, Amos has discussed with me in the past the
 idea of replacing medusa with Apache 2.0.  Compelling as many of Twisted's
 features may be, Apache 2.0 as far as i can tell supports many of them as
 well (except perhaps jython integration, which is a pipe dream anyway for
 Zope).  Apache has the upshot in that it is rock solid, tested by millions,
 trusted by even more, and no doubt one of the most actively developed
 peices of software there is.

 For ZC the upshots of 1) not needing to maintain it, and 2) it being a
 excellent marketing tool outweight many technical benifits that twisted may
 have that Apache doesn't (I'd like to know what the differences are,
 however).  For example, does twisted do URL rewriting?  proxy? 
 process/thread job control?

i'd never thought i'd see the day, open source software advocating the 
inclusion of other open source software because of marketing dictates.


 I'm not dismissing the idea, I'm just pointing out an alternative to
 Itamar's alternative.  ;)

my alternative to your alternative, is aolserver and mozilla. no mozilla 
isn't a webserver, but why should zope be either. 

cheers

kapil

___
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 )



Re: [Zope-dev] Zope Cygwin

2001-10-10 Thread Phil Harris

I had a brief conversation with the Cygwin Python maintainer a little while back, 
supposedly the next release of Cygwin will have a threaded Python (2.1.1 or maybe even 
higher).

Phil

On Wed, 10 Oct 2001 13:17:22 -0400
Chris McDonough [EMAIL PROTECTED] wrote:

  FYI
  I finally have a Cygwin compiled Zope running in a Cygwin enviroment.
  This is with the very latest Cygwin distribution augmented by a locally
  compiled Cygwin as represented by the current Cygwin CVS files.
 
 Cool!  This is excellent.  This means that I stand a shot at getting rid of
 200 miserable MB of VC++ on my machine.
 
 I presume this means that Cygwin Python ships with threads enabled?
 
 - C
 
 
 
 ___
 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] PageTemplateFile + Metal not working

2001-10-10 Thread Steve Alexander

I'm using ZPT in a Python Product. PageTemplateFile works fine, using it 
more-or-less as a drop-in replacement for DTMLFile.

However, I want to use METAL with this. Simple macros that work on page 
templates created in the ZODB fail to work from filesystem python products.

The error I'm getting is this:

   Error Type: Undefined
   Error Value: macros not found in
 here/standard/macros/header_and_footer

If I call _cook() on the PageTemplateFile objects in my module, I get a 
slightly different error:

  Error Type: Undefined
  Error Value: header_and_footer not found in
here/standard/macros/header_and_footer


This is the latest version of PageTemplates, TAL, and ZTUtils from CVS, 
with the latest Zope trunk from CVS.

Any ideas?

--
Steve Alexander
Software Engineer
Cat-Box limited




___
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] ZPublisher/ZServer interaction (was Re: A modest proposal)

2001-10-10 Thread Phillip J. Eby

At 08:00 AM 10/10/01 -0700, kapil thangavelu wrote:

sadly the distinction between zpublisher and zserver is nowhere near as
clean, i spent some time looking at it this morning trying to get my server
of choice using zope. i thought it would be a mid morning hack, but the rabit
hole follows the class heirarchy deeper and deeper:).  all i have to show for
my results is zope's output dumped to the server logs. its a start though...

hopefully we get some new religion in the publisher, please...

Hmm...   Check out:

http://cvs.eby-sarna.com/pylib/ZLite/

Specifically, the ZPlumbing module, for several examples of ZPublisher run 
loops using CGI and two different FastCGI modules.  I don't know anything 
about Twisted, so I couldn't tell you how easy it'd be to use the ZLite 
framework for this.

ZLite is the beginnings of my work on a Zope Lite distribution.  It's 
sort of the Standalone ZODB distribution's evil twin - intended if you 
want to use almost anything *but* the ZODB and ZMI parts of Zope.  That is, 
when you just want the app server without the IDE and application 
framework.  Architecturally, it's intended for multi-process, single thread 
setups using Apache as a front-end, with FastCGI.

This shouldn't be considered an announcement or a release, btw.  The code 
in CVS is production-hardened by years of service (many millions of hits 
served), but is utterly without documentation, nor has everything I've 
written been checked into CVS yet.


___
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 )