Open davisjam opened 7 years ago
It's entirely possible.
Since Node.fz relies only on changes to libuv, it works on any version of Node.js that uses the same version of libuv. During the research I tried out Node.fz on versions v0.12.X, v3.x and v4.X, all of which use libuv v1.7.4.
I'm guessing I uploaded the tree that had v4.X as the base.
From the paper: "We demonstrated the flexibility of our libuv-only approach by applying our libuv changes in three other branches of Node.js: two development branches, v3.x and v4.0.0-rc, and one release branch, v0.12.5-release. After substituting our version of libuv, we could compile and use Node.fz to say “hello world” in these different versions."
Current version of lts/boron uses libuv v1.11.0. Going to attempt a diff between the two versions (1.7.4 & 1.11.0), and see where upgrades need to happen.
Attempting to use node.fz drop-in with either node v4.8.4 or v6.11.2 causes segfaults when trying to install npm packages or run node apps.
In case this helps someone more knowledgable about the C/C++ changes make this happen, here's what I did and the resulting conflicts:
git remote add NodeFZ git@github.com:VTLeeLab/NodeFz.git
)git fetch NodeFz
)git checkout NodeFz/master
)git checkout -b NodeFzMaster
)git reset --soft e68a119c180679631f140c3c9db9e9ff15750ca9
)git commit -a -m 'Node.fz changes'
)git rebase master
)At this point, here are the files with conflicts:
both modified: .gitignore
both modified: README.md
both modified: common.gypi
both modified: deps/uv/include/uv-unix.h
both modified: deps/uv/src/threadpool.c
both modified: deps/uv/src/unix/async.c
both modified: deps/uv/src/unix/core.c
both modified: deps/uv/src/unix/fs.c
both modified: deps/uv/src/unix/internal.h
both modified: deps/uv/src/unix/kqueue.c
both modified: deps/uv/src/unix/linux-core.c
both modified: deps/uv/src/unix/linux-inotify.c
both modified: deps/uv/src/unix/loop-watcher.c
both modified: deps/uv/src/unix/loop.c
both modified: deps/uv/src/unix/signal.c
both modified: deps/uv/src/unix/stream.c
both modified: deps/uv/src/unix/timer.c
both modified: deps/uv/src/unix/udp.c
both modified: deps/uv/src/win/pipe.c
both modified: deps/uv/src/win/tcp.c
both modified: deps/uv/src/win/tty.c
both modified: deps/uv/src/win/udp.c
both modified: deps/uv/uv.gyp
both modified: deps/v8/src/heap/heap.cc
both modified: deps/v8/src/isolate.cc
both modified: src/env.cc
both modified: src/node.cc
deleted by us: src/node.js
And here's a gist of the resulting diff as of today: https://gist.github.com/Trott/7725652eb432f0a47ccc85d2c8bcf049
Whoops, left some steps out above. I've edited it to add them, but I'm leaving a comment just in case someone is referring to email notifications, which I can't edit of course. :-D
@Trott: What's the holdup fix merge conflicts and commit ;) No seriously is somebody working on that I would really like to use this with node 8. Do I have it right that this is basically a copy of the node repository with changes to the libuv. So wouldn't it make more sense to maintain a set of patches which can then be applied to different versions of node.
@PhilippSelenium Your understanding is correct. I prepared this repository as part of the research project described in this paper and released the code to faciliate future research and potential community adoption.
I am not currently planning to maintain a set of patches, though I believe doing so would not be too onerous since libuv doesn't change too rapidly.
Okay so in order to work with node 8.x it would be 1.19.1: https://github.com/nodejs/node/blob/v8.x/deps/uv/configure.ac#L16 To 9.x it is only a revision update and for 10.x it is 1.20.2: https://github.com/nodejs/node/blob/v10.x/deps/uv/configure.ac#L16
But nevertheless nobody probably has the time/money/motivation to work on it.
The README states this is built on
0.12.7
, but this git tree appears to build off of4.1.0
. Is that correct?