ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Announce Your Software/Service/Product

Forum Random Quotes Generator - salting your forum signature with wits

<< < (3/3)

allen:
In the case of imagiine, it's considerably more pressing it be cached, I admit--imagiine has a pretty big rendering engine, does more than just spit out quotes--and it uses externally hosted quote files exclusively, so all uses of it are on the same machine -- ultimately making it a much more demanding task--some things it renders are mechanically fairly complex...



That being said, I still advocate caching--particularly for dynamic images intended for forum/signature use.  I originally shared your view, but I believe it was JG (or maybe mouser, or both) who changed my line of thinking... The big question is, are you considering scale?  If there are 10 readers viewing the post, that image has just been drawn from scratch 10 times, maybe all in the same second.  If you've posted more than one post in that thread, 10 becomes 20, 30, 40, etc.  So now, in a single moment, you have one server reading the quotes file into memory, then the rendering server retrieving the quote after downloading it from a remote server, rendering it into the image, then the image being downloaded by the client.  On the other hand, a simple mechanism to quickly check the age of the image is considerably less work for the server.  If the cached images were hosted in the location of the main script, you'd eliminate having to contact the server that hosts the quote file altogether in cases when the cached image was fresh. The entire opration would consist exclusively of checking the age of the recent cache and serving the image.  If the file was old, it would have to be re-rendered--but instead of going through the whole process of reading the quotes file, fetching it, rendering the image from scratch once for every single viewer for every instance of the image on a page... It would be done once. Just once. :)

While on the per-view scale the difference between caching and not caching is fairly negligible, the value increases with the view rate -- a DC forum post getting slash-dotted or significantly dug would make the difference between a cached random quote image and an on-demand rendered quote image nothing short of exponential.

A novel advantage to caching is everybody sees the same random quote--if someone likes a quote and exclaims as much, a shared view would make sense of that exclamation :)

Cached or not, though--great little script.  I find the way you handled remote quote files particularly fascinating.  While it's a bit more complicated for the end user to set up, it certainly decreases the amount of data that has to be exchanged between the renderer and the remotely hosted quote file.

One warning/bit of advice from my own experience--is some forum software tries to detect and filter out php scripts being used as images.  The easiest way to get around that is with mod-rewrite.  Sneaking the remote quote page into the URL, but making it ultimately look like a png, jpeg, whatever.

mouser:
A novel advantage to caching is everybody sees the same random quote--if someone likes a quote and exclaims as much, a shared view would make sense of that exclamation
--- End quote ---

I agree with this very much..  Although it may at first seem counterintuitive, i think the cacheing effect is actually quite nice, in that the same quote will be used for all viewers for some period of time (say 1 hour).  i find this more pleasing mentally than everyone seeing a new quote every time.  it makes it more enjoyable to space them out, and as allen says, it makes it nicer that everyone is seeing the same quote at the same time.

I find the way you handled remote quote files particularly fascinating.  While it's a bit more complicated for the end user to set up, it certainly decreases the amount of data that has to be exchanged between the renderer and the remotely hosted quote file.
--- End quote ---

agreed -- wordzilla is a clever little dinosaur!

mouser:
ps it would be nice to find a handwriting font for the quotes.

nudone:
ps it would be nice to find a handwriting font for the quotes.
-mouser (May 15, 2007, 11:14 AM)
--- End quote ---

i think the font used at the moment looks about right as the quotes are coming from irc chat sessions.

i agree that handwriting would be good for none irc text quotes.

Navigation

[0] Message Index

[*] Previous page

Go to full version