Topic
  • 1 reply
  • Latest Post - ‏2014-01-21T15:17:45Z by Andrew Low
pwagstro
pwagstro
1 Post

Pinned topic What are the advantages for the IBM SDK for Node.js?

‏2014-01-20T18:24:35Z | nodejs

I'm poking around at the IBM SDK for Node.js and there isn't much documentation available. I can understand why the version for Power is useful, as v8 on Power historically has had issues. What are the advantages in using the IBM SDK for Node.js on the other platforms such as a Mac and Windows? I downloaded and installed the Mac version and it appears to be Node 0.10.21. I compared it to 0.10.21 installed from Homebrew and found that the binary for the IBM SDK was slightly larger (about 10MiB vs 8MiB for Homebrew) and my tiny benchmark showed both the be within the margin of error when running a benchmark.

Are there hidden advantages in using the IBM SDK for Node.js on platforms such as Mac and Windows?

  • Andrew Low
    Andrew Low
    4 Posts

    Re: What are the advantages for the IBM SDK for Node.js?

    ‏2014-01-21T15:17:45Z  

    Hmm, I started to write a reply and it got a lot longer than I anticipated.

    TL;DR - No secrets. Intel based versions exist for completeness and ensured compatibility.

     

    The PowerPC port of V8 was a significant effort. V8 takes JavaScript (JS) source code and generates machine code in memory. This is typically referred to as "JIT" (Just-In-Time) compilation. Unlike many Java runtimes (JVMs) - the V8 design opts to skip any form of interpretation and always generates machine code. By making this design choice, it makes V8 much harder to bring to new platforms.

    What are the advantages in using the IBM SDK for Node.js on the other platforms such as a Mac and Windows?

    We have an interesting challenge with Node.js. We want to maintain 100% compatibility with the existing open source versions. In fact, we are both consuming the open source versions, and contributing back almost all of our changes. The strength of the Node.js community is that things "just work" and we want to maintain that by having a single code base.

    Clearly for PowerPC we had to make significant changes to the V8 runtime, and there are also changes to support big endian.

    Most of our work happens out in the open. Check out: https://github.com/andrewlow/v8ppc for V8, and https://github.com/andrewlow/node for Node.js

    For the Intel versions (Linux, Mac, Windows) the code contains only a few minor changes. Specifically one change are the insertion of an 'eyecatcher' into the runtime memory to allow the IBM diagnostic tool IDDE (Interactive Diagnostic Data Explorer) to support core dumps created by the runtime. [today the IDDE can't handle OSX core files, but the eyecatcher is still there - better supporting OSX is on the list].  Read more about IDDE here: https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=5efb4378-ebba-47da-8c0f-8841d669d0cc

    We also make a few small non-functional changes to the code to satisfy IBM product requirements. 

    To come back to the question: "What are the advantages" - the answer is true for all platforms this product exists on.

    By using the IBM SDK for Node.js, you get a server based JS runtime that is supported by IBM. Customers of IBM and product teams inside of IBM can build on top of this technology knowing they can lean on the same deep support they've always had for IBM products.

    We are also enabling IBMs platforms to run this code, both across OS variations and CPU variations. It might seem a bit silly to ship an OSX version as there are only a small set of differences, but by using that version in conjunction with the PowerPC version - you can be assured we've tested those two platforms together. 

    the binary for the IBM SDK was slightly larger

    This is an artifact of the compiler level we use, and the platform we build on. The open source version is usually compiled on Ubuntu, we make use of RHEL for our builds (but we test Ubuntu). I believe our compiler levels are also slightly different. Yes, these changes could introduce issues - but we have a test team and run lots of tests to mitigate that issue.

    Are there hidden advantages in using the IBM SDK for Node.js on platforms such as Mac and Windows?

    No. Nothing secret. Any cool mojo we add, we'll do in the open.