inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

mac 환경에서 실습할 경우

해결됨

Airflow 마스터 클래스

안녕하세요 mac 환경에서 강의를 수강하려고 합니다. 이러한 경우 wsl 설치 없이 다음 강의로 넘어가면 될까요??

  • python
  • 데이터-엔지니어링
  • airflow
lucli 댓글 1 좋아요 0 조회수 533

로그인 프로세스 설명 중 질문

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

해당 장을 설명해주실 때 철수가 1050번째, 영희가 2050번째라고 가정했을때, 수직 파티셔닝 된 데이터베이스 중 어디에 있는지는 미리 알 수 있는 방법이 있을까요?

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
박호정 댓글 1 좋아요 1 조회수 297

프론트엔드 코드 실행시 에러가 발생합니다.

미해결

탄탄한 백엔드 NestJS, 기초부터 심화까지

>> 갱신, 2023. 10. 06 해결했습니다. https://github.com/amamov/teaching-nestjs-a-to-z/tree/frontend 위 링크 설명 따라 nestjs root 디렉토리에서 git clone 받고, npm install, npm run dev 하니까 잘 실행되네요 $ npm run dev > frontend@0.1.0 dev > next start ready - started server on 0.0.0.0:3000, url: http://localhost:3000 info - Loaded env from C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\.env 잘못된 파일을 받았던것 같습니다.. 어느 질문글에서 본 링크 따라서 들어가서 받았던거로 기억하는데.. 어느 글이었는지 다시 찾아도 보이지 않네요.. >> 질문글, 2023. 10. 04 학습자료 frontend를 다운 받았고, 이 폴더를 05 NestJS 실전 프로젝트와 같은 위치에 두었습니다. 이후 프론트엔드 코드 실행 방법 강의를 보고 frontend 디렉토리로 들어가 npm i를 입력하였습니다 admin@DESKTOP-ALLM3V0 MINGW64 ~/OneDrive/바탕 화면/learning_NestJS/frontend (master) $ npm i npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated @types/antd@1.0.0: This is a stub types definition for antd (https://github.com/ant-design/ant-design). antd provides its own type definitions, so you don't need @types/antd installed! npm WARN deprecated @types/axios@0.14.0: This is a stub types definition for axios (https://github.com/mzabriskie/axios). axios provides its own type definitions, so you don't need @types/axios installed! npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. added 368 packages, and audited 369 packages in 24s 48 packages are looking for funding run `npm fund` for details 15 vulnerabilities (3 moderate, 7 high, 5 critical) To address issues that do not require attention, run: npm audit fix To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details. 위와 같이 경고 메세지가 나왔고... 이 상태에서 npm run dev를 입력하였더니 admin@DESKTOP-ALLM3V0 MINGW64 ~/OneDrive/바탕 화면/learning_NestJS/frontend (master) $ npm run dev > frontend@0.1.0 dev > next dev ready - started server on 0.0.0.0:3000, url: http://localhost:3000 info - Loaded env from C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\.env info - Using webpack 5. Reason: no next.config.js https://nextjs.org/docs/messages/webpack5 Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at BulkUpdateDecorator.hashFactory (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:133790:18) at BulkUpdateDecorator.update (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:133692:50) at OriginalSource.updateHash (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack-sources2\index.js:1:19148) at NormalModule._initBuildHash (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65772:17) at handleParseResult (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10) at C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65928:4 at processResult (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65651:11) at C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65711:5 Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at BulkUpdateDecorator.hashFactory (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:133790:18) at BulkUpdateDecorator.update (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:133692:50) at OriginalSource.updateHash (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack-sources2\index.js:1:19148) at NormalModule._initBuildHash (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65772:17) at handleParseResult (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10) at C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65928:4 at processResult (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65651:11) at C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65711:5 node:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen); ^ Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at BulkUpdateDecorator.hashFactory (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:133790:18) at BulkUpdateDecorator.update (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:133692:50) at OriginalSource.updateHash (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack-sources2\index.js:1:19148) at NormalModule._initBuildHash (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65772:17) at handleParseResult (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65837:10) at C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65928:4 at processResult (C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65651:11) at C:\Users\admin\OneDrive\바탕 화면\learning_NestJS\frontend\node_modules\next\dist\compiled\webpack\bundle5.js:65711:5 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' } Node.js v18.16.0 위와 같은 에러가 발생하며 프론트엔드가 웹 서버가 실행되지 않고 있습니다.. 이러한 상황에서는 어떻게 진행하면 좋을지 조언 부탁드립니다.

  • node.js
  • mongodb
  • express
  • nestjs
  • ssr
jeongho218 댓글 2 좋아요 1 조회수 692

productsSalesLocation.service create method

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

create({productSalesLocation}): Promise<ProductSalesLocation>{ return this.productsSalesLocationsRepository.save({...productSalesLocation}); } 강의 중 위와 같은 코드를 작성해주셨는데, create의 parameter type은 ProductSalesLocation(Entity)의 타입에서 id만 제외하고 사용하는 형태로 작성하는 것이 맞을까요?

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
박호정 댓글 1 좋아요 0 조회수 209

product entity의 deletedAt type

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

다음처럼 DeletedDateColumn 데코레이터를 붙인 deletedAt은 db에서 nullable이니까 optional 타입으로 하는 것이 맞을까요? @DeleteDateColumn() deletedAt?: Date; 공식 문서에서는 optional 타입으로 되어 있지는 않네요 https://orkhan.gitbook.io/typeorm/docs/decorator-reference#deletedatecolumn

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
박호정 댓글 1 좋아요 0 조회수 226

코틀린에서 builder 패턴은 사용하지 않나요?

미해결

실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)

강사 님께서는 객체를 인스턴스화 하실 때, 생성자를 사용하거나, 정적 팩토리 메서드를 사용하는 방식 2가지를 이용하셨는데 혹시 코틀린에서 builder 패턴을 사용하는건 어떻게 생각하시나요?? defalut 파라미터를 이용하고 naming을 통해 builder패턴 처럼 사용할 수 는 있겠지만 java에서 builder패턴을 통해 객체를 만들었던 것에 비하면 불편하다는 생각이듭니다. 조언 해주시면 감사하겠습니다.

  • java
  • spring
  • kotlin
  • spring-boot
  • 리팩토링
백엔드 주니어 개발자 댓글 2 좋아요 2 조회수 2379

theme 적용이 되지 않습니다.

해결됨

실전 프로젝트로 배우는 데이터 앱 만들기 with Python & Streamlit

theme 적용시, 강사님께서 말씀해주신 것처럼 작업 폴더에 .streamlit 폴더를 만들고, 그 안에 config.toml 파일을 만들어 테마 적용을 했지만, 아래의 문구가 발생하며, 태마가 적용이 되지 않습니다. The page that you have requested does not seem to exist. Running the app's main page. 어떤 이유 인지 알려주세요.

  • python
  • streamlit
동현고 댓글 1 좋아요 0 조회수 494

레디스에서 락이 필요한 상황에 대하여

미해결

재고시스템으로 알아보는 동시성이슈 해결방법

안녕하세요, 강의를 보고 공부를하다 궁금한 점이 생겨 질문드립니다. 제가 예측한 강의 내용으로는, "경쟁 상태 예시(재고 수량)에 대하여 레디스 를 활용한다." 라고 예측 했습니다. 이에 대하여, "레디스는 싱글 스레드 기반이니깐, 락킹 없이 해당 작업이 가능할 것" 이라고 추측하였는데요, 그러나 제가 생각지 못한 레디스 lock 과 관련된 내용을 접하게 되어 신기하면서도 또 궁금한 부분이 생겨 질문드립니다. 레디스 락 전략이 사용되는 이유와 예시를 조금더 들어볼 수 있을까요? 혹은 이와 관련하여 추가적으로 공부해볼 수 있는 자료를추천해주시면 감사하겠습니다.

  • java
  • spring
  • 동시성
성연 댓글 1 좋아요 0 조회수 500

PageableExecutionUtils.getPage 의 최적화 로직만 따로 뺀 count 메소드입니다.

해결됨

실전! Querydsl

갱신된 강의자료에도 나와 있듯이, fetchResult, fetchCount 등의 메소드는 deprecated 예정입니다. 또한 해당 메소드는 Page 타입을 반환하기 때문에 Page 타입을 직접적으로 조작해야 한다는 제약이 있습니다. 이걸 잘 쓰면 되는데, Page 의 시작번호 등 제약도 있어서 저는 회사에서 Page 를 따로 만들어서 사용하거든요. 그래서 search 메소드와 count 메소드는 항상 분리하고 있습니다. 2. 그런 점에서 count 만 최적화하는 로직만 베껴서 만든 최적화 메소드입니다. 실제로 count 구문을 실행하기 위한 메소드입니다. 필요에 따라서 public 으로 만들어도 될 것 같네요. // count 실행 메소드 private Long countByCond(MemberSearchCond cond) { return query .select(member.countDistinct()) .from(member) .where( usernameEq(cond.getUsername()), teamNameEq(cond.getTeamName()), ageGoe(cond.getAgeGoe()), ageLoe(cond.getAgeLoe()) ) .fetchOne(); } 최적화 로직을 베낀 메소드입니다. 스프링 데이터 JPA 는 아래 코드와 같이 page, size 값이 null 이 아니고, 적절한 범위에 있는지를 판단하여 isPaged 라는 분기를 만듭니다. 참고로 코드를 분석하면서 내린 뇌피셜이니 혹시 틀리다면 말씀해주세요. page 가 0 이 아니라 1 부터 시작하는 건 제 취향입니다. 회사에서 그렇게 쓰고 있거든요. 필요에 따라 0 부터 시작하도록 바꾸는 건 어렵지 않을 것 같습니다. public Long countByCondOptimization(List<?> content, MemberSearchCond cond, Long page, Long size) { boolean isPaged = page != null && size != null && page > 0 && size > 0; long offset = isPaged ? (page - 1) * size : 0L; long contentSize = content.size(); if (!isPaged || offset == 0) { if (!isPaged || size > contentSize) { return contentSize; } return this.countByCond(cond); } if (contentSize != 0 && size > contentSize) { return offset + contentSize; } return this.countByCond(cond); } 이렇게 하여 count 쿼리를 리스트 조회 쿼리와 분리하여 재사용성을 높이면서, 성능도 최적화할 수 있습니다. 감사합니다.

  • java
  • jpa
psam1017 댓글 1 좋아요 3 조회수 807

동적으로 Order 절 만드는 코드 공유합니다

해결됨

실전! Querydsl

강의에서는 Query DSL 4.x 버전이어서 제네릭 없는 예제 코드인 것 같은데, 제가 올리는 버전은 5.0 버전이어서 차이가 있음을 감안해주세요. 정렬 조건을 하나만 추가하는 코드입니다. 정렬 조건을 여러 개 추가하려면 반복문을 돌면서 JPAQuery 를 동적으로 확장해나가면 됩니다. // 페이징하는 메소드에서 사용 private Expression<? extends Comparable<?>> specifyMemberProperty(String prop) { prop = prop == null ? "" : prop.toLowerCase(); if (prop.equals("username")) { return member.username; } if (prop.equals("age")) { return member.age; } return member.id; } // 페이징하는 메소드 // ... .orderBy(new OrderSpecifier<>("desc".equalsIgnoreCase(dir) ? Order.DESC : Order.ASC, specifyMemberProperty(prop))) .fetch(); -- 저는 일단 이렇게 만들어봤는데, 다른 분께서 더 나은 코드, 더 빠른 코드가 있다면 저한테도 알려주세요. 감사합니다.

  • java
  • jpa
psam1017 댓글 0 좋아요 2 조회수 362

mySql DB 는 생성하였는데 테이블이 생성이 안되는 경우가 어떤 게 있을 까요?

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

윈도우로 하려니 참 수업이 쫒아가기 힘드네요. 어찌 어찌 구글링으로 계속 진행하고 있는데요. 도커로 올린 후 DB 는 생성을 했는데 테이블 생성이 안되네요. 2. localhost:4000 로 접속을 하면 화면이 보이지도 않구요. 아..도커 참 그렇네요. ^^: 이것 저것 손 댄 코드 입니다. 14 버전이 안되어서 16버전으로 변경 # 컴퓨터 만드는 설명서 # 1. 운영체제 설치(node 14버전과 npm과 yarn이 모두 설치되어있는 리눅스) FROM node:16 # 2. 내 컴퓨터에 있는 폴더나 파일을 도커 컴퓨터 안으로 복사하기 COPY ./package.json /myfolder/ COPY ./yarn.lock /myfolder/ WORKDIR /myfolder/ RUN yarn install COPY . /myfolder/ # 3. 도커안에서 index.js 실행시키기 CMD yarn start:dev DB 포트 충돌로 3307번 확인 후 3306 번 접근 version: '3.7' services: my-backend: build: context: . dockerfile: Dockerfile volumes: - ./src:/myfolder/src ports: - 4000:3000 env_file: - ./.env.docker my-database: platform: linux/x86_64 image: mysql:latest environment: MYSQL_DATABASE: 'mydocker' MYSQL_ROOT_PASSWORD: '0000' ports: - 3307:3306 도움 좀 부탁드립니다.

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
억수 댓글 2 좋아요 0 조회수 1380

@ManyToOne Category parent 질문 있습니다.

미해결

자바 ORM 표준 JPA 프로그래밍 - 기본편

@ManyToOne @JoinColumn(name = "parent_id") private Category parent; @OneToMany(mappedBy = "parent") private List<Category> child = new ArrayList<>(); 안녕하세요. 위 코드에서 부모 쪽에 다대일 매핑 한 이유를 알고 싶습니다. 아니면 DB 테이블 안에서 부모 셀프 외래 키를 만들어서 조회할 때 이 외래 키를 참조하여 자식 카테고리들까지 같이 조회하게 만들었기 때문에 테이블에서 다는 parent_id니까 jpa에도 parent에 다를 준 건 가 싶기도 해서요 필드 명에 부모 자식이 있어서 부모는 하나고 자식은 여러 개인데 부모 쪽에 다로 돼있어서 헷갈리네요..

  • java
  • jpa
hoonseung 댓글 2 좋아요 0 조회수 569

완전탐색 1090번 시간초과

미해결

2주만에 통과하는 알고리즘 코딩테스트 (2024년)

예제 문제는 잘 풀리는데 백준에 제출하니까 시간초과가 뜹니다 강의 자료랑 큰 차이는 없어 보이는데 어느 부분을 고쳐야 시간 안에 계산 가능할까요? #include <iostream> #include <cstdlib> using namespace std; int main(int argc, char **argv) { int n; int minX, minY, maxX, maxY; cin >> n; int arr[n][2]; for(int i=0; i<n; i++){ cin >> arr[i][0] >> arr[i][1]; } minX = arr[0][0]; maxX = arr[0][0]; minY = arr[0][1]; maxY = arr[0][1]; for(int i=1; i<n; i++){ if(arr[i][0]>maxX){ maxX = arr[i][0]; } else if(arr[i][0]<minX){ minX = arr[i][0]; } if(arr[i][1]>maxY){ maxY = arr[i][1]; } else if(arr[i][1]<minY){ minY = arr[i][1]; } } int arr_answer[n]; int arr_dis[n]; for(int i=minY; i<=maxY; i++){ for(int j=minX; j<= maxX; j++){ for(int l=0; l<n; l++){ int subY= 0, subX=0; subY = i-arr[l][1]; subX = j-arr[l][0]; arr_dis[l] = abs(subX) + abs(subY); } int sum = 0; for(int k=0; k<n; k++){ sum+=arr_dis[k]; if(i==minY && j ==minX){ arr_answer[k] =sum; } else if(sum < arr_answer[k]){ arr_answer[k] = sum; } } } } for(int i=0; i<n; i++){ cout << arr_answer[i] << " "; } return 0; }

  • python
  • 코딩-테스트
  • 알고리즘
yongyong213 댓글 2 좋아요 1 조회수 616

socket.io 사용시 랜덤하게 객체가 emit 됩니다.

해결됨

Slack 클론 코딩[백엔드 with NestJS + TypeORM]

안녕하세요 제로초님~ 백엔드 개발자 지망생이자 제로초님의 팬인 신유빈입니다. 1개월 가량 하기 문제를 구글링 하며 여러 경우의 수를 찾아보았지만 이유를 찾지 못하여 질문드립니다. 질문드리고자 하는 내용은 이렇습니다. socket.io 로 이벤트를 emit 할때, 같은 메서드를 사용함 에도 객체에 따라 클라이언트에 전송될 때도 있고, 전송되지 않을 때도 있는데 그 원인을 찾지 못하고 있습니다. 현재 저는 신규게시물 혹은 댓글이 작성되었을때 모든 사용자에게 알림을 emit 하고자 합니다. 현재 3가지의 경우 중 A만 성공중인 상태입니다. A : 테스트를 위하여 handleConnection 메서드에서 소켓에 연결한 사용자의 정보 객체를 message 로 전송시 성공 B : 게시물 작성 시 생성한 알림 메시지 객체를 message 로 전송시 실패 C: 댓글 작성 시 생성한 알림 메시지 객체를 message 로 전송시 실패 모든 케이스에서 클라이언트에게 메시지를 성공적으로 보내려면 어떻게 해야할지 도움을 주실 수 있을까요? // 실행 동영상 https://youtu.be/AgLmcV53EvM // 코드 깃허브 저장소 전체 코드 https://github.com/fog-of-war/dev-be/blob/zerocho/README.md EventsGateway https://github.com/fog-of-war/dev-be/blob/zerocho/src/events/events.gateway.ts#L55 // fow-be/src/events/events.gateway.ts /** 웹소켓 연결시 */ handleConnection(@ConnectedSocket() socket: Socket, client: any) { const interval = setInterval(() => { const userInfo = socket.userInfo; this.sendMessage(userInfo); }, 5000); socket.on("disconnect", () => { clearInterval(interval); }); } /** 메시지 전송 */ sendMessage(message?: any) { console.log(" \n 🌠 sendMessage \n", message); this.server.emit("message", message); return Promise.resolve("Message sent successfully"); } AlertService https://github.com/fog-of-war/dev-be/blob/zerocho/src/alert/alert.service.ts#L12 // fow-be/src/alert/alert.service.ts // B: 게시물 작성시 실행되는 알림 서비스 코드 async createNotifyAlert(id: number) { const data = { alert_place_id: id, alert_type: "NOTIFY" as Type }; const alert = await this.prisma.alert.create({ data: data }); const result = await this.makePostAlertMessage(id); await this.eventsGateway .sendMessage(result) .then((response) => { // console.log("🌠 Notification sent successfully:", response); }) .catch((error) => { console.error("🌠 Error sending notification:", error); // 전송 실패 또는 오류가 발생한 경우에 실행할 로직을 여기에 추가 }); return result; } // fow-be/src/alert/alert.service.ts // C : 댓글 작성시 실행되는 알림 서비스 코드 async createActivityAlert(id: number) { const data = { alert_comment_id: id, alert_type: "ACTIVITY" as Type }; const alert = await this.prisma.alert.create({ data: data }); const result = await this.makeCommentAlertMessage(id); await this.eventsGateway .sendMessage(result) .then((response) => { // console.log("🌠 Notification sent successfully:", response); }) .catch((error) => { console.error("🌠 Error sending notification:", error); }); return result; } // 출력결과 # A : 클라이언트에 전송 성공 🌠 sendMessage { sub: 2, user_email: 'shin.yubin18@gmail.com', iat: 1695983169, exp: 1695986769 } # B : 클라이언트에 전송 실패 🌠 sendMessage { place_id: 1, place_name: '코엑스', region_name: '강남구', post_id: 65, post_created_at: 2023-09-29T10:27:28.371Z, post_image_url: 'https://fog-of-war.s3.ap-northeast-2.amazonaws.com/랜드마크/1코엑스.jpeg' } # C : 클라이언트에 전송 실패 🌠 sendMessage { user_nickname: '구글신유빈', user_image_url: 'https://fog-of-war.s3.ap-northeast-2.amazonaws.com/defaultProfile.png', comment_id: 15, comment_text: '우왕', comment_created_at: 2023-09-29T10:52:24.960Z }

  • node.js
  • express
  • nestjs
신유빈 댓글 3 좋아요 0 조회수 705

동시성 부분 추가 공부하면서 헷갈리는 부분 질문 드립니다.

해결됨

넓고 얕게 외워서 컴공 전공자 되기

안녕하세요 선생님! 동시성과 병렬성 관련해 기초가 약해 해당 강의를 들으면서 OS 부족한 부분을 많이 알게되어 도움이 많이되고 있습니다. 다름이 아니라 해당 강좌 범위는 벗어나지만.. 구글링해도 명확하게 해결되지 않아 질문 드립니다. 동시성을 구현하는 방법으로 멀티쓰레드 나 코루틴 방법으로 구현을 할 수있고 멀티쓰레드 방법에서 쓰레드 전환 간 context switch가 많기 때문에 오버헤드도 많아 Coroutine 방법을 많이 쓰고 또한 유저가 이벤트루프(스케쥴링)을 app에서 관리한다는 측면에서 디버그가 유용하다 정도로 이해하고 있습니다. 많은 블로그에서 멀티쓰레드보다 코루틴을 소개하면서 동시성 구현시 코루틴을 더 상위(혹은 좋은) 방법으로 서술이 많이 되어 있더라구요. I/O작업이 빈번할 경우 코루틴이 더 유리하다는 이해가 됩니다. 싱글스레드 + async 싱글스레드 멀티스레드 + async 멀티스레드 2개의 구현방법이 레이어가 다르다(thread와 task)보니 4가지 경우의 수를 적용할 수 있는데 실제 동시성을 적용해야되는 상황이면 어떻게 판단하고 최적의 구현방법(4가지 중 선택)을 적용할 수 있을까요? (파이썬 스택을 쓰고 있으며 GIL도 이해하고 있는 상태입니다.) 다시한번 해당 강의와 조금 벗어난 질문드려 죄송합니다. ( _ _ )

  • python
  • 동시성
  • 병렬성
권설민 댓글 1 좋아요 0 조회수 431

res.on('finish')

미해결

탄탄한 백엔드 NestJS, 기초부터 심화까지

안녕하세요 강의 잘 듣고 있습니다. res.on('finish', cb); 이벤트를 걸어뒀다고 가정하고 만약 어떤 request에 의한 비즈니스 로직 수행 중 적당한 예외처리가 되지 못해서 서버가 죽어버리는 로직을 거쳐 res를 쏘는 부분까지 도달하지 못했다면 해당 cb함수는 실행되지 않을거라고 생각했는데 맞을까요? (이렇게 되면.. 어떤 요청에 의해 프로그램이 죽었는지 알기 어려울 것 같다는 생각이 문득 들어서 질문드립니다)

  • node.js
  • mongodb
  • express
  • nestjs
  • ssr
이동현 댓글 1 좋아요 0 조회수 605

redis 질문있습니다.

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

redis를 도커로 설치하는 이유가 따로 있을까요?

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
송원 댓글 2 좋아요 0 조회수 339

예제 프로젝트 상에서의 Kafka 사용시 궁금한점

미해결

실습으로 배우는 선착순 이벤트 시스템

강의 잘 듣고 있습니다. 질문사항이 두개 있습니다. 1. 4강의 [문제점] 영상에서 쿠폰생성 10000개 요청으로 인해 mysql이 1분에 100개의 insert가 가능하다고 가정할 시 '주문생성/회원가입요청이 타임아웃 또는 10분뒤에 실행' 된다고 하셨는데요. 예제로 사용하신 Kafka 사용 예제에서는 Consumer 프로젝트도 어차피 API프로젝트와 같은 DB 를 바라보고 있으므로, 어차피 Kafka를 사용하여도 '주문생성/회원가입요청이 타임아웃 또는 10분뒤에 실행'되지 않나요? 왜 여쭤보냐면, 강의 내에서 Kafka 미사용시 주문생성/회원가입요청의 타임아웃 및 10분뒤 실행에 대한 해결책을 Kafka로 사용하셔서 문의드립니다. 2. 5강의 [Consumer 사용하기] 영상을 보면 API 프로젝트 Consumer 프로젝트가 별개로 존재합니다. 그러므로 API프로젝트의 테스트 케이스가 종료되어도 Consumer 프로젝트는 이미 Kafka로 100개의 데이터가 스트림으로 들어오는 상태이므로, 테스트케이스가 종료 되어도(즉, API프로젝트가 종료되어도) Cunsumer 프로젝트는 종료가 되지 않은 상태 이므로 100개의 쿠폰이 DB에 생성 이 되어야 하는게 아닌지요? 왜 여쭤보냐면, 강의 내에서는 API프로젝트가 종료되면 Consumer 프로젝트도 작업이 멈추는 현상이 있어서 문의드립니다.

  • java
  • docker
  • spring-boot
  • kafka
  • redis
김동건 댓글 2 좋아요 1 조회수 881

brew 명령어를 찾을수 없음

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

몽고 DB root설정하는 부분에서 이런 오류가 나는데 어떻게 해결해야할까요?

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
정건희 댓글 2 좋아요 0 조회수 466

섹션2-8 openWeatherMap API

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

const weatherSearch = function (position) { const openWeatherRes = fetch( `https://api.openweathermap.org/data/2.5/onecall?lat=${position.latitude}&lon=${position.longitude}&appid=4bdfd4f45f4d597908e29058919e8707` ); console.log(openWeatherRes); }; const accessToGeo = function (position) { const positionObj = { latitude: position.coords.latitude, longitude: position.coords.longitude, }; weatherSearch(positionObj); }; const askForLocation = function () { navigator.geolocation.getCurrentPosition(accessToGeo, (err) => { console.log(err); }); }; askForLocation(); fetch 안에 2.5로 변경해도 계속 오류가 떠요 ㅠ 어떻게 해야하나요?

  • javascript
  • node.js
  • express
  • docker
  • tdd
  • rest-api
  • nestjs
김소진 댓글 1 좋아요 1 조회수 275

인기 태그

인프런 TOP Writers

주간 인기글