News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Eichorn's Blog:
Webthumb API additions
October 02, 2006 @ 16:13:01

In light of the popularity of his WebThumb site thumbnailing service, Joshua Eichorn is implementing a new feature to help reduce the number of requests to the server. The most popular request is made to see if a thumbnail is ready, and the new feature - a GET callback to the server making the request - will help to reduce them.

If you wondered an API that requires polling isn't a very good thing for scalability. On my current setup I can pretty easily handle about 20 status requests per second on top of my normal traffic, the problem is its not hard for a bad polling implmentation being run by one user to make that many requests.

To solve this problem im adding an addition to the Webthumb API that will allow you to skip polling all together. The basic idea is that your make an API request and when your thumbnail is complete i'll make a GET request back too your server telling you that the request is complete.

It's a simple matter of including a new "notify" tag in the XML message to the server with a URL to make the callback to. He even includes some sample PHP code to get you started with the new feature. The script handles the automatic download of the thumbnails when called from the WebThumb service.

0 comments voice your opinion now!
webthumb api callback notify message sample webthumb api callback notify message sample


blog comments powered by Disqus

Similar Posts

Jakub Zalas' Blog: Mocking Symfony Container services in Behat scenarios with Mockery

Ben Ramsey\'s Blog: Create an Image from XML Data

Lorna Mitchell: Five Clues That Your API isn't RESTful

DevShed: Displaying Meaningful Error Messages when Auto Loading Classes in PHP 5

Lorna Mitchell's Blog: Github to Jira Bug Migration Script


Community Events





Don't see your event here?
Let us know!


threedevsandamaybe introduction code series configure list api framework laravel library release bugfix project community wordpress developer language podcast interview application

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework