[TYPO3-dev] Fail-safe mechanism for database connectivityproblem

John Angel johnange at gmail.com
Mon Oct 9 13:56:08 CEST 2006


>> How about generating real directory hierarchy with real names?
>
> I don't like this idea (when used for caching purposes) as those names
> might clash with other existing filenames.

Yes, that could be a problem.


> But they don't have cashing in mind. They are for making static copies
> (for
> eg a CD) of the page.

I know, but that is pretty close to our story.


>> Or we can do "simulate static" + "real static":
>> 1/ Apache does rewrite thing
>> 2/ Typo3 tries to fetch dynamic page from database
>> 3/ Database is down; Typo3 fetches real HTML page from hard disc using
>> file
>> name in http request.
>
> 2 and 3 is what I would do. What rewriting shall occur in 1?

Nothing new, but the existing one which 'simulate static' feature uses:
http://theunalteredtruth.com/index.php?id=225

Actually we have to implement (3) only. Instead of displaying error page, we
should fetch the page from cachePagesToExternalFiles's cache.

To be able to do this we need to:
1/ Fill cache with all pages (should be done as cron job for the complete
site, all over and over again)
2/ Implement the logic: When database is down - fetch the page from
cachePagesToExternalFiles's cache, parsing the URL from HTTP request (can be
done with both 'simulate static' and normal implementation).

Beside resolving 'database down' problem, this way we are extremely speeding
up complete CMS, since cachePagesToExternalFiles cache always exists for all
pages.

Of course, if using Real URL, parsing HTTP request is the problem when
database is down, since we cannot access Real URL's shortcuts. How will
'logic' know what to fetch? Is that Berkley DB idea complicated?

That is why I've mentioned 'Export to HTML pages' extensions. If we make
real directory tree, than the 'logic' doesn't have to parse request or think
at all - the real HTML pages exist, and we just have to redirect Apache to 
them.





More information about the TYPO3-dev mailing list