Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry if I am misunderstanding, but why not use Gearman (http://gearman.org/). We wrote a nice blog post on how we use Gearman for tracking API requests to Mixpanel http://blog.nodesocket.com/how-we-tracking-api-requests-with...).

Or, use React (http://reactphp.org/) a PHP async library.



Gearman is pretty solid once you have it working, but it can be a huge pain to get to that point. We spent probably two years (on-and-off, of course) tweaking code to get our framework talking nicely to gearman. PHP's gearman-manager library is a little... wonky, and we were seeing no shortage of bizarre APC interference.

Although in this case, I imagine the real problem is portability. Curl is available pretty much everywhere. exec (or more directly, pcntl/posix extensions) aren't in any out-of-the-box installation, and anything that needs to be further daemonized to get up and running (such as gearmand and gearman-manager) are even harder to use in a one-click solution.


First off, great article! If you can get away with it, using Gearman is definitely a more robust solution. We'll try and see if we can write adapters for dedicated job queues like it in the future.

We're mainly trying to make the setup process really simple - no need to start up extra job servers or worker computers. Ideally they can add in our small bits of code and then start tracking analytics data without much configuration.


Thanks. Gearman works out lovely for background tasks like emails, tracking, anything you want to fire and forget. Makes sense though that you can't have the dependency of Gearman for your public library.

Are you guys in San Francisco?


Yeah, we are! (calvin|friends)@segment.io if you want to get in touch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: