Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@calid
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calid/798fd4250cb5e8ac100c to your computer and use it in GitHub Desktop.
Save calid/798fd4250cb5e8ac100c to your computer and use it in GitHub Desktop.
zguide Node Coordination (syncpub/syncsub) Issues
$ for i in {{1..10}}; do ./run syncsub & done
[1] 2719
[2] 2720
[3] 2721
[4] 2722
[5] 2723
syncsub with jeromq
[6] 2725
syncsub with jeromq
syncsub with jeromq
[7] 2727
[8] 2729
syncsub with jeromq
syncsub with jeromq
[9] 2731
syncsub with jeromq
[10] 2735
syncsub with jeromq
syncsub with jeromq
syncsub with jeromq
syncsub with jeromq
$ Received 1000000 updates.
Received 1000000 updates.
Received 1000000 updates.
Received 998481 updates.
Received 1000000 updates.
Received 998536 updates.
Received 998536 updates.
Received 1000000 updates.
Received 1000000 updates.
[1] Done ./run syncsub
[3] Done ./run syncsub
[4] Done ./run syncsub
[5] Done ./run syncsub
[6] Done ./run syncsub
[7] Done ./run syncsub
[8] Done ./run syncsub
[9]- Done ./run syncsub
[10]+ Done ./run syncsub
$ jobs
[2]+ Running ./run syncsub &
$ kill $(jobs -p)
[2]+ Terminated ./run syncsub
$ for i in {{1..10}}; do perl syncsub.pl & done
[1] 4222
[2] 4223
[3] 4224
[4] 4225
[5] 4226
[6] 4227
[7] 4228
[8] 4229
[9] 4230
[10] 4231
$ Received 653552 updates
Received 664552 updates
Received 622052 updates
[2] Done perl syncsub.pl
[3] Done perl syncsub.pl
[10]+ Done perl syncsub.pl
$ jobs
[1] Running perl syncsub.pl &
[4] Running perl syncsub.pl &
[5] Running perl syncsub.pl &
[6] Running perl syncsub.pl &
[7] Running perl syncsub.pl &
[8]- Running perl syncsub.pl &
[9]+ Running perl syncsub.pl &
$ kill $(jobs -p)
[1] Terminated perl syncsub.pl
[4] Terminated perl syncsub.pl
[5] Terminated perl syncsub.pl
[6] Terminated perl syncsub.pl
[7] Terminated perl syncsub.pl
[8]- Terminated perl syncsub.pl
[9]+ Terminated perl syncsub.pl
$ for i in {{1..10}}; do python syncsub.py & done
[1] 3851
[2] 3852
[3] 3853
[4] 3854
[5] 3855
[6] 3856
[7] 3857
[8] 3858
[9] 3859
[10] 3860
$ Received 1000000 updates
Received 1000000 updates
Received 1000000 updates
Received 2000000 updates. <=== 2M messages received?!
Received 1000000 updates
Received 1000000 updates
Received 1000000 updates
Received 1000000 updates
Received 1000000 updates
Received 1000000 updates
Received 1000000 updates
[1] Done python syncsub.py
[2] Done python syncsub.py
[3] Done python syncsub.py
[4] Done python syncsub.py
[5] Done python syncsub.py
[6] Done python syncsub.py
[7] Done python syncsub.py
[8] Done python syncsub.py
[9]- Done python syncsub.py
[10]+ Done python syncsub.py
$ for i in {{1..10}}; do ruby syncsub.rb & done
[1] 31928
[2] 31929
[3] 31930
[4] 31931
[5] 31933
[6] 31936
[7] 31937
[8] 31939
[9] 31941
[10] 31943
$ Received 982821 updates
Received 990345 updates
Received 986345 updates
Received 987845 updates
Received 960321 updates
Received 988845 updates
Received 983821 updates
Received 978821 updates
[1] Done ruby syncsub.rb
[2] Done ruby syncsub.rb
[4] Done ruby syncsub.rb
[5] Done ruby syncsub.rb
[6] Done ruby syncsub.rb
[7] Done ruby syncsub.rb
[8] Done ruby syncsub.rb
[9]- Done ruby syncsub.rb
$ jobs
[3]- Running ruby syncsub.rb &
[10]+ Running ruby syncsub.rb &
$ kill $(jobs -p)
[3]- Terminated ruby syncsub.rb
[10]+ Terminated ruby syncsub.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment