|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | + <head> |
| 4 | + <style type="text/css"> |
| 5 | + ul { |
| 6 | + padding: 0; |
| 7 | + margin: 0; |
| 8 | + } |
| 9 | + </style> |
| 10 | + <link type="text/css" rel="stylesheet" href="pipe.css" /> |
| 11 | + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
| 12 | + <title>node v0.4 announcement</title> |
| 13 | + </head> |
| 14 | + <body> |
| 15 | + <h2>Second Stable Branch of Node released</h2> |
| 16 | + |
| 17 | + <p> |
| 18 | + <a |
| 19 | + href="https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3">Wiki |
| 20 | + page detailing API changes between v0.4 and v0.2</a> |
| 21 | + |
| 22 | + <p> |
| 23 | + Major changes since v0.2: |
| 24 | + |
| 25 | + <ul> |
| 26 | + <li> Major overhaul of TLS/SSL system. Previously the binding to |
| 27 | + OpenSSL was heavily interwoven into the socket code. This binding was |
| 28 | + reworked to present each connection as a pair of "streams" instead: a |
| 29 | + duplex encrypted stream and a duplex cleartext stream. The encrypted |
| 30 | + stream is piped to a raw TCP socket using the general purpose |
| 31 | + <code>Stream.prototype.pipe()</code> method. Functionality was |
| 32 | + enhanced and API simplified. |
| 33 | + |
| 34 | + <li> Cheaper <code>Buffer</code> allocation. Node uses |
| 35 | + <code>Buffer</code> objects in many places - it was noticed that they |
| 36 | + were relatively slow to allocate and difficult to garbage collect. The |
| 37 | + implementation changed to use pure javascript objects instead of |
| 38 | + an <code>ObjectWrap</code> which improved performance. |
| 39 | + |
| 40 | + <li> With a good amount of experience now, some modifications to the |
| 41 | + module loading system were made to better support package managers. |
| 42 | + In particular, NPM was forced to resort to deep symlinks and "shim" |
| 43 | + modules to work around missing features in <code>require()</code>. The main |
| 44 | + changes are: |
| 45 | + <ol> |
| 46 | + <li><code>require()</code> calls realpath. That is, |
| 47 | + it resolves symbolic links. This allows symlinked modules to make |
| 48 | + relative requires. |
| 49 | + |
| 50 | + <li><code>require()</code> now has a primitive understanding of |
| 51 | + <code>package.json</code>. It looks for the <code>main</code> |
| 52 | + script. This allows <code>require()</code> to work on package |
| 53 | + directories directly. |
| 54 | + |
| 55 | + <li>A specially named directory, <code>node_modules/</code>, is |
| 56 | + searched in the current directory for any modules. This will |
| 57 | + hopefully encourage programmers to bundle modules rather than |
| 58 | + rely on a global namespace. |
| 59 | + </ol> |
| 60 | + Read more about these features in <a |
| 61 | + href="https://github.com/ry/node/blob/01a864a29d64119054401784cd9255c3a813bdbc/doc/api/modules.markdown">the |
| 62 | + module documentation</a>. |
| 63 | + |
| 64 | + <li> A half-complete but good start a native windows build with MinGW |
| 65 | + is underway by Bert Builder. Build instructions can be found <a |
| 66 | + href="https://github.com/ry/node/wiki/Building-node.js-on-mingw">on |
| 67 | + the wiki</a>. |
| 68 | + |
| 69 | + <li> Node upgraded to the latest version of V8, <code>v3.1.2</code>. |
| 70 | + This includes much work including V8's new compilation infrastructure |
| 71 | + and a GDB plugin on Linux. |
| 72 | + Read <a |
| 73 | + href="https://github.com/ry/node/blob/583f2e599962f2664dbaafa0ae98a8d6c1242441/deps/v8/ChangeLog">the |
| 74 | + full V8 ChangeLog</a>. |
| 75 | + |
| 76 | + <li>A new built-in client for V8's debugger was added to Node. It is |
| 77 | + still very primitive but usable for simple task. There is a <a |
| 78 | + href="http://vimeo.com/19465332">small introduction video</a> and |
| 79 | + some <a |
| 80 | + href="https://github.com/ry/node/blob/01a864a29d64119054401784cd9255c3a813bdbc/doc/api/debugger.markdown">documentation</a>. |
| 81 | + |
| 82 | + <li>An <code>os</code> module was added by Brian White which exposes |
| 83 | + a lot of basic but useful system information: <code>os.cpus(), |
| 84 | + os.freemem(), os.totalmem(), os.loadavg()</code> |
| 85 | + |
| 86 | + <li> And, of course, many of bug fixes. See the |
| 87 | + <a |
| 88 | + href="https://github.com/ry/node/blob/01a864a29d64119054401784cd9255c3a813bdbc/ChangeLog">full |
| 89 | + changelog</a>. |
| 90 | + |
| 91 | + </ul> |
| 92 | + |
| 93 | + </body> |
| 94 | +</html> |
0 commit comments