Detailed Information

Cited 0 time in webofscience Cited 0 time in scopus
Metadata Downloads

옵저버 패턴에서 Kotlin 흐름 API의 도출Derivation of Kotlin Flow API from Observer Pattern

Other Titles
Derivation of Kotlin Flow API from Observer Pattern
Authors
김정선
Issue Date
Sep-2023
Publisher
한국정보과학회
Keywords
코틀린 흐름; 코루틴; 설계 패턴; 리액티브 스트림; Kotlin flow; Kotlin coroutine; design pattern; reactive stream
Citation
정보과학회논문지, v.50, no.9, pp 821 - 826
Pages
6
Indexed
KCI
Journal Title
정보과학회논문지
Volume
50
Number
9
Start Page
821
End Page
826
URI
https://scholarworks.bwise.kr/erica/handle/2021.sw.erica/115945
DOI
10.5626/JOK.2023.50.9.821
ISSN
2383-630X
2383-6296
Abstract
Kotlin 흐름은 비동기식 리액티브 스트림 데이터 처리를 위해 Kotlin 코루틴의 중단 함수를 기반으로 개발된 라이브러리이다. 그동안 널리 사용되어 왔던 무거운 라이브러리인 RxJava와는 달리 Kotlin 흐름은 코루틴의 중단 함수를 통해 자연스런 역압력 기능을 제공하기 때문에 최근 들어 리액티브 응용프로그램 개발 시 그 활용도가 높아지고 있다. 그럼에도 불구하고, 프로그래머는 흐름 API의 동작을 이해하는 데 어려움을 겪고 있는데, 이는 리액티브한 흐름 API의 동작이 일반적 API에 비해 익숙하지 않기 때문일 수도 있지만 흐름 API가 옵저버 패턴을 기본으로 하고 있다는 사실을 인지하지 못하고 있는 점 또한 주요 원인이라고 할 수 있다. 본 논문에서는 옵저버 패턴으로부터 흐름 API가 도출되는 과정을 단계별로 제시함으로써 Kotlin 흐름 API가 옵저버 패턴과 Kotlin 코루틴에 기초하여 정의되었으며, 이를 기반으로 리액티브 스트림 기능을 제공하고 있음을 보여준다.
Kotlin Flow is an asynchronous reactive stream library developed on top of Kotlin coroutine’s suspending functions. Recently, many reactive applications have increasingly adopted the Kotlin Flow instead of the well-known, but nevertheless heavy-weight, RxJava because it provides back-pressure support naturally by using coroutine’s suspending functions. However, the workings of the Flow API are difficult for most programmers to understand. One of the main reasons is due to the ignorance of the fact that its API is originated from the Observer Pattern, as well as its inherent reactive nature. In this paper, we show that Kotlin Flow API is nothing but a reactive version of the adapted Observer Pattern, together with Kotlin coroutines, by step-by-step illumination of how its API is derived from both the Observer Pattern and Kotlin’s coroutine.
Files in This Item
Appears in
Collections
COLLEGE OF COMPUTING > ERICA 컴퓨터학부 > 1. Journal Articles

qrcode

Items in ScholarWorks are protected by copyright, with all rights reserved, unless otherwise indicated.

Related Researcher

Researcher Kim, Jung sun photo

Kim, Jung sun
ERICA 소프트웨어융합대학 (ERICA 컴퓨터학부)
Read more

Altmetrics

Total Views & Downloads

BROWSE