Node.js: JavaScript on the Server
HTML-код
- Опубликовано: 26 авг 2024
- Google Tech Talk
July 28, 2010
ABSTRACT
Presented by Ryan Dahl, the creator of the node.JS open source project.
It is well known that event loops rather than threads are required for high-performance servers. Javascript is a language unencumbered of threads and designed specifically to be used with synchronous evented I/O, making it an attractive means of programming server software.
Node.js ties together the V8 Javascript compiler with an event loop, a thread pool for making blocking system calls, and a carefully designed HTTP parser to provide a browser-like interface to creating fast server-side software. This talk will explain Node's design and how to get started with it.
If you are too worried about the "ummhh ... ahhh" then go directly to StackOverflow and ask how to get your job done.
This talk if for the ones interested in how does nodejs works internally and have enough knowledge about IO, networking and other stuff to appreciate how awesome this guys is.
Awesome presentation about an awesome piece of software. Ryan is real presenter, true to himself who cares about the content of the message, not the medium. He brings deep knowledge of Javascript, Unix and networks. His presentation can be summarized as 'no fluff, just stuff' about super efficiency a server-side scripting language. Keep it up Ryan.
This guy is too smart. Each word is so carefully chosen.
Let's be clear - this is an awesome technology and Ryan deserves highest credit for developing it.
The other aspect is the presentation itself - it is quite hard to follow, maybe just not polished enough yet, maybe he needs more practice speaking in public speaking - not as fluid and engaging as it could be.
I don't think that being a technical person is a legitimate excuse for the lack of presentation skills, there are heaps of technical specialists with exceptional public speaking skills.
Ryan is a clear and convincing speaker. Really impressed.
Watch the video for it's content, this is not a Toastmasters video, so just skip over any of his "uums", he has something worth sharing, so be grateful that he is sharing his thoughts. Thanks Ryan!
Wonderful insight into one of my fav technologies. What a great mind RD has!, loved it
This video is from 2010, why it feels like it is from the '70s...
4:3 will do that to ya
Ryan's halting speech was off-putting at first, but I got accustomed to it quickly. In the brief review I have done so far on node.js, this resource ranks tops for me. The concepts are few, clearly stated, and (I think) easy to identify in the examples given.
I'm surprised that none of the blog entries or other articles I saw before this presentation got me further along or as motivated to do more. I'm excited to dig in now.
Just came here to know the history of the great technology
@DevelX666 Also, thank you for proving me right. You said: "All modern browsers block popups automatically". They do that exactly because otherwise javascript would open a metric ton of them per minute. Genius.
Siddharth Shama Node.js doesn't actively depend on it, but it uses it for builds when downloading packages: NPM (node package manager) downloads and rebuilds packages (e.g. packages that aren't pure js and contain a bit of c) and uses something called node-gyp which calls python 2.7.x.
The video is much nicer to watch if you set it to 1.5 x speed
The first few questioners get so hung up on the synchronous module loading, as if Ryan is contradicting himself or something, so obnoxious!
We don't care about synchronous calls during the 'boot' phase of a program like this: it should only happen once, and it's downright tedious to register a series of nested 'loaded' callbacks just to load up (potentially dozens of) modules before we can begin to do the real work.
Great talk!
@cosmos2k3 I think there are more reasons, like the better performance in all browsers, new API, more powerful CSS 3 and HTML5, larger applications using javascript etc. IE is just trying to catch up, but IE9 looks very good so far and I'm looking forward to it.
It's hard to understand these criticism's of Ryan's presentation skills. I found his presentation not just clear, but remarkably thorough. Not only does he lay out the impetus and defining elements of the node.js architecture, he also contextualizes it with a healthy dose of general background covering server architectures and network communications. Sure, his style of speaking might be a bit jerky, but if smoothness is your litmus test for a "good" presentation, it's really your loss.
Of course, his communication skills lacked (at least till the end), but man... great presentation.
The guy knows his sh**
I was going to disagree with you until I woke up in a pool of my own saliva.
Lol
01:09 nodejs is a set of bindings to V8 Javascript for scripting network programs
01:10 node is this project to bring Javascript to server-side...I am very interested into scripting network servers...
01:53 I am very focused on how to deal with tcp connections and... udp things...that sort of things
03:40 we want to write high-performance servers easily
17:01 Node is a project to make a set of bindings to V8, to do non-browser work sockets and files
18:17 Node is attempting to not make any abstractions... Obviously it turns this POSIX API into JavaScript interface.
18:36 More or less its LIMITING YOU AWAY FROM THINGS that YOU SHOULDN'T DO, Like SYNCHRONOUS I/O
18:53 Because the interface is purely non blocking, users tend to achieve decent concurrency without knowing what they doing.
19:00 You don't have to know what an EVENT LOOP is or NON-BLOCKING I/O means...
You live in this Non-blocking jail and its impossible to escape....
25:18 node is basically three things its V8 it's a thread pool to do file I/O and then it has his event loop library
‐--------------------------------------------------------
26:48 examples, command line
I agree that is kinda hard to fallow the whole presentation, but if you have the desire to understand it...you will.
@lennyhome I respectfully disagree. Take for example gmail, basecamp, youtube, facebook, myspace, ... they all use javascript and they use them for other things that opening porn popups.
By the way... what kind of browser are you using? All modern browsers block popups automatically.
@lazyd0g i think he meant that it _should have_ just been a hashtable instead of the clusterfuck that it is...
@lennyhome I have never said that everything is always perfect or appreciated by everyone. All I'm saying is that there is also upper side of using javascript as it may be used to increase usability or accessibility - or annoy the user.
@DevelX666 RUclips's usability has, in fact, taken a a big nosedive since they did they javascript infected "channel redesign". It brought several security issues, generated complaints, general slowness, annoyances, and absolutely no new useful feature.
There's an incorrection on the presentation slides, on the 1st node example. It should be s.on and not net.on
@DevelX666 "javascript", "usability" and "accessibility" used in the same sentence. That's interesting.
hahaha love how he air quotes about erlan "processes"
On min 20:43 (Almost) no side effects. What are the exceptions?
Awesome talk!! love it!!
hmm maybe ctrl + c? 😋
I think the achilles heel of node.js right now is the lack of multi-core support. Load balancing to multiple node.js processes should be a standard part of the deployment, I guess. At least for now.
Hm, all these .write() calls. They *look* blocking. Am I right that they queue the data in the background and do not actually block? So you never get an IO error with these function calls? (The error would be delivered to a - obviously optional - callback.)
We own a lot of credit to the DNS. Although, it is now probably coming to an age where technology is changing, it is most definitely not 'fucked'.
Who would have think it that node js is now on par with the best server side languages.
@ollekullberg Saw that too. Important catch.
His speech does seem halting in this one, but I think he seems nervous for some reason here. In another video I watched it was much different from this, and easier to follow. The NodeJS project is amazing, still trying to master the concepts.
@lennyhome 1) you don't need javascript to do that
2) any programming language may be used to do harm in some form. so using your standard, all programming languages are bad, genius ;)
Does MVC exist in js?
@lennyhome You think it's not possible?
why is python node's dependency , links will be appreciated .
There is a typo on the "server.js" example, it should be:
net = require("net");
s = net.createServer();
s.on('connection', function (c) {
c.end('hello');
});
s.listen(8000);
00:38
Couldn't resist being a bit douchy
@blenderpanzi Ah, it was the last question. Ok. It's like I thought.
Sweet.
@cybersalad 20:59 "Don't fear"
@lazyd0g they said it to try to say it's difficult, dont take it literally
@Fiil128 function view(model) { alert(model.msg); } function controller() { var model = {msg:"hello"}; view(model); }
If every important function is supposed to be non-blocking and have a lambda argument, they could just invent a new language where the compiler decides itself when to turn a couple of statements into a lambda or something. the whole thing feels clumsy in JS as it is
1:41 - if you can dodge a wrench...
"There's great thing in unix called 'processes'"
@ironmagma :D
Sounds all much like Python's Twisted.
Amazing guy, brilliant technology, unfortunately his presentations are very hard to watch. It isn't because I can't understand it, but because he doesn't have a fluid speech and I found it very hard to follow . I will stick with the documentation and html tutorials for now. But great technology nevertheless
He's not presenting...he's mentoring to "his peers", who probably have a similar delivery style. That being the case, I don't think it's terrible to have all the "umm" and "uhhh" words.
hope you all have memorized "ten thousand users" by now ;)
i don't think remote module loading is a good idea .
deno : yes
@DevelX666 Because javascript's only purpose is to open porn popups.
lmao im sure your opinion has changed over the years
DNS is FUCKED. /Agree.
@lennyhome Stop trolling and at least say why you think so. Everyone's a critic...
Ryan, sorry to say this, but please get help for learn to do a better presentation, it's just so difficult sitting through your presentation.
PENISSS!!!!!!!!
Awful start to a presentation... "uhhh.... ummm... uhhh..."