Software Architecture over ZeroMQ
- 2. A complex
story is best
told as a
series of
vacuous 1-
liners
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 4. We basically
don't know
how to
make code
that can
survive ten,
let alone 50
years
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 6. Future code
has to talk
to code, has
to be chatty,
sociable,
well-
connected
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 9. How we
connect to
each other
matters
more than
who we are
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 15. When you
know the
real problem
you have
done half
the work
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 16. Do nothing
that is not a
minimal,
plausible
answer to a
well-defined
problem
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 27. An unprotocol
takes minutes
to explain,
hours to
design, days to
write, weeks to
prove, months
to mature, and
years to
replace
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 28. Use human nom-protocol =
open-peering
language *use-peering
in your open-peering =
unprotocols. C:OHAI
( S:OHAI-OK / S:WTF )
use-peering =
ORLY? C:ICANHAZ
YARLY! / S:CHEEZBURGER
/ C:HUGZ S:HUGZ-OK
/ S:HUGZ C:HUGZ-OK
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 29. Use GPLv3
for your
open specs.
Remixability
is freedom
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 30. If you're
willing to
give up
flexibility for
speed you
deserve
neither
flexibility nor
speed
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 31. Use cheap
text for the
low-volume
chatty
control
commands
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 40. No matter C: fetch
how hard S: chunk 1
you push, a S: chunk 2
file will not S: chunk 3
just go down
a socket
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 41. That C: fetch chunk 1
annoying S: send chunk 1
pause after C: fetch chunk 2
S: send chunk 2
you finish
C: fetch chunk 3
your beer, S: send chunk 3
before you C: fetch chunk 4
catch the
waiter's eye
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 42. You can, C: fetch chunk 1
and I've C: fetch chunk 2
tested this, C: fetch chunk 3
S: send chunk 1
order a new
C: fetch chunk 4
beer before S: send chunk 2
your old one S: send chunk 3
is empty
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 43. Request- C: subscribe
reply is just C: send credit
a vulgar S: send chunk
S: send chunk
subclass of
C: send credit
publish- S: send chunk
subscribe
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 44. On a router
socket, you
should
never hit the
high-water
mark
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 46. Protocol command_t
stack *request =
= command_decode
(socket)
message
codec execute_engine
+ (command)
protocol
engine
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 49. You don't
want to bet
against a
compiler
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 50. If you're not
thinking of
security,
security is
probably
thinking of
you
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 53. secure-nom = open-peering
SASL over *use-peering
ØMQ is open-peering =
C:OHAI
darned *( S:ORLY C:YARLY )
simple ( S:OHAI-OK / S:WTF )
ORLY = 1*mechanism
challenge
mechanism = string
challenge = *OCTET
YARLY = mechanism
response
response = *OCTET
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 55. FileMQ is a
file sharing
protocol and
stack over
ØMQ.
Reusable
until 2062
Photos by Pieter Hintjens
cc-by-sa © 2012 Pieter Hintjens
- 56. 1. Aim for 50 years
To sum it up: 2. It's all about people
3. Minimal plausible solutions
zero.mq/ch6 4. To real immediate problems
5. Document the contracts
6. Cheap and Nasty codecs
The Weird 7. Code generation rocks
Fish Book, 8. Router sockets rock
coming soon 9. CBFC > HWM
from O'Reilly 10. Learn state machines
11. Learn about SASL
Photos by Pieter Hintjens
12. Worked example: FileMQ
cc-by-sa © 2012 Pieter Hintjens