I've enabled Gravatar support on a few of my applications, and while the idea of the service is great, the actual performance is pretty bad. Very bad actually. (I have it turned off here.) There are a few caching services out there, but I don't think one exists for ColdFusion. I've been sick all weekend, but instead of just sitting around feeling miserable I thought I'd code up a quick application. With that I'm happy to announce the initial release of the Gravatar Cache Service for ColdFusion.
The service is set up so that you can put it on a box and have multiple applications use it. It is XML driven so that you can define different settings for each application, or simply use a default profile for the entire box.
In my testing the service worked very well, after the cached files were created. On an application with a "regular" audience, the caching would really improve the performance.
You can download the application now at it's RIAForge home. I've marked it as version 0 as I think it may need some testing before I consider it officially One Point Oh. No docs exist yet but the basic idea is to change any Gravatar URL to a URL that points to the index.cfm file. You pass the hashed email address but nothing else as settings are stored in the XML file. Feedback is appreciated.
Archived Comments
very cool kind sir.
I signed up for a Gravatar a couple of months ago, and have yet to get a reply email. I wish some other company would replace them as the popular one, because I think the idea is great, but their service is terrible.
Ray Camden, you are the hardest working man in Cold Fusion development. But I get why you would code while you were sick. It takes your mind off feeling miserable. Get well soon.
Hey Ray, You know you are the man, right?!
I do have a quick bug/typo fix for ya:
<cfcontent type="images/png"
should be:
<cfcontent type="image/png"
Also, I was sick as well this weekend and I've opted for the couch-tv-soup recovery strategy... I must say I like yours better, I'll do that next time.
Mingo.
Dang it. That will take forever to fix! ;)
Fixed. I don't have SVN turned on or a readme, but the fix is in.
Must have been something in the water...I was sick this weekend, too (still am, actually).
Thanks, Ray. I agree Gravatar is great, but slow!!! Hopefully this will help.
Ray--will you be implementing this into the next release of BlogCFC?
I'm not sure. Right now I'm building it as a separate service. Sure - I could roll it in - but I'd also want an easy way for folks to NOT use it if they want to make the service box wide and use it for other things like Galleon.
Ray, any changes in your thoughts on using Gravatar now that we are a few years past the original blog post? Has speed improved?
I use Gravatar here. Seem slow to you? Not doing any caching at all. (Well, of Gravatar - I use other caching elsewhere...)
Hi Ray,
Load times look good to me. I peeked at tools.pingdom.com for this page. 52 requests, 376.6Kb and loaded in Firefox 10 in 749ms. Gravatar calls were around 30 ms, one with 143ms wait time.
Have you thought about implementing the Gravatar hovercard feature? I saw some code in jQuery at their site for Wordpress implementations. Perhaps you could craft a nice CF version?
Cool, I didn't even know that was an option. Although they don't share the code for the hovercard, not that I see.
Check out this page http://en.gravatar.com/site... for hovercard implementation. Sparse. Scroll to header "Data Formats." I see PHP and JSON there. I haven't dabbled in those. Maybe you can create a component based on code there for the ColdFusion community.
Perhaps submitting such code to support@gravatar.com and they could add it to the page for implementation of hovercards for CF?