Re: [Zope-dev] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Steve Alexander

William Noon wrote:

 Last week I was setting up an Apache VirtualHost to point to a Zope
 object tree using the ProxyPass directive and SiteAccess to get all the
 urls right (great stuff!).
 
 However, I noticed that the REMOTE_ADDR was always set to the 
 proxy host.  This makes sense because Zope just gets the host/port from
 the socket connection.  But I needed the real remote_addr for logging
 and user admin.  Adding 'Header's wouldn't pass the info to Zope.
 
 The Zope mail archives mentioned the problem a couple of times without
 a configuration fix.
 
 A simple fix to the proxy module (in proxy_http.c) will create a new
 header called 'Original-Addr' to contain the client's ip address.

Also, take a look at mod_proxy_add_forward for Apache, and these other resources:

  http://www.zope.org/Members/stephen/ApacheProxyPatch
   http://modules.apache.org/search?id=124

   ftp://ftp.netcetera.dk/pub/apache/mod_proxy_add_forward.c

I believe there is some code in mod_proxy_add_forward to deal with 
getting the client's IP address from chains of proxies.


--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Matt Hamilton

On Mon, 12 Feb 2001, William Noon wrote:

 A simple fix to the proxy module (in proxy_http.c) will create a new
 header called 'Original-Addr' to contain the client's ip address.
 
 Here is a context diff against Apache 1.3.14 that should work even 
 in the new 2.0 servers:

FYI, there is an apache module that already does this.  I can't remember
the name offhand, but it creates a similar header called something like
X-Original-Addr.  The module works in two parts and is both 'client' and
'server', so that if you have two apache processes one prxying to the
other, the first will generate the header, and the second will recognise
it and set the appropriate variables.

-Matt

-- 
Matt Hamilton [EMAIL PROTECTED]
Netsight Internet Solutions, Ltd.  Business Vision on the Internet
http://www.netsight.co.uk   +44 (0)117 9090901
Web Hosting | Web Design  | Domain Names  |  Co-location  | DB Integration



___
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] manage_ methods

2001-02-13 Thread Chris Withers

Dieter Maurer wrote:
 
   "manage_" methods are mapped to permissions (as are any other methods).
   You can decide which roles have which permissions.

What does the 'View management screens' permission protect?

cheers,

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] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Chris Withers

Steve Alexander wrote:
 
 Also, take a look at mod_proxy_add_forward for Apache, and these other resources:
 
   http://www.zope.org/Members/stephen/ApacheProxyPatch
http://modules.apache.org/search?id=124
 
ftp://ftp.netcetera.dk/pub/apache/mod_proxy_add_forward.c
 
 I believe there is some code in mod_proxy_add_forward to deal with
 getting the client's IP address from chains of proxies.

We're actually phasing this hack out in favour of a Virtual Host Monster which
seems like a much cleaner solution...

cheers,

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 )



[Zope-dev] Virtual Host Monster Paranoia

2001-02-13 Thread Chris Withers

Right,

I really like the idea of these things but I am concerned about something that
allows anonymous users to futz with traversal.

Can someone put my fears to rest that using these won't let anonymous users do
bad things to my sites?

cheers,

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] Virtual Host Monster Paranoia

2001-02-13 Thread Matt Hamilton

On Tue, 13 Feb 2001, Chris Withers wrote:

 Right,
 
 I really like the idea of these things but I am concerned about something that
 allows anonymous users to futz with traversal.
 
 Can someone put my fears to rest that using these won't let anonymous users do
 bad things to my sites?

I use them in conjunction with Apache's mod_proxy to rewrite
http://www.simpledomain.com to the long
http://zopehost.foo.com/blah/blah/VirtualHostMonstser/blah/blah.  The Zope
host is behind a firewall, so anonymouse users cannot get to it directly.

-Matt

-- 
Matt Hamilton [EMAIL PROTECTED]
Netsight Internet Solutions, Ltd.  Business Vision on the Internet
http://www.netsight.co.uk   +44 (0)117 9090901
Web Hosting | Web Design  | Domain Names  |  Co-location  | DB Integration



___
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] Virtual Host Monster Paranoia

2001-02-13 Thread Toby Dickenson

On Tue, 13 Feb 2001 10:24:54 +, Chris Withers [EMAIL PROTECTED]
wrote:

I really like the idea of these things but I am concerned about something that
allows anonymous users to futz with traversal.

Can someone put my fears to rest that using these won't let anonymous users do
bad things to my sites?

I didnt realize V-H-M was coming in 2.3.0, and developed an
alternative that fills a similar niche:

http://www.zope.org/Members/htrd/howto/host-server

This option has fewer 'moving parts' than anything based on SiteAccess
(which I still feel uncomfortable with, sorry evan)



Toby Dickenson
[EMAIL PROTECTED]

___
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] Virtual Host Monster Paranoia

2001-02-13 Thread Toby Dickenson

On Tue, 13 Feb 2001 10:30:26 + (GMT), Matt Hamilton
[EMAIL PROTECTED] wrote:

I use them in conjunction with Apache's mod_proxy to rewrite
http://www.simpledomain.com to the long
http://zopehost.foo.com/blah/blah/VirtualHostMonstser/blah/blah.  The Zope
host is behind a firewall, so anonymouse users cannot get to it directly.

No, but they can get to:

http://www.simpledomain.com/blah/VirtualHost/bad.stuff/blah

which gets rewritten to:

http://zopehost.foo.com/VirtualHost/http/www.simpledomain/blah/VirtualHost/bad.stuff/blah

Understanding its behaviour behaviour might be beyond the complexity
threshold for a paranoid admin to be comfortable.

Toby Dickenson
[EMAIL PROTECTED]

___
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] Windows registry?

2001-02-13 Thread Wolfgang Strobl

On 12 Feb 2001, 23:04  Chris Maresca wrote:
 
 If I recall correctly, there is a tool for doing this call srvany,
 part of the resource kit.

I use srvany for running some background services written in 
Python on some of my servers. It works so far, but not as reliable 
as I'd like - especially stopping/restarting a service often fails, 
which is a PITA.

 
 Mine installed as a service on w2k by default...

This doesn't use svrany.exe, but pythonservice.exe, which is part 
of the win32 extensions written by Mark Hammond, now with 
ActiveState. "Python programming on Win32" by Mark Hammond 
and Andy Robinson contains some documentation on how to use 
pythonservice.exe. The Windows version of Zope makes use of this 
driver program, when installing Zope as a service. The relevant logic 
for running Zope as a Windows service is contained in 
Zserver/ZService.py.   I intend to switch from svrany to using 
pythonservice.exe for the aforementioned reason.

That's almost all I know about this specific topic at this time; I'd 
suggest that Andy McKay might ask his colleague Mark about 
pythonservice.exe, instead of doing guesswork :-)

 
 Chris.
 
 On Mon, 12 Feb 2001, Andy McKay wrote:
 
  Anyone tried or got a script to create / delete the windows registry
  settings for running a zope server as a service. It would make my
  life a lot easier... If no-one has I could recreate them from
  observation.

--
  o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
 /\*   GMD mbH   #include 
   _`\ `_===  Schloss Birlinghoven, std.disclaimer
__(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

___
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] Virtual Host Monster Paranoia

2001-02-13 Thread Toby Dickenson



 Then again, there's the advantage of having something 
 included as a standard part of Zope.

Yes, thats true. I would like to see this being rolled into the standard
zope (and there is a Collector entry saying that), although I think its
unlikely given the 'competition' from VHM.

Having said that, a big patch is worse than a small patch. And 
http://www.zope.org/Members/htrd/howto/host-server is a really tiny patch
;-)


___
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] Virtual Host Monster Paranoia

2001-02-13 Thread Evan Simpson

From: "Chris Withers" [EMAIL PROTECTED]
 Well, it's easy enough to find out if a site is running Zope, then this
becomes
 pretty easy attack to think of

I'm not going to claim that this is perfectly harmless, but I can't think of
any way in which this could be termed an "attack".  You can already provide
any traversal path you like in the URL; All VHM adds is the ability to
manipulate generated URLs, and in fairly crude ways.  These URLs come back
to your browser in a page, where they have no more potential for harm than
if you'd assembled them by hand.

The only scenario I can imagine where this could even affect the operation
of a site is one where the site uses URLs internally in some fashion.  This
is part of the reason that Zope has shifted from using URLs to paths when
addressing objects, since paths are unaffected by URL manipulation.

Cheers,

Evan @ digicool  4-am


___
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] Calling Python Scripts from Python Products

2001-02-13 Thread Chris Withers

Hi,

I was to call a Python Script from within a Python product and I'm wondering
what to call it with so that context, container, script, namespace and subpath
all get bound to the right things?

cheers,

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] Strange AttributeError in AccessControl/User.py

2001-02-13 Thread Steve Alexander

Morten W. Petersen wrote:

 Hi guys,
 
 indeed a strange problem, anyone experienced this?
 
   Zope Error
 
  Zope has encountered an error while publishing this resource. 
 
  AttributeError
 
   Sorry, a Zope error occurred.
 
Traceback (innermost last):
  File /home/morten/Zope/lib/python/ZPublisher/Publish.py, line 222, in 
publish_module
  File /home/morten/Zope/lib/python/ZPublisher/Publish.py, line 187, in 
publish
  File /home/morten/Zope/lib/python/Zope/__init__.py, line 221, in 
zpublisher_exception_hook
(Object: CatalogAware)
  File /home/morten/Zope/lib/python/ZPublisher/Publish.py, line 162, in 
publish
  File /home/morten/Zope/lib/python/ZPublisher/BaseRequest.py, line 442, 
in traverse
  File /home/morten/Zope/lib/python/AccessControl/User.py, line 496, in 
validate
(Object: RoleManager)
  File /home/morten/Zope/lib/python/AccessControl/User.py, line 231, in 
allowed
AttributeError: aq_inContextOf

What version of Zope are you using?

On my Zope 2.3 fom CVS, the line of User.py that could conveivably cause that error is 
20 line on at 251.

Perhaps you're hitting a but that's been fixed in a later version of Zope, or in CVS 
for the next version?

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Oliver Bleutgen

 From: "Chris Withers" [EMAIL PROTECTED]
 We're actually phasing this hack out in favour of a Virtual Host Monster
 which
 seems like a much cleaner solution...

 Sorry, Chris, VHM is irrelevent to this problem.  If you want to know the
 original remote IP, you have two choices:

 1. Use one of the Apache patches that have been posted.

 2. Mangle it into URLs and extract it with an AccessRule.

 Neither one of these is really satisfactory at the moment, since medusa
 doesn't know either solution, and so z2.log doesn't get the proper IP
 addresses.  I'm hoping that one of these days we can standardize on #1 and
 provide support in medusa.

I don't get why it is necessary at all to use medusa's logging when using apache
or squid etc. as a proxy. I for instance use apache to also serve content which
isn't contained in the ZODB (large files etc.), and I want the logs/statistics to 
also contain information about these.
Btw. with a small module it's even possible to log the usernames with apache,
something medusa isn't capabable of afaik (as of zope version  2.3).

cheers,
oliver


___
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] Strange AttributeError in AccessControl/User.py

2001-02-13 Thread Erik Enge

[Morten W. Petersen]

| indeed a strange problem, anyone experienced this?

What did you do to make this happen?  Versions?

___
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] Re: ThreadSafeCounter

2001-02-13 Thread Erik Enge

[Morten W. Petersen]

| The ideal solution would be to use an object that lives in the ZODB,
| I wonder if there is a way to keep the 'object history' empty?  That
| is, keeping the counter 'packed' while retaining 'object history'
| information on all other objects.

I'm no ZODB expert, but I think the short story is that you can't have
this across several threads -- because you would have to use _v_
attribs.  And what good is a ThreadSafeCounter if it's not threadsafe?

By the way, the reasons for this to be better as a ZODB object is that
you wouldn't have to worry about which filesystem the server runs, and
if there is serveral servers?

If you have the resources, a really cool thing would be to set up a
Zope box running a counter and an XML-RPC script in the other end.
That wouldn't be a problem making safe.  You do have other stuff to
consider then, though.

I like XML-RPC.


___
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] ProxyPass and SiteAccess getting REMOTE_ADDR

2001-02-13 Thread Evan Simpson

From: Oliver Bleutgen [EMAIL PROTECTED]
 Btw. with a small module it's even possible to log the usernames with
apache,
 something medusa isn't capabable of afaik (as of zope version  2.3).

Cool! What module is this, and how do you use it?

Cheers,

Evan @ digicool  4-am


___
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] Python Scripts

2001-02-13 Thread Chris Withers

Evan Simpson wrote:
 
 You shouldn't have to do anything special; You just call it.

How would I pass a DTML namespace that I might have lying around when I make the
call so that it gets bound to the appropriate Namespace variable in the script?

cheers,

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] Refresh DoubleTake :-S

2001-02-13 Thread Shane Hathaway

Chris Withers wrote:
 
 Shane Hathaway wrote:
 
  But here's the biggest news: the Refresh product, which makes life just
  a little bit easier for filesystem product developers, now has an
  auto-refresh feature and the ability to set up dependent products.  This
  means changes to your Python modules are instantly recognized by Zope
  and development is almost as nice as working with ZClasses.
 
  http://www.zope.org/Members/hathawsh/Refresh
 
 This is really cool :-)
 
 However, for some reason, I have to hit the Refresh button twice for any of my
 chanegs to take effect.
 
 Any idea why that is?

What product are you refreshing?  Maybe it's specific to the product.

Shane

___
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] Re: ThreadSafeCounter

2001-02-13 Thread Andy McKay

 | The ideal solution would be to use an object that lives in the ZODB,
 | I wonder if there is a way to keep the 'object history' empty?  That
 | is, keeping the counter 'packed' while retaining 'object history'
 | information on all other objects.

That would work, however I just dont think that fits neatly into the ZODB in
any way since all objects are appended.

 I'm no ZODB expert, but I think the short story is that you can't have
 this across several threads -- because you would have to use _v_
 attribs.  And what good is a ThreadSafeCounter if it's not threadsafe?

Well it would be threadsafe since the object cannot be written too by
multiple threads as discussed earlier it will keep try 3 times and then
fail. To me the ideal answer is a simple FileSystem product that allows you
to mount a file system inside the ZODB. This would implrement locking and be
hence be thread safe. Its a real science project. This would also have to be
ZEO friendly, but to be honest for my use and most other peoples, this isnt
a huge concern.

 I like XML-RPC.

Me too but its slw.

--
  Andy McKay.


___
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] Windows registry?

2001-02-13 Thread Andy McKay

 This doesn't use svrany.exe, but pythonservice.exe, which is part
 of the win32 extensions written by Mark Hammond, now with
 ActiveState. "Python programming on Win32" by Mark Hammond
 and Andy Robinson contains some documentation on how to use
 pythonservice.exe. The Windows version of Zope makes use of this
 driver program, when installing Zope as a service. The relevant logic
 for running Zope as a Windows service is contained in
 Zserver/ZService.py.   I intend to switch from svrany to using
 pythonservice.exe for the aforementioned reason.

 That's almost all I know about this specific topic at this time; I'd
 suggest that Andy McKay might ask his colleague Mark about
 pythonservice.exe, instead of doing guesswork :-)

I just wanted know details of how the registry is set up so I can quickly
fiddle with my service settings and write a script to quickly install and
uninstall the services to make moving Zope's much easier on win32. It looks
like everything I need to know is in ZServer/ZService, I should have just
done my usual source grep before asking...

Mark actually works in Australia most of the time so asking him isn't as
easy as it sounds...

Thansk.

 
  Chris.
 
  On Mon, 12 Feb 2001, Andy McKay wrote:
 
   Anyone tried or got a script to create / delete the windows registry
   settings for running a zope server as a service. It would make my
   life a lot easier... If no-one has I could recreate them from
   observation.

 --
   o  ( [EMAIL PROTECTED] (+49 2241) 14-2394
  /\*   GMD mbH   #include
_`\ `_===  Schloss Birlinghoven, std.disclaimer
 __(_)/_(_)___.-._  53754 Sankt Augustin, Germany 

 ___
 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] Refresh DoubleTake :-S

2001-02-13 Thread Chris Withers

Shane Hathaway wrote:
 
  Any idea why that is?
 
 What product are you refreshing?  Maybe it's specific to the product.

An NDA'd one ;-)

Sorry, that's not a lot of help I know, but what sort of things should I be
looking for that'd cause refresh to not work properly?

cheers,

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] Refresh DoubleTake :-S

2001-02-13 Thread Shane Hathaway

Chris Withers wrote:
 
 Shane Hathaway wrote:
 
   Any idea why that is?
 
  What product are you refreshing?  Maybe it's specific to the product.
 
 An NDA'd one ;-)
 
 Sorry, that's not a lot of help I know, but what sort of things should I be
 looking for that'd cause refresh to not work properly?

I just got the same problem this past hour... actually, what happened is
changes to one module took effect immediately, while changes to a
different module of the same product required two refreshes.  It's a
dependency mapping problem I thought reload() took care of, but
apparently not.  However, I have an idea that might solve it.  Thanks
for the heads-up!

Shane

___
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] Refresh DoubleTake :-S

2001-02-13 Thread Chris Withers

Shane Hathaway wrote:
 
 apparently not.  However, I have an idea that might solve it.  Thanks
 for the heads-up!

Pleasure :-)

(as a workaround we've developed the 'Pound on the Refresh button like a monkey'
technique *grinz*)

cheers,

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 )



[Zope-dev] Formal argument for acquisition and aq_self

2001-02-13 Thread Steve Alexander

I've just been reading through some academic papers by Tom Mens.

The paper at this link looks interesting, as it appears to me to 
describe a problem that is addressed in Zope by acquisition wrappers.

http://prog.vub.ac.be/Research/ResearchPublicationsDetail2.asp?paperID=51

Abstract
Most object-oriented languages provide a self pseudo variable that 
serves two purposes: invoking methods through self sends and returning a 
self reference. Current formal models capture this behaviour by 
introducing a self parameter that fulfils both roles. We will show that 
this double functionality is incompatible with object-based 
encapsulation. Moreover we will point out that the separation of both 
functionalities is needed in type systems. We propose a formal model 
based on a primitive self send construct, and present its denotational 
semantics. A self reference is implemented through a self send instead 
of the other way around. This model is extended formally with an 
object-based encapsulation mechanism. It allows us to keep inheritance, 
encapsulation and typing orthogonal. This way we obtain a flexible and 
incremental software development scheme.


In the case of Zope, the "self sends" are represented by the way an 
acquisition wrapper dispatches messages. The "self reference" is given 
by aq_base (or one of the other aq_ attributes, depending on what you 
want "self" to mean at the time).

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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] ThreadSafeCounter

2001-02-13 Thread Johan Carlsson

 Would anyone volunteer to write a mounting HOWTO?  This is a FAQ.

The ExternalMount product is kind of self instructing,
but a general Mounting HOWTO would be a good thing.

  FileStorage is what the standard Data.fs is, and it supports undo.

Just one thing, ExternalMount product uses FileStorage but it doesn't
seem to support undos (not for me anyway)?

Johan Carlsson


From the ExternalMount product
Create an external method that opens a storage and returns a ZODB.DB
object.  Enter the module and function name below, along with the path to
traverse within the database to reach the object to be mounted.

An example external method:

import ZODB
from ZODB.FileStorage import FileStorage

def createDB():
return ZODB.DB(FileStorage('/usr/local/zodbs/db1.fs'))
From the ExternalMount product

 
 
  Andy McKay wrote:
 
   A simpler solution is to use a mounted storage that doesn't do undo,
 and
   stores changes in place.
  
   You are the second person to answer with that. Would anyone care to give
 a
   quick how-to on how to mount a non-undoing storage, such as 
 
  FileStorage is what the standard Data.fs is, and it supports undo.
 
   since this doesnt seem immediately obvious to me.
 
  Take a look at ExternalMount, and at what's used in the
 CoreSessionTracking product.
 
  I can't find a URL for ExternalMount at the moment. I'm using it though,
 so it *definitely* exists!
 
 
  Also, see lib/python/ZODB/dbmStorage.py
 
  """Very Simple dbm-based ZODB storage
 
  This storage provides for use of dbm files as storages that
  don't support versions or Undo.  This may be useful when implementing
  objects like hit counters that don't need or want to participate
  in undo or versions.
  """
 
  --
  Steve Alexander
  Software Engineer
  Cat-Box limited
  http://www.cat-box.net
 
 
 
  ___
  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 )
 
hf–Xš)x7Š^!X+ƒšŠYšŸb~—zhr,š,+3zw(v)EZeŠl†ib3—j)fjŠb?Š^jyw†ib3—j)fjŠb?Š^


Re: [Zope-dev] Re: ThreadSafeCounter

2001-02-13 Thread Andy McKay

 A simpler solution is to use a mounted storage that doesn't do undo, and
stores changes in place.

You are the second person to answer with that. Would anyone care to give a
quick how-to on how to mount a non-undoing storage, such as FileStorage
since this doesnt seem immediately obvious to me.

--
  Andy McKay.

 --
 Steve Alexander
 Software Engineer
 Cat-Box limited
 http://www.cat-box.net


___
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] Re: ThreadSafeCounter

2001-02-13 Thread Shane Hathaway

Steve Alexander wrote:
 
 Shane's ExternalMount product is here:
 
http://www.zope.org/Members/hathawsh/ExternalMount
 
 However, I couldn't find it from searching on zope.org, and it isn't
 listed on Shane's zope.org page.

Oops, I forgot to get it cataloged.

Shane

___
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] Refresh DoubleTake :-S

2001-02-13 Thread Shane Hathaway

Chris Withers wrote:
 
 Shane Hathaway wrote:
 
  apparently not.  However, I have an idea that might solve it.  Thanks
  for the heads-up!
 
 Pleasure :-)
 
 (as a workaround we've developed the 'Pound on the Refresh button like a monkey'
 technique *grinz*)

I've added logic to sort the modules by dependency before performing the
refresh.  It should solve the simian problem.  Feedback encouraged!

http://www.zope.org/Members/hathawsh/Refresh/

Shane

___
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] Re: ThreadSafeCounter

2001-02-13 Thread Tres Seaver

 "Andy McKay" [EMAIL PROTECTED] wrote:
 
  | The ideal solution would be to use an object that lives in the ZODB,
  | I wonder if there is a way to keep the 'object history' empty?  That
  | is, keeping the counter 'packed' while retaining 'object history'
  | information on all other objects.
 
 That would work, however I just dont think that fits neatly into the ZODB in
 any way since all objects are appended.

Small confusion here:  "ZODB" is a higher-level abstraction than
"FileStorage";  it is quite feasible to have one or more storages
inside your Zope which are "packless" / "undo-less", and which
then have the space efficiencies you are looking for (often at a
non-trivial time cost).

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations "Zope Dealers"   http://www.zope.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 )



Re: [Zope-dev] Introducing ZopePrints.

2001-02-13 Thread Michel Pelletier



On 12 Feb 2001, Erik Enge wrote:

 The rationale behind this is that the community at large would benefit
 from this by having _real_life_ case studies so when their time has
 come to implement an application in Zope, they don't fall into the
 same traps and pitfalls we did.  Instead of benchmarks, the Zope
 community would use implementation documents to decide whether Zope is
 up for the job or not, that's what really helps.

We would love to see this description from you.  We inside DC have our own
problem solving development process that is large, complex, slow, but
often (IMO) accurate if done well.  It is based partly on the "Rational"
model developed by the Three Amigos:

http://www.everything2.com/index.pl?node=the%20three%20amigoslastnode_id=125995

partly on chaos theory, Jim's three laws of engineering (1. F=MA, 2. You
can't solve a problem unless you know the answer, 3. You can't push a
rope)  and on the abundance of Thai food.

We also have a "fishbowl" experiment community process, a "dogbowl"
content managment design process, a documentation process, and one
horse-choking travel policy.

I think it would be great to get examples of your problems in a case study
format, but also in a higher-level, pattern like description.  Your
description sounds like it is based on the problem and the goals, which is
really great.


 I'm quite sure that it will also work as a tool for finding gaps and
 holes in either Zope or its tools and Products.

Indeed.

 We would like to start a project going in the Fishbowl which aims at
 creating the right tools to document a project as described above.

The fishbowl is the perfect place to do this.  In a conversation with
other people including Brian who is the "keeper of the fishbowl" we
realized that documentation artifacts come out of the fishbowl almost as
much as the software.  In fact, that's one of the whole reasons for the
fishbowl, to come up with better software because we thought about it and
wrote down some words before we started hacking code.  Instant
documentation.

Good luck!

-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] Re: ThreadSafeCounter

2001-02-13 Thread Steve Alexander

Tres Seaver wrote:


 ...it is quite feasible to have one or more storages
 inside your Zope ... often at a non-trivial time cost.

Where does the time cost come in? I've noticed a delay on first mounting
another storage, but I haven't looked for a delay on accessing objects
in the storage.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net



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