전체 글
-
Java Native Memory Leak 원인을 찾아서 - 토스(박동호)세미나, 영상 요약정리 2022. 7. 1. 00:01
https://www.youtube.com/watch?v=w4fWgLgop5U 토스 페이먼츠의 서버 개발을 맡고 있는 박동호님의 영상을 보고 요약한 내용입니다. JIT 컴파일러와 JVM GC에 대한 이야기가 조금씩 나오기 때문에 최소한 다음 글의 JIT 컴파일러 부분만 보시더라도 읽는데 도움이 되실 것 같습니다. https://junuuu.tistory.com/126?category=989459 [Java] JVM(Java Virtual Machine)의 모든것을 알아보자 JVM이란? Java Virtual Machine의 약자로 자바 가상 머신이라고 불립니다. 자바와 운영체제 사이에서 중계자 역할을 합니다. 따라서 자바가 운영체제 종류에 영향받지 않고 돌아갈 수 있도록 합니다. =( junuuu.tis..
-
@Transactional은 auto_increment를 초기화 하지 못한다프로젝트/게시판 프로젝트 2022. 6. 30. 02:21
프로젝트의 테스트를 작성하던 도중 Unique 한 PK값이 존재하지 않아 auto_increment 되는 값을 통해 조회해야 하는 일이 발생하였습니다. 저는 @BeforeEach 어노테이션이 매번 호출되도록 설정하여 repository를 새로 초기화했으며 @Transcational 어노테이션이 @DataJpaTest 안에 들어있어 1개의 데이터를 넣어주면 1L을 조회하면 될 것이라고 생각하였습니다. @BeforeEach void setUp() { boardService = new BoardServiceImpl(boardRepository); } 하지만 @Transactional 어노테이션은 테이블에 대한 롤백은 시켜주나, auto-increment에 대한 롤백은 되지 않았습니다. 즉, auto-incre..
-
kafka 조금 아는 척하기세미나, 영상 요약정리 2022. 6. 30. 00:01
https://www.youtube.com/watch?v=0Ssx7jJJADI&list=PLwouWTPuIjUgr29uSrSkVo8PRmem6HRDE&index=4&t=4s 최범균님의 카프카 조금 아는척하기 영상 시리즈 1,2,3 + 공식문서의 내용을 요약한 내용입니다. 카프카란? 카프카 공식 페이지로 가면 카프카를 다음과 같이 소개하고 있습니다. 분산 이벤트 스트리밍 플랫폼 고성능 100개 중의 80개 이상의 회사가 사용한다 이벤트 스트리밍이란? 어떤 하나의 사건을 이벤트라고 정의하며 이를 레코드 또는 메시지라고도 합니다. 카프카에서는 데이터를 읽거나 쓸 때 이벤트 단위로 작동합니다. 이벤트 스트리밍은 DB, 센서, 모바일 장치 등과 같은 이벤트 소스에서 이벤트 스트림 형태로 카프카의 구성요소 카프카는..
-
인터셉터를 활용한 인증/인가 공통처리프로젝트/게시판 프로젝트 2022. 6. 29. 02:40
로그인을 할 때 사용자에게 "access-token"을 제공합니다. 게시글 작성을 위해서는 클라이언트의 HTTP 헤더의 "access-token"에서 token값을 가져와서 검증하고 토큰이 유효하다면 게시글을 작성하는 로직입니다. 코드로 보면 다음과 같습니다. @PostMapping public ResponseEntity posting(@Valid @RequestBody BoardRequestDTO boardRequestDTO, HttpServletRequest request) { String token = request.getHeader("access-token"); if (!jwtService.isUsable(token)) { return ResponseEntity.status(HttpStatus.U..
-
도커란? +(도커 이미지란?)MSA & 쿠버네티스(Kubernetes) - k8s 2022. 6. 29. 00:01
도커란? 컨테이너 기반의 오픈소스 가상화 플랫폼입니다. 컨테이너와 가상 머신의 가장 큰 차이는 OS를 공유하느냐 하지 않느냐의 차이입니다. 컨테이너는 OS를 공유하기 때문에 가상 머신보다 효율적입니다. 나는 지금 만약 컨테이너, 가상화에 대해 잘 모르겠다고 하신다면 생활코딩의 Docker 영상을 한번 보고 오시면 좋을 것 같습니다 생활코딩 Container 설명 : 4분영상 https://www.youtube.com/watch?v=Ps8HDIAyPD0&list=PLuHgQVnccGMDeMJsGq2O-55Ymtx0IdKWf 컨테이너 가상화 기술을 사용하는 이유를 간단하게 설명하자면 각 프로그램들(Sever, DB 등)을 격리된 OS 환경에서 실행하고 싶으며 자원을 효율적으로 사용하기 위해서 가상화 -> 컨..
-
애자일이 도대체 뭐야?세미나, 영상 요약정리 2022. 6. 28. 02:35
애자일은 개발 방법론 중 하나입니다. 애자일에 대해 알아보기 위해 소프트웨어 개발 방법론에 대해서 먼저 알아보겠습니다. 소프트웨어 개발 방법론 소프트웨어를 개발하는 방법에 대한 이론으로서, 소프트웨어 개발 과정, 절차 방법 등을 체계적으로 정리하고 표준화시킨 것입니다. 이러한 개발 방법론에는 폭포수, 애자일, 나선, 프로토타입 등 다양한 방법론이 존재합니다. 이들 중에서 가장 유명한 2가지인 폭포수 방법과 애자일 방법에 대해서 알아보겠습니다. 전통적인 방법 : 폭포수 개발 방법론 위의 그림에서도 알 수 있듯이 소프트웨어 개발 단계가 위에서부터 아래로 폭포에서 물이 떨어지듯이 순차적으로 진행됩니다. 이전 단계로 거슬러 올라가는 것을 최소화하며 진행하며 다음 단계로 가기 전에 완벽하게 요구사항을 반영하여 개..
-
[백준] 16566번 : 카드 게임 - 자바(JAVA)알고리즘/백준 2022. 6. 28. 00:01
https://www.acmicpc.net/problem/16566 16566번: 카드 게임 첫째 줄에 세 개의 자연수 N, M, K가 주어진다. (1 ≤ M ≤ N ≤ 4,000,000, 1 ≤ K ≤ min(M, 10,000)) 다음 줄에 카드의 번호를 나타내는 M개의 자연수가 주어진다. 각각의 수들은 1 이상이고 N 이하이며 서로 www.acmicpc.net 문제 해석 철수와 민수는 카드 게임을 즐겨한다. 1. N개의 빨간색 카드가 있으며 1부터 N까지 번호가 매겨져 있다. 2. N개의 파란색 카드가 있으며 1부터 N까지 번호가 매겨져 있다. 3. 철수는 빨간색 카드를 가지고 민수는 파란색 카드를 가진다. 4. 철수와 민수는 고른 카드 중 1장을 뒤집어진 상태로 낸다. 5. 카드 번호가 큰 사람이 ..
-
[백준] 1799번 : 비숍 - 자바(JAVA)알고리즘/백준 2022. 6. 27. 00:01
https://www.acmicpc.net/problem/1799 1799번: 비숍 첫째 줄에 체스판의 크기가 주어진다. 체스판의 크기는 10이하의 자연수이다. 둘째 줄부터 아래의 예와 같이 체스판의 각 칸에 비숍을 놓을 수 있는지 없는지에 대한 정보가 체스판 한 줄 단위로 www.acmicpc.net 문제 해석 서양 장기인 체스에 대각선 방향으로 움직일 수 있는 비숍이 있습니다. 비숍의 위치라 B라고 했을 때 다음 그림처럼 움직일 수 있습니다. 이때 색칠된 부분에는 비숍을 놓을 수 없지만 지나갈 수는 있다고 하겠습니다. 이와 같은 체스판에 서로가 서로가 잡을 수 없는 비숍을 놓는다면 최대 7개의 비숍을 넣을 수 있습니다. 비숍의 최대 개수를 구하는 프로그램을 작성하세요. 체스판의 크기는 10 이하의 자..