{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/build/issues/151","labels_url":"https://api.github.com/repos/nodejs/build/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/build/issues/151/comments","events_url":"https://api.github.com/repos/nodejs/build/issues/151/events","html_url":"https://github.com/nodejs/build/issues/151","id":99730733,"number":151,"title":"Native add-on compile build & cache service","user":{"login":"rvagg","id":495647,"avatar_url":"https://avatars.githubusercontent.com/u/495647?v=3","gravatar_id":"","url":"https://api.github.com/users/rvagg","html_url":"https://github.com/rvagg","followers_url":"https://api.github.com/users/rvagg/followers","following_url":"https://api.github.com/users/rvagg/following{/other_user}","gists_url":"https://api.github.com/users/rvagg/gists{/gist_id}","starred_url":"https://api.github.com/users/rvagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvagg/subscriptions","organizations_url":"https://api.github.com/users/rvagg/orgs","repos_url":"https://api.github.com/users/rvagg/repos","events_url":"https://api.github.com/users/rvagg/events{/privacy}","received_events_url":"https://api.github.com/users/rvagg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-07T21:08:15Z","updated_at":"2015-08-11T23:15:15Z","closed_at":null,"body":"It turns out that @orangemocha and I have been thinking about a very similar solution to the native add-on compile problem.\r\n\r\n1. Accept queries for binaries of packages with the following parameters:\r\n  - Package name (e.g. `bignum`, `leveldown`, `serialport`)\r\n  - Package version (e.g. `1.0.2`)\r\n  - Platform (e.g. `linux`, `win32`, `darwin`)\r\n  - Architecture (e.g. `x86`, `x64`, `armv7`)\r\n  - Node ABI version (i.e. `process.versions.modules`, a.k.a `NODE_MODULES_VERSION`)\r\n2. If no matching binary exists and the combination is _acceptable_ build it\r\n3. Serve the binary or serve a rejection for `<reason>`\r\n\r\nSome additional thoughts about getting something like this working:\r\n\r\n* Windows is arguably the most difficult platform with the most unknowns to get this working on. OSX is similar for various reasons but probably not as difficult as Windows and doesn't present as many challenges to users. So we should pick off Windows as a first target and ignore the rest until we have something that works for Windows, then we can rapidly apply the same model to other platforms.\r\n* Containers, jails and zones are ideal where available, VMs with snapshots otherwise. It's important that we provide isolation between builds and isolation of the build system for security, stability and overall integrity of the system.\r\n* Build resource requirements would be bursty, mainly coinciding with new releases of Node and new releases of the supported packages. Building elasticity into the system would be sensible.\r\n* Azure would be a good target for seeking resources for a first-pass at this, if we can get them on board we could spin up a proof of concept fairly quickly I think. It's in Microsoft's interests so we just need to connect that with Azure.\r\n* OSX resources are tricky, we can't get this as easily from an IaaS but we could either buy more Mac Minis and store them in a partner's network (Voxer does this atm, I do this personally for ARM). We could also investigate using Foundation resources to buy from one of the pseudo IaaS OSX providers.\r\n* Linux and other unixes are fairly easy to add but are also the platforms with the least pain (`apt-get install build-essential && bingo!`). Piggy-backing @nodejs/build resources is possible but we're already close to saturated for usage so we'd have to spin up more to handle this and we may be pushing friendships with sponsors.\r\n* Linux ARM is the trickiest of the unixes because it's not as simple to compile often because of resource constraints and the style of deployment. We could piggy-back the existing @nodejs/build ARM resources here and seek donations from the community (ideal) or funds from the Foundation (if necessary).\r\n* We can't support _all_ native add-ons, consider node-canvas as one case where there are system dependencies that are necessary to both compile and use it. Unless a native add-on can ship its dependencies via npm it's going to be difficult for us to support it.\r\n* We should consider a two-way opt-in system whereby we are whitelisting packages that we are willing to support, and those packages are opting in with their install system in the way they use node-pre-gyp now.\r\n* node-pre-gyp has an evolved model that seems to be working well, we should adopt as much of that as possible and possibly piggy-pack it to provide the implementation (i.e. node-pre-gyp could be the client for this system).\r\n\r\n/cc @nodejs/build, @springmeyer, @othiym23, @nebrius (pls unsubscribe if you don't want to be involved in this discussion, I'm just guessing)"},"comment":{"url":"https://api.github.com/repos/nodejs/build/issues/comments/130107805","html_url":"https://github.com/nodejs/build/issues/151#issuecomment-130107805","issue_url":"https://api.github.com/repos/nodejs/build/issues/151","id":130107805,"user":{"login":"rvagg","id":495647,"avatar_url":"https://avatars.githubusercontent.com/u/495647?v=3","gravatar_id":"","url":"https://api.github.com/users/rvagg","html_url":"https://github.com/rvagg","followers_url":"https://api.github.com/users/rvagg/followers","following_url":"https://api.github.com/users/rvagg/following{/other_user}","gists_url":"https://api.github.com/users/rvagg/gists{/gist_id}","starred_url":"https://api.github.com/users/rvagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvagg/subscriptions","organizations_url":"https://api.github.com/users/rvagg/orgs","repos_url":"https://api.github.com/users/rvagg/repos","events_url":"https://api.github.com/users/rvagg/events{/privacy}","received_events_url":"https://api.github.com/users/rvagg/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T23:15:15Z","updated_at":"2015-08-11T23:15:15Z","body":"Thanks @cjbj, great input on all counts, particularly re integration with alt build services. Can you elaborate on your point about licenses though and how it related specifically to this effort?"}}