Nikola Smolenski <[email protected]> writes:

> Wu Zhe wrote:
>> Asynchronous daemon doesn't make much sense if page purge occurs on
>> server side, but what if we put off page purge to the browser? It works
>> like this:
>> 
>> 1. mw parser send request to daemon
>> 2. daemon finds the work non-trivial, reply *immediately* with a best
>>    fit or just a place holder
>> 3. browser renders the page, finds it's not final, so sends a request to
>>    daemon directly using AJAX
>> 4. daemon reply to the browser when thumbnail is ready
>> 5. browser replace temporary best fit / place holder with new thumb
>>    using Javascript
>> 
>> The daemon now have to deal with two kinds of clients: mw servers and
>> browsers.
>
> To me this looks way too overcomplicated. I suggest a simpler approach:
>
> 1. mw copies a placeholder image to the appropriate filename: the 
> placeholder could be the original image, best match thumb or a PNG with 
> text "wait until the thumbnail renders";
> 2. mw send request to daemon;
> 3. daemon copies resized image over the placeholder.

This simpler approach differs in that it gets rid of the AJAX thing, now
users have to manually refresh the page. Whether the AJAX is worth the
effort is discussable.


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to