TIL (Today I Learned)
-
WebRTC란?TIL (Today I Learned) 2024. 1. 16. 21:55
WebRTC 기본 개념 WebRTC(Web Real-Time Communications)은 웹 어플리케이션 및 모바일 기기에서 별도의 소프트웨어나 플러그인 없이 음성, 영상 미디어, 텍스트, 파일과 같은 데이터를 주고받을 수 있는 기술입니다. 주로 P2P( Peer-to-Peer) 화상회의 및 데이터 공유를 지원하며, 브라우저 간에 실시간 통신이 가능하게 합니다. WebRTC는 비디오 채팅, 화상 회의, 온라인 교육, 의료 분야의 원격 진료 등 다양한 분야에서 활용되고 있습니다. 또한, 오픈소스 기술로 Chrome, Firefox, Opera 등의 주요 브라우저에서 지원되며, 주요 구성 요소로는 미디어 스트림, 시그널링, NAT 트래버설이 있습니다. WebRTC 통신원리 WebRTC 기술은 P2P 통신에..
-
“Thread Pool Hell” 발생원인TIL (Today I Learned) 2024. 1. 16. 16:50
#대용량 트래픽 발생 원인 HTTP Request와 Thread Pool HTTP Request가 증가함에 따라 서버에는 이러한 요청을 처리하기 위해 Thread Pool과 Queue가 사용됩니다. 각 Request는 Queue를 통해 Thread Pool에 할당되며, Thread Pool은 시스템에서 사용 가능한 Thread의 개수를 제한하게 됩니다. 그런데, 이러한 Thread의 개수는 무한하지 않으며, 시스템의 성능과 자원에 따라 한계가 있습니다. Thread Pool Size 초과와 대기 큐 만약 동시에 발생한 HTTP Request가 Thread Pool Size를 초과한다면, 초과된 요청은 큐에 대기하게 됩니다. 즉, 서버가 동시에 처리 가능한 Request의 한계를 넘어선 경우, 초과된 Re..
-
LexoRank에 대하여****TIL (Today I Learned) 2024. 1. 10. 23:48
# LexoRank..... 최종프로젝트를 앞두고 TRELLO와 같은 칸반보드 백엔드 프로젝트를 담당하게 되어, 보드에서 생성된 칼럼과 카드를 드래그하여 이동할 수 있는 기능을 구현하는 업무를 맡게 되었습니다. 프로젝트 진행 방향을 정할 때, [Before, Next] 방식으로 각 칼럼과 카드의 위치를 기억하고 지정하여 적용할지, 혹은 [LexoRank] 모듈을 활용할지에 대한 선택이 필요했습니다. 처음에는 전자의 방식을 선택하여 구현해보려고 했지만, 갑자기 [LexoRank] 방법을 시도해보고 싶어서 변경하게 되었습니다. 문제는 공식 문서와 여러 블로그를 찾아봐도 적용 예시에 대한 글이 부족하여 멘탈이 잠시 나갔지만 같은 조원인 조장님의 도움으로 로직을 쉽게 배울 수 있었습니다. # LexoRank란?..
-
메모장-LexoRankTIL (Today I Learned) 2024. 1. 5. 20:55
# Getting Started npm install lexorank yarn add lexorank # Using Static methods import {LexoRank} from "lexorank"; // min const minLexoRank = LexoRank.min(); // max const maxLexoRank = LexoRank.max(); // middle const middleLexoRank = LexoRank.middle(); // parse const parsedLexoRank = LexoRank.parse('0|0i0000:'); Public methods import {LexoRank} from "lexorank"; // any lexoRank const lexoRank = L..
-
내용 꼭 정리하기*****//NestJS와 TypeORM에서 Entity 생성 및 저장 시 주의사항TIL (Today I Learned) 2024. 1. 2. 23:36
NestJS와 TypeORM을 사용하여 애플리케이션을 개발하는 동안 Entity를 생성하고 저장하는 과정에서 발생할 수 있는 다양한 상황에 대해 알아봅니다. TypeScript와 TypeORM이 어떻게 상호 작용하는지를 이해하면서 효율적이고 안정적인 코드를 작성하는데 도움이 될 것입니다. # TypeScript와 데코레이터의 동작 차이 NestJS와 TypeORM을 사용하면 데코레이터를 통해 Entity를 정의하게 됩니다. 그러나 TypeScript는 정적 타입 언어이기 때문에, 컴파일 시점에 타입 정보를 확인합니다. TypeORM의 데코레이터는 런타임에 동적으로 동작하며, 이로 인해 Entity 생성 시점과 TypeScript의 런타임이 일치하지 않을 수 있습니다. # Entity 생성 예시 // ex..
-
NestJS_온라인 공연 예매 서비스 프로젝트_entity 관계 설정 수정TIL (Today I Learned) 2023. 12. 29. 21:36
# ERD 설계 재구성 TicketPlatform(테이블 4개로 다시 구성) Draw ERD with your team members. All states are shared in real time. And it's FREE. Database modeling tool. www.erdcloud.com # user.entity.ts import { Column, Entity, Index, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, OneToMany, } from 'typeorm'; import { Role } from '../types/userRole.type'; import { Reservation } from..
-
NestJS_온라인 공연 예매 서비스 프로젝트 5편_공연 기능 구현(수정중)TIL (Today I Learned) 2023. 12. 28. 21:08
# Nest JS 프로젝트 공연 구현을 시작에 앞서 이전 단계에 대한 궁금증이 남아 계신 분들은 아래의 포스팅을 차례로 살펴보시길 권장합니다. NestJS_온라인 공연 예매 서비스 프로젝트 1편_기본 세팅 # Nest JS 프로젝트를 시작하며 TypeScript와 NestJS를 활용한 온라인 공연 예매 서비스 프로젝트를 자세하게 기록하는 포스팅을 시작하고자 합니다. 지금까지 다양한 과제를 수행해왔지만, 아마도 이 k0zdevel.tistory.com NestJS_온라인 공연 예매 서비스 프로젝트 2편_프로젝트 필수 기능 구현 # Nest JS 프로젝트 본격적으로 시작에 앞서 지난 포스팅에 이어 두 번째 이야기를 시작하겠습니다. 이전 글에서는 프로젝트의 기초 세팅에 대해 다뤘습니다. 만약 그 내용에 대해 ..
-
NestJS_온라인 공연 예매 서비스 프로젝트 4편_유저기능 구현(회원가입 및 로그인[下])TIL (Today I Learned) 2023. 12. 27. 22:12
# Nest JS 프로젝트 유저 기능 구현을 시작에 앞서 이전 포스팅에서는 회원가입 및 로그인 [상]에서 user 모듈, 서비스, 컨트롤러를 기본적으로 구현했습니다. 더불어, Enum을 활용하여 user와 admin을 분리하고, user.entity를 세심히 작성했습니다. 또한, user.controller를 효과적으로 활용하기 위해 필요한 DTO를 생성하고, userInfo라는 커스텀 데코레이터도 구현했습니다. 이전 단계에 대한 궁금증이 남아 계신 분들은 아래의 포스팅을 차례로 살펴보시길 권장합니다. NestJS_온라인 공연 예매 서비스 프로젝트 1편_기본 세팅 # Nest JS 프로젝트를 시작하며 TypeScript와 NestJS를 활용한 온라인 공연 예매 서비스 프로젝트를 자세하게 기록하는 포스팅을..