Re: Updating 'constant' datastructures in MP2

2003-11-27 Thread Elizabeth Mattijsen
At 18:01 -0500 11/26/03, Perrin Harkins wrote: ...This has the advantage of being easy, but the disadvantage that the data is no longer shared. I don't think you can reall solve that without HUP-ing the server, but if you find a way I'll be eager to hear about it. Will report back, probably in the

Re: Updating 'constant' datastructures in MP2

2003-11-26 Thread Perrin Harkins
> hup it as in graceful restart? But I don't need it to re-read all of > my Perl modules, plus their inherent initializations... I just need > e.g. a hash updated... I agree with Stas -- it would be easier to use something like a dbm. MLDB::Sync works well for this stuff. When I've had to do th

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Stas Bekman
I think Apache::DB_File is just what you are after. Is that on CPAN? I can't find it. I _can_ find Apache::Session::DB_File and Apache::Session::Store::DB_File, is that what you mean? Sorry, I messed up the names and owners. I meant Tie::DB_Lock by Ken Williams, David's DB_File::Lock is som

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Elizabeth Mattijsen
At 14:02 -0800 11/26/03, Stas Bekman wrote: Elizabeth Mattijsen wrote: my $updating; $SIG{123} = sub { return if $updating++; # make sure only one at a time #update data structures; $updating = 0; }; That's what you told me back in July, which I liked. Though I haven't seen it at work

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Stas Bekman
Elizabeth Mattijsen wrote: If you are talking about serving HTTP, you probably want PerlInitHandler. Similar to Apache::Reload. But PerlInitHandler runs in the child, does it not? They all run in the child. The only hooks run by the parent process that spawns the child processes is PostConfig an

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Elizabeth Mattijsen
At 13:41 -0800 11/26/03, Stas Bekman wrote: If I remember correctly, you mentioned this to me back at YAPC::Paris in July. But back then you said you are going to gracefully restart the child processes, after updating the parent's data so that the newly spawned processes will see the updated in

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Stas Bekman
Elizabeth Mattijsen wrote: At 11:13 -0800 11/26/03, Stas Bekman wrote: Elizabeth Mattijsen wrote: I was wondering whether the following trick could somehow work with mod_perl 2. And excuse my preference for prefork MPM's: I guess that's the hammer to work on all my nails (pun intended). I'm o

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Elizabeth Mattijsen
At 11:13 -0800 11/26/03, Stas Bekman wrote: Elizabeth Mattijsen wrote: I was wondering whether the following trick could somehow work with mod_perl 2. And excuse my preference for prefork MPM's: I guess that's the hammer to work on all my nails (pun intended). I'm open to other solutions to th

Re: Updating "constant" datastructures in MP2

2003-11-26 Thread Stas Bekman
Elizabeth Mattijsen wrote: I was wondering whether the following trick could somehow work with mod_perl 2. And excuse my preference for prefork MPM's: I guess that's the hammer to work on all my nails (pun intended). I'm open to other solutions to this "problem"! Liz, when you are talking abou

Updating "constant" datastructures in MP2

2003-11-26 Thread Elizabeth Mattijsen
I was wondering whether the following trick could somehow work with mod_perl 2. And excuse my preference for prefork MPM's: I guess that's the hammer to work on all my nails (pun intended). I'm open to other solutions to this "problem"! The problem: - When you're using prefork