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

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Feb 4 23:01:34 CET 2008


Ernesto Baschny [cron IT] schrieb:

> 
> Maybe we could just take a look on how others resolved the issue. 
> Gallery2 is always a good candidate for consideration, because they 
> "have been there" with most issues we usually have in TYPO3. Their 
> locking API is pretty simple but nice.
> 
> Take a look at here:
> 
> http://gallery.svn.sourceforge.net/viewvc/gallery/trunk/gallery2/modules/core/classes/ 
> 
> 
> * GalleryLockSystem.class  = interface and "super-class" which all 
> locking sub-classes must implement
> 
> With the core they ship with:
> 
> * FlockLockSystem.class = our good old "flock()"
> 
> * DatabaseLockSystem.class = as they say in the header: "Database 
> backend locking.  This is less efficient than filesystem based locking, 
> but is more reliable and portable"

Certainly an inspiration. *

Instead of an abstract class we could define an interface. But for 
convenience we could of course write an abstract base class that 
implements the interface.

Anyway, for TYPO3 we should think about how an extension could add a 
mech, and how an admin is supposed to choose between the options.

Currently we have only services as a general solution, but they have one 
big disadvantage. The admin can only install services, but he cannot 
choose which one will be used. This is done completely automatically.

Probably we end up - as always :-) - with t3lib_div::aquireLock($name) 
and t3lib_div::releaseLock($lock). Inside we have a hook style switch 
that chooses the configured implementation.

Masi

* Definitely more code than very simple mutex code snippets.


More information about the TYPO3-team-core mailing list