×
Copy
Open
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Process Kit Python processes made obvious
Slide 2
Slide 2 text
Hi! Halo! Ola! I’m @oleiade I’m a software hater And I work at @botify
Slide 3
Slide 3 text
I like obviousness
Slide 4
Slide 4 text
And I like to fix things
Slide 5
Slide 5 text
On a typical day trying to fix things
Slide 6
Slide 6 text
#Unix is a masterpiece (Even though it chooses it’s friends…)
Slide 7
Slide 7 text
#Python is awesome (As long as you know what to expect from it…)
Slide 8
Slide 8 text
However…
Slide 9
Slide 9 text
we found python processes interface was neither awesome nor obvious
Slide 10
Slide 10 text
So we started digging into it. And gradually recoded it.
Slide 11
Slide 11 text
“Those who do not understand UNIX are condemned to reinvent it, poorly.” Henry Spencer
Slide 12
Slide 12 text
what’s the output of this?
Slide 13
Slide 13 text
It will, sometimes, raise an AssertionError
Slide 14
Slide 14 text
#Unix signals are asynchronous (don’t you forget…)
Slide 15
Slide 15 text
However…
Slide 16
Slide 16 text
terminate sends SIGTERM to the process
Slide 17
Slide 17 text
Therefore…
Slide 18
Slide 18 text
you have NO insurance when the process is actually stopped
Slide 19
Slide 19 text
Schrodinger’s cat is watching you
Slide 20
Slide 20 text
Explicit is better than implicit
Slide 21
Slide 21 text
Pkit processes are patient
Slide 22
Slide 22 text
Blocks until process really stopped
Slide 23
Slide 23 text
Pkit processes are really patient
Slide 24
Slide 24 text
Blocks until process signals handlers are overriden
Slide 25
Slide 25 text
Pkit processes are cleaned
Slide 26
Slide 26 text
Once a process is stopped, it’s execution context is collected
Slide 27
Slide 27 text
Pkit processes are reusable
Slide 28
Slide 28 text
Processes are reusable shells. Execute all the things into it.
Slide 29
Slide 29 text
They are restartable
Slide 30
Slide 30 text
Rexecute a task. Again, and again, and… Right, you’ve got it.
Slide 31
Slide 31 text
Pkit processes code is plain
Slide 32
Slide 32 text
No dust hidden under the carpet. Most of the things are public. Most of the things are easily overridable.
Slide 33
Slide 33 text
Pkit processes expose callbacks
Slide 34
Slide 34 text
You can set a callbacks to be ran at process startup or exit
Slide 35
Slide 35 text
This is the end
Slide 36
Slide 36 text
Process-kit is still work in progress
Slide 37
Slide 37 text
It is evolving fast
Slide 38
Slide 38 text
It was built with good intentions
Slide 39
Slide 39 text
Go ahead, Fork it, Break it, Make it awesome github.com/botify-labs/process-kit
Slide 40
Slide 40 text
Questions?