NodeJS: In Three(ish) Minutes.
NodeJS: In Three(ish) Minutes.
3분 만에 NodeJS 파해치기 :)
This is a new format I'm considering trying, so let me know if you like it.
내가 이제 새로운 방식으로 글을 써보려고해. 맘에 들면 말 해줘.
I'm going to take a topic, probably always a technology, and explain it as concisely and clearly as possible in 3 minutes.
앞으로 간결, 깔끔하게 3분 내로 읽을 수 있도록 한 주제에 대해 얘기해볼꺼야. (아마도 항상 기술분야가 되겠지만..)
To begin I'll choose the focal technology of my recent article, NodeJS. So let's begin!
첫 시작은 나의 최근 글들의 중심 기술인 NodeJS다. 시작할겡 :)
NodeJS was created in 2009 by Ryan Dahl.
Ryan Dahl이 NodeJS를 2009년에 만들었어.
Prior to NodeJS, Dahl had been working as a developer using Ruby on Rails.
NodeJS 나오기 전에, Ryan은 Ruby on Rails를 사용하는 개발자였지.
He got the base concept for NodeJS while using Flickr (an image uploading and sharing website), and he noticed that there was a progress bar, that told him the status of his image uploading.
Ryan은 Flickr(이미지를 업로드하고 공유하는 웹사이트[https://www.flickr.com/])를 사용하면서 NodeJS에 대한 기본 개념을 생각해냈고, 이미지가 업로드 되는 상태를 나타내는 progress bar가 있다는걸 알았지.
It seems almost a fickle feature now, but back in the late 00s, that kind of server-always-talking behaviour was new and rare.
지금은 그게 아주 변덕스러워 보이지만, 2000년 후반 server-always-talking 종류의 방식은 새로운 것이었고 귀했지.
This was the case because back then, servers didn't really have the ability necessary to process multiple things at once, such as uploading a file and also handling other requests from the same user, an idea known as concurrency.
그 당시에, 서버는 한 번에 여러 항목을 process할 수 있는 능력이 없었어. 예를 들어, 한 사용자 보낸 요청을 처리하면서 파일을 업로드할 경우 말야. concurrency에 대한 개념이지.
Seeing this interaction between browser and server sparked something in Dahl.
Ryan은 browser하고 server가 상호작용 하는걸 보면서 영감을 받았어.
He realised that a web server needs to be able to process multiple things at the same time.
Ryan은 web server는 여러 항목을 동시에 처리 할 수 있어야 한다는 걸 깨달은거지.
The old method of get a request/send a response was outdated and ill fitting.
get a request(요청을 받는 것)과 send a response(응답을 전송하는 것) 은 오래된 방법은 시대에 뒤쳐지고 부적절했지.
I don't know about you but that doesn't make a tremendous amount of sense to me, so let me explain it further with a diagram
너도 그런지는 모르겠지만 나는 이게 이해가 잘 안돼. 그래서 그림을 통해 한번 봐보자 :)
A request comes in, in this case it's a request to upload a file.
파일을 업로드하는 요청이 들어왔다 생각해보자.
The server accepts that request, and while it is processing that request (the thick dark line to the right) it handles other requests, before finally returning a response to the main request.
server가 요청을 수락하고 처리하는 동안(맨 오른쪽에 두꺼운 까만줄), 가장 중심적인 request를 응답하기 전에 다른 요청들을 처리 하는거지.
This is the concept of concurrency at the root of NodeJS.
이게 바로 NodeJS에서 근간이 되는 concurrency에 대한 개념이야.
It was built by Dahl and co in Javascript using a wonderful implementation of technology, in the form of Google's V8 engine.
이 concurrency에 대한 개념은 Ryan과 공동으로 Google의 V8엔진 형태의 멋진 Javascript기술로 만들어졌어.
This engine takes Javascript code, and compiles it into C++, which executes at lightning speeds.
Google's V8 엔진은 Javascript code를 받아서, 겁나 빠르게 실행 할 수 있는 C++로 compile 하지.
V8 does this on the fly, and compiles quickly upon execution.
V8 엔진은 이를 즉시 수행하며, 실행 시 컴파일 되지.
This is partly what gives NodeJS it's edge when it comes to speed compared to other programming languages and frameworks.
이게 바로 NodeJS가 부분적으로 다른 프로그래밍 언어나 프레임워크랑 속도 면에서 비교 했을때 장점이 있는 이유야.
NodeJS wasn't back then, and still isn't, a web server by default.
NodeJS는 기본적으로 웹서버가 아니였고 지금도 아니야.
When you get NodeJS out of the box, it doesn't just start a web server.
너가 NodeJS를 딱 시작하면, 이건 뭐 웹서버를 시작하지도 않지.
Developers have to utilise either frameworks, or write the logic directly on top of NodeJS, to make it into a web server.
개발자들이 NodeJS에서 프레임워크를 활용하거나 코드를 작성해야만 web server를 만들 수 있어.
So why isn't NodeJS just a web server by default, if that's why it was invented?
그렇다면 왜 NodeJS는 기본적으로 웹서버가 아닐까? 왜 NodeJS는 만들어 졌을까?
It's because NodeJS was built to address an issue greater than just the problem of multiple requests to a website, it was built to address the idea of multiple requests and of processing multiple things at once.
NodeJS는 웹사이트의 여러개의 requests를 처리하는 문제보다 더 큰 문제를 해결하기 위해 만들어졌기 때문이야.
여러 request를 처리하고 동시에 여러 항목을 process하기 위해 개발 된거지.
That's part of the reason for the popularity of NodeJS, because it can do a lot more than just web servers.
그게 바로 NodeJS가 인기를 얻은 이유중 하나지. NodeJS는 web server보다도 더 다양한 것들을 할 수 있거든.
NodeJS is used for the aforementioned web servers, but also as an operating system, a logging tool (to record say, http requests, or user generated behaviour in a desktop application), a general scripting language, and I have personally used it for developing neural networks and machine learning.
NodeJS는 앞서 말한 web servers로도 사용되지만 또한, 운영체제, logging tool(녹음, http requests, 데스크탑 프로그램의 유저행동 기록), general scripting(자동 작업)으로도 사용이 돼.
그리고 나는 개인적으로 NodeJS를 신경망 네트워크나 machine learning(기계 학습)에 사용 해오고 있지.
But because it is by far most commonly used for web servers, I'm focusing on that aspect the most.
그러나 지금까지 NodeJS가 대부분 웹서버로 사용되고 있어서, 나도 웹서버 쪽에 집중하고 있어.
Anyway let's jump ahead to NodeJS in 2018.
어쨌든 2018년 NodeJS로 넘어가자.
It is now most commonly used for developing Backends.
이제 NodeJS는 Backends를 개발 할 때, 완전 핫하지.
Backend meaning the part of the website you don't see; all the logic that makes a website work.
Backend란 website내에서 너가 보지 못하는 부분을 의미해; website가 작동하도록 하는 모든 logic들 말야.
It is however also commonly coupled with the major Frontend frameworks, the part that you do see and interact with, to make what's called a Full-Stack environment.
또한, 주요한 frontend(유저가 website내에서 볼 수 있는 부분) 프레임워크들과 결합되어서 Full-Stack 환경을 만들지.
These include Angular, Vue, and React, to name the most popular frameworks.
Frontend 프레임워크들 중 요즘 가장 핫한 건 Angular, Vue 그리고 React야.
I can go more into this full-stack development topic in another article.
내가 나중에 full-stack development에 대해선 다른 글로 좀더 자세히 설명해 줄게.
NodeJS comes with a resource called NPM bundled into it.
NodeJS는 NPM이라고 불리는 resource가 번들로 제공이 돼.
NPM allows the developer to manage packages, which are useful Javascript functions, and to add them to any NodeJS project.
NPM은 개발자가 packages(유용한 Javascript 함수)를 관리하고, 어느 NodeJS 프로젝트에도 넣어 사용할 수 있게 해주지.
Using packages speeds up development and allows the developer to abstract away a lot of the nitty gritty development, allowing for faster code iterations.
packages를 사용해서 개발 속도를 빠르게 하고 껄끄러운 개발사항이나 코드반복을 처리 할수 있게 해줘
So let's summarize.
자, 요약해보자 :)
NodeJS is a Javascript framework, built in Google's V8 engine, and it was built to serve the need of processing multiple requests at once.
NodeJS는 Google의 V8 engine안에서 만들어진 Javascript 프레임워크야. 그리고, 여러개의 requests를 한번에 처리하기 위해 만들어졌지.
It does this very well, and has become one of the most popular frameworks for developing websites because of it.
그걸 아주 잘하기에 웹사이트 개발에 가장 인기있는 프레임워크가 됐지.
And finally, developers can use the built-in NPM to add other Javascript frameworks and libraries, to speed up their own development.
마지막으로, 개발자들은 NodeJS에 장착된 NPM(필요한 프레임워크나 라이브러리를 추가 할 수 있는 패키지 관리 툴)을 사용해 개발을 겁나 빨리 할 수 있어.
So that's NodeJS very quickly! I hope you enjoyed.
NodeJS를 빠르게 설명해봤어. 너가 즐거웠기를 바래.
출처: https://medium.com/@kieranmaher13/nodejs-in-three-ish-minutes-4c4401b43b2c
Ps. 첫 번역이라 틀린게 있어도 양해부탁드려요 :)
from http://menuand.tistory.com/3 by ccl(A)
댓글
댓글 쓰기