8. Understanding
Jobs
1.Created by cloud.call, Cron or
REST API calls
2.Functions are serialized via
custom pickle module call
cloudpickle (open sourced)
3.Modules are transmitted when
necessary
9. Data Flow of
Jobs
1.Programming model is
functionally based
2.Data is transmitted via
arguments and return values
3.Data cannot be accessed
between jobs
4.Jobs can spawn other jobs
12. Creating a Child Proc
>>> def spawnnew(x, y):
s=x+y
z = 15
child_id = cloud.call(spawnedkid, s, z)
cloud.join(child_id)
r = cloud.result(child_id)
return s + r
>>> def spawnedkid(a, b):
return a + b
>>> x=9
>>> y=8
>>> jid = cloud.call(spawnnew, x, y)
>>> cloud.result(487)
49
13. Crons
•Runs a registered function at scheduled times.
•Utilizes the BSD-style cron timestamp found in *nix
•Cron jobs are created utilizing cloud.cron.register