Replace hook.io with .fork() #19

Merged
merged 26 commits into from Jan 5, 2012

4 participants

@indexzero
nodejitsu member

@mmalecki Great work here, I knuckled down and wrapped up the last of the test changes. Mostly just a couple of places where we needed to be doing .on('message' instead of .stdout.on('data'.

Please review my last two changes and merge this in. With the fork branches of forever and haibu I was able to get all tests passing on 0.6.6:

https://github.com/nodejitsu/forever/commits/fork
https://github.com/nodejitsu/haibu/commits/fork

  $ cd /haibu-carapace
  $ git fetch && git checkout fork
  $ [sudo] npm link

  $ cd /forever
  $ git fetch && git checkout fork
  $ [sudo] npm link

  $ cd /haibu
  $ git fetch && git checkout fork
  $ [sudo] npm link forever haibu-carapace
  $ npm test

@bmeck If you could also confirm the above that would be great.

mmalecki and others added some commits Dec 28, 2011
@mmalecki mmalecki [dist] Remove `hook.io` dependency 2514dee
@mmalecki mmalecki [dist api] Use `optimist` for `cli` 49d68a2
@mmalecki mmalecki [bin] Remove `hook.io` stuff from binary 8b4a5ee
@mmalecki mmalecki [refactor api] Emit `port` instead of `carapace::port` 528c0a2
@mmalecki mmalecki [refactor api] Use `process.send` instead of `hook.io`
Changes:

  * `carapace` is no longer a `Hook` instance (it's an `EventEmitter2`
    now)
  * emitted events aren't prefixed with `carapace::`
  * `carapace` no longer uses `evref`
0d3a7f9
@mmalecki mmalecki [test] Use the `fork` API in `net-multiple-servers-test` 49b8f3f
@mmalecki mmalecki [test] Remove `macros.assertListen` a794b4f
@mmalecki mmalecki [test] Remove `simple/simple-test` e701b6c
@mmalecki mmalecki [test] Use new API in `simple/use-custom-plugin` test 3628bd4
@mmalecki mmalecki [test] Don't listen in `simple/child-argument` 2a1ff62
@mmalecki mmalecki [test] Don't listen in `simple/use-load` 77148f1
@mmalecki mmalecki [test] Don't listen in `spawn/parent-run` 0bdddfe
@mmalecki mmalecki [test] Don't listen in `spawn/parent-chroot-run` ce0ff0b
@mmalecki mmalecki [test] Don't listen in `simple/use-pluginserver` f8b9074
@mmalecki mmalecki [test] Don't listen in `spawn/parent-pluginserver` 2cb3c30
@mmalecki mmalecki [api] Don't prefix events in `heartbeat` plugin e4a754d
@mmalecki mmalecki [test] Use new API in `spawn/local-run` test c88a683
@mmalecki mmalecki [test] Use new API in `simple/use-load` test c0b8f0b
@mmalecki mmalecki [test] Don't prefix events in `macros.assertRun` d6aa8a6
@mmalecki mmalecki [test] Use new API in `macros.assertParentSpawn` helper 646c5c7
@mmalecki mmalecki [test minor] Guard `info.data.port` 693e6ad
@mmalecki mmalecki [test] Use `silent: true` for forking in tests
This option is available only on `master` (`v0.7`) now (introduced
in nodejs/node-v0.x-archive@b084322).
0f7af22
@indexzero indexzero [api] Remove unused bin/carapace-client c26b532
@indexzero indexzero [fix test doc dist] A couple of small fixes to carapace; updated test…
…s and documentation to remove all references to hook.io
47df7c1
@mmalecki

Pushed a change to remove evref - we don't need it anymore.
@bmeck Please make evref a module, it's a cool thing :).

@mmalecki

Tests pass for me. This is a great win.

@mmalecki mmalecki merged commit 9815901 into master Jan 5, 2012
@nathanaschbacher

If you don't mind my asking. What was the purpose of this change? What was it about hook.io that warranted removing it?

@indexzero
nodejitsu member

Less dependencies. Hook.io has a lot of them and it wasn't deemed necessary since the use-case here is limited to a single machine by definition.

@nathanaschbacher

Ah, interesting. That makes sense to me. I was mostly asking because I have built a similar sort of distributed processing framework for Node, and I'm in the process of allowing support across machine boundaries rather than just process boundaries, and I was going to use socket.io for this purpose, but came across hook.io. Seeing this decision here made me curious.

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