Thursday, January 21, 2010

PHP MogileFS Client from Erik Osterman modified

I am struggling with a high latency network, and in many cases the tracker simply doesn't respond in time, and the client throws a fatal error. So I did some modifications on the client from http://osterman.com/wordpress/2007/06/30/robust-php-mogilefs-client

Changelog:
* setFile now tries upload 10 times before failing - example; tracker dies during upload
* setResource with key == null now close file handle before throwing exception
* added pathcount and noverify options to getPaths (copied from perl client 1.08)
* unknown key, and empty file now produce a warning, and not fatal error in doRequest
* 0byte check now before upload, and not relying on tracker

My plan was to make it slightly more tolerant for errors from tracker.

Download it here: PHP MogileFS Client

No comments:

Post a Comment