This talk looks at the science of building web services, thinking about APIs from their most basic primitives, and the lessons learned at Twilio and Runscope for supporting APIs at massive scale. (Presented at Silicon Valley Code Camp 2013)
queue_item(item): r.lpush(“work_queue”, item) def get_item(): return r.rpop(“work_queue”) class Worker(Greenlet): def _run(): while True: item = get_item() if item: # do work else: sleep(1)