Skip to content

Instantly share code, notes, and snippets.

@tmpvar
Created June 12, 2011 16:27
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 tmpvar/1021730 to your computer and use it in GitHub Desktop.
Save tmpvar/1021730 to your computer and use it in GitHub Desktop.
hook.io request for comments time

What is a hook?

  • A hook is a node.js process

  • A hook can have many outputs ( servers ) and inputs ( client connections ) to other hooks

  • The previous line is NOT a typo

  • outputs =  servers ( who push messages out )

  • inputs   =  clients   ( who take messages in )

  • inputs and outputs are independent channels and are both bi-directional

  • hook inputs ALWAYS re-broadcast to it's outputs immediate inputs ( siblings )

  • a hook CANNOT hear messages emitted from it's own input ( no circular messages )

  • hook inputs MAY be re-broadcasted to the same hooks immediate outputs ( children )

  • a hook MAY auto-detect if it should be an input or an output on startup

  • a hook MAY auto-detect which port it should listen on or connect to

( RFC and IDST pending )

http://github.com/marak/hook.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment