Mastering

Javascript flow control

Johnny Ray Austin

NationJS Nov 8th, 2014

jray.io

@recursivefunk

About Me

@recursivefunk

Async

  • auto
  • queue

[ code ] sloppy.js

@recursivefunk

Async

auto

  • Named tasks
  • Dependency management
  • Result aggregation

[ code ] asyncAutoExample.js

@recursivefunk

Async

queue

  • Queue structure
  • FIFO
    • Priority exists
  • *Concurrency

[ code ] asyncQueueExample.js

@recursivefunk

streams

streams continued

  • Readable/Writable/Transform
  • Pipe
    • This is key
  • Move large amounts of data

[ code ] streamsExample.js

@recursivefunk

Events

don't call us, we'llcall you

@recursivefunk

  • Consistent¬†API / Custom Events
    • .on( 'datData' ), .emit( 'datData' )
    • Event emitter, socket.io
  • Reactive

redis

[ code ] remitter

github.com/jrayaustin/remitter

Zeesh

zeromq + streams

@recursivefunk

jray.io/mastering-javascript-flow-control

github.com/jray/nationjs2014

Slides

Code

Mastering JavaScript Flow Control

By Johnny Ray Austin

Mastering JavaScript Flow Control

  • 849
Loading comments...

More from Johnny Ray Austin