News Feed
Sections




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

Lorna Mitchell's Blog:
Add a heartbeat method to your service
October 29, 2009 @ 08:41:53

Lorna Mitchell has a last minute suggestion of something to add to your web service that can really help out when developers using the API need it - a heartbeat.

The heartbeat shouldn't require any particular parameters or any authentication, since formatting data and passing credentials can be a stumbling block for those integrating with a service for the first time or those debugging issues. The heartbeat method can return some known data, perhaps an "I'm here" message, and maybe some version information.

She points out Flickr's flickr.test.echo call that does nothing but return whatever was sent to it. This kind of method can be very useful for applications that might need constant contact with the API or, inversely, need to know when the API isn't there and switch to an offline mode. A consistent heartbeat makes it easy to check these sort of things and to be sure that you get consistent feedback from your requests.

0 comments voice your opinion now!
heartbeat method webservice


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Web Services Implementation using PHP and SOAP

Brandon Savage: Private Methods Considered Harmful ("Do This, Not That" Excerpt)

Rich Zygler's Blog: People work with WS-* web services in PHP? Why?

Raphael Stolt's Blog: Teaching the Zend REST server to talk JSON

Reddit.com: Year Old Bug Request for $_PUT Interested in /r/php's Opinion


Community Events





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


release developer language list code framework opinion symfony2 series api unittest threedevsandamaybe laravel introduction podcast interview install refactor community testing

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