solution to process vast amounts of messages in a distributed fashion, while providing operations with the tools to maintain such a system.” Monday, 19 March 12
= feeds.count() # size of each slice size = ceil(total / iterations) # the distance (in time) between each slice # when using 80% of the time window available. distance = ceil((window / iterations) * buffer) for page in xrange(iterations): qs = Feeds(start=page * size, stop=min((page + 1) * size, total)) refresh_slice.apply_async((qs, countdown=distance * page)) Chunking Monday, 19 March 12
headers and a body the header is a taskset (group) body is applied with the results of the headers Pseudocode: def chord(headers, body): body([h() for h in headers]) Monday, 19 March 12
subtask, task @task def reduce(results, reducer): reducer = subtask(reducer) d = defaultdict(list) for items in results: for key, value in items: d[key].append(value) return group(reducer.clone((key, values)) for key, values in d.iteritems()) \ .apply_async() MapReduce Monday, 19 March 12
response.ok: return [(word, 1) for word in words(response.content.split()) if word.isalpha()] response.raise_for_status() def words(it, punctuation=’(),./:;?’): return (w.replace(“-”, “”).strip(punctuation).lower() for w in it) Counting words Monday, 19 March 12
with a central stem bearing a single terminal flower that develops first, the other flowers in the cluster developing as terminal buds of lateral stems. Monday, 19 March 12
node manages the Celery instances on that machine. Cyme is a distributed service where each node manages the Celery instances on that machine. Cyme is a distributed service where each node manages the Celery instances on that machine. Cyme is a distributed service where each node manages the Celery instances on that machine. Cyme is a distributed service where each node manages the Celery instances on that machine. Cyme is a distributed service where each node manages the Celery instances on that machine. Monday, 19 March 12
first instance In the branch logs we it see it start: Support files created in cyme dir: $ ls -l instances/48918f6c...356df54161cb/ rw-r--r-- worker.log rw-r--r-- worker.pid rw-r--r-- worker.statedb Monday, 19 March 12
on demand, but never more than this. >>> instance.autoscale(min=4, max=10) {u'max': 10, u'min': 4} >>> instance.stats()[“pool”][“processes”] [7701, 7754, 7755, 7756] Autoscale PUT http://localhost:8000/pycon/instances/2d56…/autoscale?min=max= Monday, 19 March 12