전체 글
-
Kotlin Coroutines 톺아보기세미나, 영상 요약정리 2022. 12. 28. 00:01
https://www.youtube.com/watch?v=eJF60hcz3EU 당근마켓 로컬 커머스팀의 김태우님의 Kotlin Coroutines 톺아보기를 보고 요약한 내용입니다. 동기 [그림 1]은 동기적으로 실행되는 코드입니다. 비동기로 변환 [그림 2]은 비동기 코드입니다. 한번에 이해하기 힘들며 추적이 어렵고, 에러 핸들링이 어렵습니다. 다양한 비동기 라이브러리 또한 다양한 비동기 라이브러리가 존재하며 어떤 것을 사용해야 할지, 혼용해서 사용하기 위해서는 어떻게 사용해야 할지, 또 다른 비동기 라이브러리가 추가된다면 어떻게 해야 할지 고민하게 됩니다. rxjava3의 Maybe jdk9의 Flow reactor의 Flux mutiny의 Multi jdk8의 CompletableFuture 이런 ..
-
Kotlin DSL Gradle 멀티 모듈 적용프로젝트/자프링 -> 코프링 마이그레이션 2022. 12. 27. 00:01
기존 프로젝트의 패키지 구조 기존 프로젝트는 [그림 1]처럼 하나의 단일 모듈 기반의 프로젝트로 구성되어 있습니다. build.gradle.kts에서 의존성이 관리되며 main폴더 아래에 모든 코드들이 들어가 있습니다. 이러한 구조를 멀티모듈으로 변환하고자 합니다. Why 멀티모듈? 현재는 단일 프로젝트이며 외부에 노출되는 external-api들만 존재합니다. 제공되는 기능 예시 - 사용자는 게시글을 쓸 수 있다 - 사용자는 로그인을 할 수 있다 - 사용자는 회원가입을 할 수 있다 이 상황에서 멀티 모듈을 도입하더라도 큰 의미가 없을 수 있습니다. 하지만 만약 내부에서만 사용하는 internal-api 관리자 api가 존재할 경우 이야기가 달라질 수 있습니다. 다른 프로젝트에서 internal-api를..
-
아이템1 - 가변성을 제한하라Kotlin/Effective Kotlin 요약 2022. 12. 26. 00:01
Kotlin에서는 read-write property인 var을 사용하거나, mutable 객체를 사용하면 상태를 가질 수 있습니다. var a = 10 var list: MutableLost = mutableListOf() 상태를 가지는 경우는 양날의 검입니다. 장점 : 시간의 변화에 따라서 변하는 요소를 표현할 수 있다. 단점 : 상태를 적절하기 관리하는 것은 어렵다 1. 어디서 변경이 일어났는지 추적하기 힘들다. 2. 어떤 값을 가지고 있는지 알아야 코드의 실행을 예측할 수 있습니다 (예를 들어 분기문이 있을 때) 3. 멀티스레드 프로그래밍일 때는 적절한 동기화가 필요합니다. (Lock, 원자적 연산 등) 4. 테스트하기 어렵습니다 (모든 상태를 테스트해야 합니다, 상태가 늘어나면 더 힘들어집니다)..
-
[AWS] AWS MediaConvert Jobtemplate Kotlin SDK 적용AWS 2022. 12. 25. 00:01
[1] [AWS] MediaConvert란? + 튜토리얼 [2] [AWS] AWS MediaConvert createJob Kotlin SDK 적용 [3] [AWS] AWS MediaConvert Jobtemplate Kotlin SDK 적용 개요 이전에 MediaConvert createJob Kotlin SDK 적용까지 해서 job이 생성되는 것까지 확인했습니다. 이제 DRM을 추가로 적용해보고 createJob을 하기위해 너무 많은 옵션이 필요하기 때문에 Jobtemplate을 통해 job을 생성해보고자 합니다. DRM 도입 "mediaconvert kotlin sdk drm" 다음과 같은 검색을 해봐도 자료가 나오지 않습니다. MediaConvert Job의 detail page에서 View JS..
-
[AWS] MediaConvert createJob Kotlin SDK 적용AWS 2022. 12. 24. 00:01
[1] [AWS] MediaConvert란? + 튜토리얼 [2] [AWS] AWS MediaConvert createJob Kotlin SDK 적용 [3] [AWS] AWS MediaConvert Jobtemplate Kotlin SDK 적용 개요 위의 예제에서 AWS Console을 통해 MediaConvert의 job을 생성하는 작업을 수행하였습니다. 이번에는 Spring, Kotlin과 AWS MediaConvert SDK를 활용하여 job을 생성해보도록 하겠습니다. AWS Kotlin MediaConvert SDK 문서를 기반으로 작성해보겠습니다 mediaconvert build.gradle.kts 링크 mediaconvert CreateJob.kt 링크 Dependency 추가 dependenc..
-
스프링과 스트리밍 서버프로젝트/미디어 스트리밍 서버 프로젝트 2022. 12. 23. 00:01
https://junuuu.tistory.com/467 스트리밍 서버란? 스트리밍이란? 스트리밍이란 인터넷(네트워크)을 바탕으로 사용자에게 각종 비디오, 오디오등의 멀티미디어 디지털 정보를 제공하는 기술로 인터넷에서 영상 및 음향 등의 파일을 다운로드 없 junuuu.tistory.com 이전시간에 스트리밍 서버에 대해서 알아보고 멀티미디어 전송방식에 대해서 알아보았습니다. 개요 각 전송방식에 대해 스프링을 활용하여 어떻게 구현할 수 있는지 알아보겠습니다. HTML5(video) + Spring Boot : Progressive download HTML5 태그 중 VIDEO 태그를 사용하여 웹에서 동영상을 플레이하는 기능입니다. HTML 소스에서는 아래와 같이 호출합니다. ... not use video..
-
8장 - 분산 시스템의 골칫거리CS/데이터 중심 애플리케이션 설계 요약 2022. 12. 22. 00:01
개요 복제 서버 장애 복구, 복제 지연, 트랜잭션의 동시성 제어를 설명하며 시스템이 잘못된 것을 처리하는 방법에 대해 다루었습니다. 하지만 현실은 훨씬 더 암울합니다. 이제는 최대한 비관적으로 어떤 것이든지 잘못된 가능성이 있다면 잘못된다고 가정합니다. 이번장에서는 분산 시스템에서 네트워크 관련 문제와 시계 및 타이밍 문제를 조사하고 어느 정도로 회피할 수 있는지 설명합니다. 결함과 부분 장애 가끔 “운수 나쁜 날” 재부팅하면 흔히 고쳐지는 것처럼 보이지만 보통 잘못 작성한 소프트웨어의 결과입니다. CPU 인스트럭션을 항상 같은 일을 하고 메모리나 디스크에 데이터를 쓰면 온전하게 남아 있고 제멋대로 오염되지 않습니다. 물리적 세계에서는 매우 광범위한 것들이 잘못될 수 있습니다. 네트워크 분단, 전원장애,..
-
16장 - 독립성클린 코드(Clean Code)/클린 아키텍처요약 2022. 12. 21. 00:01
좋은 아키텍트는 다음을 지원해야 합니다. - 시스템의 유스케이스 - 시스템의 운영 - 시스템의 개발 - 시스템의 배포 유스케이스 아키텍트는 시스템의 의도를 지원해야 합니다. 예를 들어 시스템이 장바구니 애플리케이션이라면 장바구니와 관련된 유스케이스를 지원해야 합니다. 만약 좋은 아키텍처를 갖춘다면 해당 시스템의 유스케이스는 시스템 구조 자체에서 한눈에 드러날 것입니다. 이들 행위는 일급 요소이며 시스템의 최상위 수준에서 알아볼 수 있으므로 개발자가 일일이 찾아 헤매지 않아도 됩니다. 운영 시스템이 초당 100,000명의 고객을 처리해야 한다면, 아키텍처는 이 요구와 관련된 각 유스케이스에 걸맞은 처리량과 응답 시간을 보장해야 합니다. 이런 형태를 지원하기 위한 시스템은 다양한 의미를 지닙니다. - 시스템..