강의

멘토링

로드맵

BEST
개발 · 프로그래밍

/

백엔드

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

동시성 이슈란 무엇인지 알아보고 처리하는 방법들을 학습합니다.

(4.8) 수강평 314개

수강생 3,500명

  • 최상용

먼저 경험한 수강생들의 후기

이런 걸 배울 수 있어요

  • 동시성 이슈가 무엇인지 알 수 있게 됩니다.

  • 동시성 이슈를 처리하는 방법들을 알게 됩니다.

동시성 이슈 처리도 자신있게! 
간단한 재고 시스템으로 차근차근 배워보세요.

백엔드 개발자라면 
꼭 알아야 할 동시성 이슈 🚩

동시성 이슈를 아시나요? 백엔드 개발자라면 동시성을 고려한 프로그래밍을 반드시 할 줄 알아야 합니다. 막 프로젝트를 시작할 때 동시성 이슈를 고려하지 않은 채로 개발을 시작하게 되면 데이터 정합성이 중요한 상황에서 여러 가지 문제가 발생할 수 있기 때문입니다.

이 강의에서는 동시성 이슈가 무엇이고, 어떤 방식으로 해결할 수 있는지를 알아봅니다. 간단한 재고 시스템을 직접 만들어보면서 동시성 이슈에 대해 알아보고, 문제를 해결하는 방법에 대해 알아봅니다. 자바(Java)와 스프링(Spring)을 막 뗀 초보 백엔드 개발자 여러분께 도움이 되고자 이번 강의를 제작하게 되었습니다. 함께 알아가볼까요?

이런 분들께 추천합니다 💡

게시판은 만들어보았지만, 실무 백엔드 개발에는 어떤 걸 고려해야 하는지 알고 싶은 분 

재고와 같이 데이터 정합성이 중요한 기능을 어떻게 개발해야 하는지 궁금한 분


3-Step으로 해결하는 
재고 시스템 정합성 문제!

DB랑 실제 상품 재고 숫자가 안 맞아요. 
어떻게 하면 좋을까요?

동시성 문제(Concurrency Issue)

문제 해결 #1
Application Level

Application 레벨에서 문제를 해결합니다.

Synchronized 키워드 사용

문제 해결 #2
Database Lock

데이터베이스가 제공하는 Lock을 이용하여 동시성을 제어해 봅니다. 

  • Pessimistic Lock (비관적 락)
  • Optimistic Lock (낙관적 락)
  • Name Lock (네임 락)

Pessimistic Lock 사용

문제 해결 #3
Redis Distributed Lock

Redis(레디스)의 기능을 활용해 동시성을 제어해 봅니다.

  • 라이브러리 비교
  • Redis Cli를 통한 명령어 실습
  • Lettuce 활용하기
  • Redisson 활용하기

Lettuce, Redission 사용


Q&A를 확인해보세요 💬

Q. 이제 자바(Java)를 다 배웠습니다. 이 강의를 들어도 될까요?

이 강의는 스프링(Spring)을 이용하여 게시판을 만들어보신 분들에게 권장합니다. 스프링으로 게시판을 한 번 만들어보신 후에 들으시는 걸 권장합니다.

Q. 이 강의를 들으면 동시성 이슈를 전부 처리할 수 있게 되나요?

상황마다 처리하는 방법이 다르기 때문에 전부 처리할 수 있지는 않습니다. 다만 동시성 이슈가 무엇이고, 어떤 식으로 해결하는지를 배우기 때문에 상황에 따라 응용하는 방법을 기르실 수 있다고 생각합니다.

Q. Node.js를 사용하여 개발하던 현직자입니다. 이 강의를 들어도 될까요?

스프링에 특화된 기능을 많이 사용하지 않기 때문에 자바를 이해하실 수 있다면 들으셔도 괜찮습니다.

이런 분들께
추천드려요

학습 대상은
누구일까요?

  • 동시성 이슈가 무엇인지 잘 모르시는 분

  • 동시성 이슈는 무엇인지 알지만 어떻게 해결해야 하는지 모르시는 분

  • Spring을 이용하여 게시판을 한 번이라도 만들어보신 분

선수 지식,
필요할까요?

  • Java

  • Spring

  • Spring Data Jpa

안녕하세요
입니다.

5,578

수강생

432

수강평

296

답변

4.8

강의 평점

3

강의

안녕하세요. 지식공유자 최상용입니다.

많은 오픈소스에 기여한 경험이 있는 현직 백엔드 개발자입니다.

- Spring Data Mongo Contributor
- querydsl Contributor
- grpc-kotlin Contributor
- ksp Contributor
- mybatis Contributor

커리큘럼

전체

18개 ∙ (1시간 8분)

강의 게시일: 
마지막 업데이트일: 

수강평

전체

314개

4.8

314개의 수강평

  • kanior님의 프로필 이미지
    kanior

    수강평 1

    평균 평점 3.0

    3

    100% 수강 후 작성

    First of all, the class itself was very helpful. However, the class itself was not very informative or had a lot of content, so I had to look up the technologies and terms used and study them while listening. Above all, the text was so small that I couldn't read it unless I viewed it in full screen, so I felt that it was lacking in the basic aspects of a development lecture. In conclusion, I think it was a bit of a waste to pay 20,000 won. I would have been satisfied if you had lowered the price to around 10,000 won or increased the content in more detail. Again, the class itself was very helpful. Thank you.

    • 169developer9973
      지식공유자

      Thank you so much for the detailed review, Kim. I reflected your feedback and increased the font size before re-uploading.

  • sunjune18284435님의 프로필 이미지
    sunjune18284435

    수강평 27

    평균 평점 4.7

    5

    100% 수강 후 작성

    This is an hour long, but it's really informative because you get to touch Docker and try out all the different functions... and the feedback is also good... Who are you...?

    • 169developer9973
      지식공유자

      Seonjun Moon, thank you so much for your great review!

  • hzeen03012134님의 프로필 이미지
    hzeen03012134

    수강평 7

    평균 평점 5.0

    5

    28% 수강 후 작성

    The entire lecture is about an hour long, but it is very well organized and informative!! It was difficult and tricky at first, so it was hard to understand, but I understood a lot after listening to this lecture. I only listened to synchronized, DB lock, and I haven't listened to Redis yet, but I'm looking forward to Redis!!ㅎㅎ Developers who are reading this review, listen because you only need to invest 1 hour!! Of course, the teacher explains for 1 hour, and what I do isn't 1 hour..ㅠㅠ However, I'm personally very satisfied with this lectureㅎㅎ Except for the small font, I liked that it explained the concurrency solution method in an easy and simple way~ Please make the next lecture short and bold, and make the font really big...^^

    • 169developer9973
      지식공유자

      hjin, thank you for the very long review! I also found this topic very difficult when I first encountered it, so I wanted to explain it as easily as possible. I am very proud that you understood a lot through my lecture. As for the writing... I will try to make it bigger from the next lecture.

  • kimty931230634님의 프로필 이미지
    kimty931230634

    수강평 7

    평균 평점 4.7

    5

    50% 수강 후 작성

    It was a lecture that was like a cherry picker of the online lecture world, a lecture that was like a diet package that only contained the necessary things while removing the fat. It was a useful time to learn concurrency easily and quickly through simple examples. The text is a bit small.. ;ㅅ;

    • 169developer9973
      지식공유자

      Thank you, Taeyoung Kim, for the great review :) I wanted to give you as much helpful information as possible while keeping it brief! I will gradually increase the font size. Thank you for taking the class!

  • dongheekim359님의 프로필 이미지
    dongheekim359

    수강평 50

    평균 평점 5.0

    5

    50% 수강 후 작성

    The lecture is really good. I hope other developers will listen to it. Please give me other good lectures that will be helpful in my work in the future. Stay healthy and happy~

    • 169developer9973
      지식공유자

      Thank you so much for the great review, Donghee Kim! I hope you stay healthy and happy, Donghee Kim!!

₩19,800

최상용님의 다른 강의

지식공유자님의 다른 강의를 만나보세요!

비슷한 강의

같은 분야의 다른 강의를 만나보세요!