diff --git a/files/syscall count.numbers b/files/syscall count.numbers new file mode 100644 index 0000000000000000000000000000000000000000..d1345953c1c751d1e0cd41442556487369ae8f8b Binary files /dev/null and b/files/syscall count.numbers differ diff --git a/files/syscall_graph.png b/files/syscall_graph.png new file mode 100644 index 0000000000000000000000000000000000000000..1e328652252eaa1ac085215a47dc089d1174f0c7 Binary files /dev/null and b/files/syscall_graph.png differ diff --git a/slides/google-v8.md b/slides/google-v8.md index 73316620e10bb78a6034196701ecabbac0a609f7..bbfa875167fe9245803afdcb8c876842cc148474 100644 --- a/slides/google-v8.md +++ b/slides/google-v8.md @@ -2,5 +2,5 @@ * Google's open source javascript engine * Used by google chrome +* Exists as a standalone engine * Compiles javascript to machine code JIT -* Exists as a standalone engine \ No newline at end of file diff --git a/slides/how-is-node-put-together.md b/slides/how-is-node-put-together.md index d82501d8b5cfa464df5932e520a0facfb62db909..d0328e4064118448bd46db3f1a594f95a94e045c 100644 --- a/slides/how-is-node-put-together.md +++ b/slides/how-is-node-put-together.md @@ -1,6 +1,5 @@ ## How is node put together? * Google v8 engine that compiles/optimizes Javascript -* High performance parts written in C (http, etc) -* Bridge between high performance parts to v8 (via v8 apis) -* Libuv as an abstraction layer for network and file system +* High performance parts written in C (http, libuv) +* Wrapped together by node diff --git a/slides/javascript-overview.md b/slides/javascript-overview.md new file mode 100644 index 0000000000000000000000000000000000000000..dd8739f4086812391be163bac5f7ac13531596ec --- /dev/null +++ b/slides/javascript-overview.md @@ -0,0 +1,3 @@ +## javascript overview + +This is a new Markdown slide diff --git a/slides/list.json b/slides/list.json index 588f6a4c00fa7cb9aa0ce7fbdb178c936b42a883..7f2a29bd50adefdcafc86c0e4bca220aa75014b9 100644 --- a/slides/list.json +++ b/slides/list.json @@ -10,16 +10,18 @@ "who-uses-node.md", "how-is-node-put-together.md", "google-v8.md", - "syscall-overhead.md", "v8-benchmarks.md", + "syscall-overhead.md", "pure-c-modules.md", "outline-pt2.md", - "the-javascript-part.md", + "why-javascript-totally-rules.md", + "javascript-overview.md", "what-is-a-callback.md", + "the-javascript-part.md", "event-loop.md", "simple-server-example.md", "popular-modules.md", "other-crazy-things-you-can-do.md", "takeaways.md", - "simple-chat-server.md" + "simple-chat-server.md" ] \ No newline at end of file diff --git a/slides/outline-pt2.md b/slides/outline-pt2.md index acff660a35c278fc6fcf50c72236c3404599d4e7..d2937a0a19fe7bd22007cd12f9060aaea4063918 100644 --- a/slides/outline-pt2.md +++ b/slides/outline-pt2.md @@ -3,5 +3,5 @@ 1. What is node/Why node is awesome 2. Nodejs architecture overview 3. V8, c++, and optimizing oh my -4. **Why javascript? (aka all glory to the event loop)** +4. **The javascript part** 5. Recap + takeaways diff --git a/slides/outline.md b/slides/outline.md index ec51ecc7aa72213fd524b2df6b370fd858dbeda1..c3e5e45fcfe3b4db1ed81342c114c85a7fbc1f78 100644 --- a/slides/outline.md +++ b/slides/outline.md @@ -3,5 +3,5 @@ 1. What is node/Why node is awesome 2. Nodejs architecture overview 3. V8, c++, and optimizing oh my -4. Why javascript? (aka all glory to the event loop) +4. The javascript part 5. Recap + takeaways diff --git a/slides/pure-c-modules.md b/slides/pure-c-modules.md index e538c5d0fc28a78556d50504191d023b970b8acc..b47cf8c62bebd298b3f9dd6c235b0c4ea7f28ac2 100644 --- a/slides/pure-c-modules.md +++ b/slides/pure-c-modules.md @@ -1,9 +1,19 @@ ## Pure C modules -Most of node's components are written in javascript, -but a few high performance ones are written in pure C -and then connect into v8 via v8 APIs +Nodejs has a few components written in C for performance +<div style="text-align:left"> +<dl> + <dt><b>Http parser:</b></dt> + <dd>https://github.com/joyent/node/tree/master/deps/http_parser</dd> + <br> + <dt><b>libuv, platform independent async I/O:</b></dt> + <dd>https://github.com/libuv/libuv</dd> +</dl> +</div> +<br> + +*freaking awesome logo btw* + +<img src="https://raw.githubusercontent.com/libuv/libuv/master/img/banner.png" width="400px"> + -* https://github.com/joyent/node/tree/master/deps/http_parser -* networking? -'''''''''''check with xi diff --git a/slides/syscall-overhead.md b/slides/syscall-overhead.md index acfacf2c9e06cd93c745314f95996069957fd334..42e96c3ea18245f7f124999d935a1933980ba871 100644 --- a/slides/syscall-overhead.md +++ b/slides/syscall-overhead.md @@ -1,9 +1,7 @@ ## Syscall overhead -Hello world in C, node, and Java +Hello world in C, v8, java and node -| Language | Syscall Count | -|----------|---------------| -| C | 13 | -| Java | 317 | -| Node | 491 | +<img src="files/syscall_graph.png" width="600px"> + +*Remember that v8 and node both include a compilation step!* \ No newline at end of file diff --git a/slides/the-javascript-part.md b/slides/the-javascript-part.md index 3e18c55e571a5b620b3cc573f774ccae5a0bd11c..f4e6255b6083d1bde80ba3b1c08f914163c2d1d8 100644 --- a/slides/the-javascript-part.md +++ b/slides/the-javascript-part.md @@ -1,7 +1,8 @@ -## The javascript part +## The gospel of node * Javascript is one of the most popular languages in the world * Lots of people with knowledge of javascript * Ergo, lots of people familiar with async + callbacks * Nodejs designer wanted a language with callbacks + event loop concept -* Google V8 ayy lmao \ No newline at end of file +* Google V8 ayy lmao +* And thus nodejs was born \ No newline at end of file diff --git a/slides/the-problem.md b/slides/the-problem.md index 10df93060946ccbe85111d146786d9d76c07cb8b..14f7ae3d272a19a26be3ab9692e3f03505fbcd09 100644 --- a/slides/the-problem.md +++ b/slides/the-problem.md @@ -5,7 +5,7 @@ ```javascript var result = database.query("kittens"); -// twaddle fingers +// finger twaddling send(result); ``` diff --git a/slides/the-solution.md b/slides/the-solution.md index c5e50e911dc217f78a8c89fdb0508c70d5bdbbd3..4d009594330712dfb9d2afdce212bf25ea9419c7 100644 --- a/slides/the-solution.md +++ b/slides/the-solution.md @@ -2,12 +2,13 @@ Nodejs uses callbacks to defer dealing with I/O until it's ready -``` +```javascript database.query("kittens", function (data) { // database is done and has the data ready send(data); }); // do other servery things +skynet.init().spawn({"model": "T-1000"}); ``` *we'll explore callbacks and javascript language features later* diff --git a/slides/why-javascript-totally-rules.md b/slides/why-javascript-totally-rules.md new file mode 100644 index 0000000000000000000000000000000000000000..0bc0453692f855789247a78a72cb956cf6a4c528 --- /dev/null +++ b/slides/why-javascript-totally-rules.md @@ -0,0 +1,3 @@ +## Why javascript totally rules + +<iframe width="840" height="473" src="https://www.youtube.com/embed/16GrH7H4PtQ" frameborder="0" allowfullscreen></iframe>