cluster with node 0.5+ #166

defunctzombie opened this Issue Oct 31, 2011 · 7 comments


None yet

5 participants


Given that node 0.5.11+ will have a new cluster module built in, how can one continue to use this module?

require('cluster'); won't do the right thing anymore iirc.

tj commented Oct 31, 2011

nope you're correct, require('cluster') will always select the core one :(
Ryan mentioned they could change the name of the one in core,
however if the core 'cluster' is done properly there would be little
reason to use learnboost/cluster anymore, we can break the plugins
into separate modules that you would just require() like normal.

there are certainly some issues with that since it's pretty opinionated
stuff in core, learnboost/cluster's plugin functionality will no doubt
never exist in node core, at least not the same. so it's a tough call,
im not sure right now what will end up being the right way to go.


Sigh. Why did it go into core in the first place? Why not just expose the system calls needed to create the modules and then promote the right 3rd party libraries? Putting it in core just means polluting the namespace that much more. /rant

tj commented Oct 31, 2011

yeah i think that's the goal kinda, just expose enough of a core library to make it extensible. it keeps changing often so i havent looked into it but it should be possible to keep cluster's api as-is if they change the internal name to something else


It sucks since we'll have to rename this lib or something (assuming they don't rename the core one). But you can avoid requiring the core cluster by doing a relative require: require('./node_modules/cluster'). Not a pretty solution obviously...

tj commented Nov 4, 2011

i know ryan was open to naming the core lib something else, not sure what else you could name it though without getting really corny

wadey commented Nov 29, 2011

Looks like they kept the name "cluster" for core, so this module should probably be renamed so that we can port stuff to node 0.6. Maybe "learnboost-cluster"? or something more clever?


I'm just getting the source and changing the name in package.json

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