Google Groups to Google App Engine: you seem a little shifty to me!

It seems that Google Groups has some seriously strict spam filters in place as they're currently blocking urlfetch requests for RSS feeds from Google App Engine applications.

This morning, I started what I hoped would be a quick Flash widget to display the latest RSS headlines from our new Singularity Local Conference Hubs Google Group on the new local conference hubs page on the Singularity web site.

Since Google Groups does not support consumption of its feeds by Flash and Flex applications (they don't have a crossdomain policy file on their servers), I set up simple server-side proxy and wrote some quick E4X in Flash to parse the Atom feed.

Hit publish, test locally, everything works! Ah, cool, let's deploy and move on.

Not so fast, young man! Have you met Murphy? He sells ceiling fans for lavatories.

I deployed and got an error. Weird.

So I checked the proxy URL directly in the browser and saw the following message:

Google Groups to Google App Engine - you smell spammy

OK, so Google Groups has some paranoid spam filter that's blocking Google App Engine urlfetch requests (quite understandable as Google Groups must have to deal with every type of spam known to humans.)

I opened an issue and posted on both the Google App Engine and Google Groups Help forums so the issue should hopefully be on their radar. Not being one to give up, however, I decided to try another route.

Yahoo! Pipes to the rescue

I need a proxy but I can't use my own app on Google App Engine... wait a minute, Yahoo! Pipes should fit the bill :)

So I set up a very simple pipe that does nothing more than grab the RSS 2.0 feed from Google Groups and re-publish it. Since Yahoo! does have a cross domain policy on Pipes, we can load the RSS feed in directly from Flash.

That's exactly what I did and, instead of parsing the XML by hand, I decided to use the generic FeedFactory parser in as3syndicationlib. So I downloaded that and its dependency, corelib, and refactored my code.

Unfortunately, as3syndicationlib is Flex-only at the moment. It has two simple bugs that have been fixed but have not been included into the library, barring entry to Flash CS3 developers.

The first bug is in ParsingTools.as and produces the following error: ReferenceError: Error #1065: Variable mx.utils::StringUtil is not defined..

The other error is that it uses the Flex-only DateBase class.

Thankfully, Steve Jones ran across the same errors earlier, fixed them, and shared his solution on Mike's blog.

I do hope that Mike finds the time to commit Steve's version into the repository at some point so that Flash CS3 developers can also make use of the excellent AS3 Syndication Library without jumping through these hurdles.

The final hurdle was that Yahoo!'s crossdomain policy is on pipes.yahooapis.com not pipes.yahoo.com. By default, when you copy the RSS feed URL from Yahoo! Pipes, you will get a feed URL that references pipes.yahoo.com. You have to change this to use pipes.yahooapis.com to take advantage of the crossdomain policy file.

Check out the new local conference hubs page to see the simple widget in action.

Photo: Flickr