[TYPO3-core] RFC: #7333: Solution for "Page is being generated"

Michael Stucki michael at typo3.org
Tue Feb 5 02:24:29 CET 2008


I thought for some while about such an API. Actually there are quite some
lock mechanisms available, but I can't think of any more than these three:

- semaphore (Unix only)
- flock (Unix + Windows, not working on network shares)
- simple lock as a fallback for the above two

Therefore I decided to drop the idea of using an API and created t3lib_lock
instead, which provides the above three mechs only.

So far I have only tested the simple locking, however, depending on your
system, the others should work just fine as well!

The simple locking is just like the name says: simple. It actually loops for
a few times to check if the lock file is still existing or not.

The patch is pretty experimental but chances would be good to stabilize this
until 4.2, however it's your turn to test and decide..

Comments:

1. Many parts of the patch have been derived from Bernhards version

2. When trying out the "simple" method, make sure to create
typo3temp/pagegen_locks/ or visit the install tool to create it
automatically...

3. There is still room for improvement and code beautification after the
feature freeze... :-)

- michael

Ernesto Baschny [cron IT] wrote:

> Martin Kutschker wrote: on 02.02.2008 02:08:
>> Michael Stucki schrieb:
>>>
>>> As I consider mod_fcgid/apache2-mpm-worker as a great improvement and
>>> therefore think that we should not at all rely on the flock()
>>> functionality. I'm going to try to use mutex-locks and see if this works
>>> better...
>> 
>> Apache offers quite a number of locking mechs. Seems the dev want to put
>> the burden of choosing the best (or best fitting) to the user. Maybe we
>> should do the same. Add a locking API and make the mech configurable.
> 
> I agree: we should have a core API for "locking resources" (e.g. page
> caching). We can start shipping with one implementation (e.g. flock),
> but have more options in future. Or course the API should be so cool
> that even extensions might make use of them. :)
> 
> And then Bernhard can build his lockPageGenerate() method upon that.
> Bernhard, it would be cool if you could document your lockPageGenerate a
> bit "better" so that it might be easier to review that.
> 
> Cheers,
> Ernesto

-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lockPageGeneration.diff
Type: text/x-diff
Size: 15085 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080205/c923bd00/attachment.diff 


More information about the TYPO3-team-core mailing list