전체 글
-
어느 날 고민 많은 주니어 개발자가 찾아왔다 - 김영한세미나, 영상 요약정리 2022. 10. 10. 00:01
인프콘 2022 김영한님의 발표를 요약한 내용입니다. https://www.inflearn.com/course/infcon2022 [무료] 인프콘 2022 다시보기 - 인프런 | 강의 인프런의 첫 오프라인 콘퍼런스, 인프콘 2022에서 진행된 오프닝 및 발표 세션을 영상으로 다시 보실 수 있습니다., - 강의 소개 | 인프런... www.inflearn.com 취업 가고 싶은 회사들을 1,2,3티어로 정리 1 티어 회사들이 사용하는 기술 조사 후 같은 기술을 사용하는 2,3 티어 회사 정리 성장할 수 있는 환경 개발, 운영, 개선 사이클을 경험해볼 수 있는 회사 즉, 본인 제품을 만드는 회사로 가야 성장을 할 수 있고 트래픽이 많으면 더 좋습니다. 채용은 확률이고, 잘하는 개발자의 TO는 무제한이다. 이..
-
개편의 기술 - 배달 플랫폼에서 겪은 N번의 개편 경험기 - 권용근세미나, 영상 요약정리 2022. 10. 9. 00:01
인프콘 2022 다시 보기의 권용근님의 발표를 요약한 내용입니다. https://www.inflearn.com/course/infcon2022 [무료] 인프콘 2022 다시보기 - 인프런 | 강의 인프런의 첫 오프라인 콘퍼런스, 인프콘 2022에서 진행된 오프닝 및 발표 세션을 영상으로 다시 보실 수 있습니다., - 강의 소개 | 인프런... www.inflearn.com 개편의 기술 제 1장 의존성을 한 방향으로 정리하라 사이드 이펙트가 어디서 발생하는지 추측하기 어려워서 개편의 하기 어려운 상황입니다. 따라서 의존성을 한 방향으로 관리하여 문제가 발생했을 때 원인을 추척하는것이 가능해집니다. 제2장 변경 대상에 대한 경계를 나눈다. 레이어드 아키텍처처럼 Controller, Service , Repo..
-
리팩토링에 대하여프로젝트/미디어 스트리밍 서버 프로젝트 2022. 10. 8. 00:01
개요 1주차 스프린트에서는 한번도 해보지 못했던 미디어 서버를 구축하기위해 달렸습니다. 또한 그 과정속에서 Git에 익숙해지며, Covention을 정하는 등 공동의 목표를 위한 계획을 세워나갔습니다. 그러나 기능 구현에 포커스를 맞춘 만큼 코드 품질은 조금 떨어지게 되었습니다. 하지만 이러한 점을 인지한 상태로 기술 부채를 쌓아나갔으며 스프린트 2에서는 코드 품질을 향상하고자 합니다. 다음과 같은 문제점들을 인지하고 있었습니다. 부적합해 보이는 변수명/함수명 너무 많은 일을 하는 메서드 떨어지는 가독성 반복 되는 코드 테스트하기 어려운 코드 부족한 테스트 코드 리팩터링이 필요한 이유는? 고객의 모든 요구사항을 예측하고 논리적으로 완벽한 소프트웨어를 단번에 설계하는 것은 거의 불가능에 가까운 일입니다. ..
-
Kotlin 동시성 테스트하기프로젝트/미디어 스트리밍 서버 프로젝트 2022. 10. 7. 00:01
개요 Multi Thread 환경에서 데이터의 정합성을 보장할 수 있는지 확인하고자 합니다. 코틀린 공식문서를 기반으로 학습해 보겠습니다. https://kotlinlang.org/docs/multiplatform-mobile-concurrency-overview.html Concurrency overview | Kotlin kotlinlang.org 규칙 1 : 변경 가능한 상태라면 1개의 스레드에서 동작해야 합니다. data class SomeData(var count:Int) fun simpleState(){ val sd = SomeData(42) sd.count++ println("My count is ${sd.count}") // It will be 43 } 위의 메서드 처럼 상태를 가지는 경우..
-
JPA 연관관계 Paging 최적화프로젝트/미디어 스트리밍 서버 프로젝트 2022. 10. 6. 00:01
개요 @OneToOne과 @Embedded를 고민하던 중 만약 하나의 Column에서 업데이트가 빈번하게 일어난다면 row lock이 발생할 수 있기 때문에 그 칼럼을 다른 테이블로 분리하는 방법이 존재한다는 것을 알게 되었습니다. Row Lock row lock은 테이블의 각 행에 걸리며 read를 위한 S-lock, select.. for update, update, delete 등의 wirte에 걸리는 X-lock으로 구분됩니다. 트랜잭션의 동시성을 최대한 보장하기 위해서 Lock을 활용합니다. 이때 S lock을 사용하는 쿼리끼리는 같은 row에 접근 가능합니다. 반면, X lock이 걸린 row는 다른 어떠한 쿼리도 접근 불가능합니다. Video Entity Video Entity는 비디오에 대..
-
@TestConfiguration 설정하기프로젝트/미디어 스트리밍 서버 프로젝트 2022. 10. 5. 00:01
개요 인터셉터를 설정하던 도중에 secretKey를 관리해야 해서 application.properties에서 주입받아서 사용하려고 했습니다. @Configuration("WebConfig") class WebConfig : WebMvcConfigurer { @Value("\${interceptor.secretKey}") lateinit var secretKey: String override fun addInterceptors(registry: InterceptorRegistry) { registry.addInterceptor(AdminInterceptor(secretKey)) .addPathPatterns("/admin/**/") } } class AdminInterceptor(var secretKey..
-
@Transactional 롤백과 @TransactionalEventListener프로젝트/미디어 스트리밍 서버 프로젝트 2022. 10. 4. 00:01
개요 비동기 EventListener를 다루면서 예외처리를 하던 중 고민했던 일들을 적어보고자 합니다. @Transactional을 사용하는 메서드 예시 @Transactional public void function(request: UploadRequest) { val registeredVideo = videoService.registerVideo(request) // 1. request DB 저장 applicationEventPublisher.publishEvent(); // 2. 이벤트 발생 throw IOException() //예외 발생 return registeredVideo //A 반환 } 로직을 간소화하면 다음과 같습니다. 이때 과연 중간에 throw IOException()을 넣으면 롤백..
-
@Embedded vs @OneToOne프로젝트/미디어 스트리밍 서버 프로젝트 2022. 10. 3. 00:01
개요 현재 Video, Url, Metadata로 테이블을 관리하고 있습니다. 3가지 테이블을 하나의 단일 테이블로 관리해도 되지만 각각의 의미들을 나누기 위해 3개의 테이블로 분리하여 1:1 연관관계로 매핑했습니다. 이때 @Embedded를 사용해서 값 타입처럼 사용하는 것과 @OneToOne을 사용하는 것에 대해 어떤 차이가 있을지 궁금해져 찾아보려고 합니다. @Embedded와 @OneToOne의 차이 @Embedded - 실제 table은 쪼개지지 않지만 개발자가 볼 때는 쪼개 볼 수 있습니다. - parent가 update나 delete될 때 생명주기를 같이 합니다. @OneToOne - 실제로 테이블을 분리되어 있습니다. - cascadeType 옵션을 통해 생명주기를 같이 할 수 있지만 부모..