Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 개발스터디
- Python
- React
- 코드프레소
- pyladies
- 플라스크
- 코테
- 한빛
- 프리온보딩
- codepresso
- env
- 원티드
- flask
- cleancode
- 깃
- 리액트
- pyladiesseoul
- fluentpython
- 한빛미디어
- 개발
- 파이썬
- 예리님
- AWS
- mongodb
- git
- 스터디
- 패스트캠퍼스
- 위코드
- 전문가를위한파이썬
- 환경변수
Archives
- Today
- Total
개발자가 내팔자
NodeJS의 특징, 강점, 약점 본문
IO needs to be done differently
비동기방식의 IO
고전적인 처리 방식 : 절차지향적 -> 너무 많은 클럭 수를 낭비함
let databaseResult = queryDatabase() // how long? // Do things with databasesResult... let apiResult = getSomethingFromAPI() // how long? // Do things with apiResult
JavaScript식 비동기 처리 방식
queeryDatabase(result => { // Do things with databasesResult... }) getSomethingFromAPI(result => { // Do things with apiResult })
No more blocking!
자바스크립트는 언어 수준에서 이미 비동기 문제를 잘 해결해 두었다.
Node가 빠른 속도와 매우 높은 확장성을 갖는 근본적인 이유
저수준의 오래 걸리는 일은 Node에게, 고수준의 로직은 메인 스레드에서.
저수준 처리의 개선
- 저수준 처리는 Node가 빠르게 처리하기 매우 어려운 부분이 있다.
- Node.js는 C와 WebAssembly module을 바인딩해 사용하는 방법을 제공한다.
- C는 node-gyp를 통해, WebAssembly는 Node 12버전부터 제공하고 있다.
방대한 오픈 소스 생태계
'Programming Language > JavaScript' 카테고리의 다른 글
[TypeScript] Abstract Class와 Interface (0) | 2022.07.06 |
---|---|
[TypeScript] Type과 Interface (0) | 2022.07.06 |
Comments