๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

iOS/Reactive Programming

(1)
[Combine] ๊ฐœ์š” ๋ฐ Publisher ์™€ Subscriber์˜ ๊ฐœ๋…, Combine์˜ ์žฅ์  Combine์„ ์•Œ๊ธฐ ์ „์—, Functional Reactive Programming์ด ์–ด๋–ค ๋งฅ๋ฝ์—์„œ ๋‚˜์™”๋Š”์ง€ ์ดํ•ดํ•  ํ•„์š”๊ฐ€ ์žˆ๋‹ค. ํ”„๋กœ๊ทธ๋ž˜๋ฐ ํŒจ๋Ÿฌ๋‹ค์ž„์€ Low Memory → Mass Production → Concurrency ์™€ ๊ฐ™์€ ๋งฅ๋ฝ์œผ๋กœ ๋ณ€ํ™”ํ•ด์™”๋Š”๋ฐ. ํ˜„์žฌ๋Š” Concurrency ๋‹จ๊ณ„๋กœ ์—ฌ๋Ÿฌ๊ฐœ์˜ ์Šค๋ ˆ๋“œ์—์„œ ์ž‘์—…์ด ์ด๋ฃจ์–ด์ง€๊ณ  ์žˆ๋Š” ํŒจ๋Ÿฌ๋‹ค์ž„์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. ๊ทธ๋Ÿฌ๊ธฐ์— Side Effect๊ฐ€ ์žˆ์„ ์ˆ˜๋ฐ–์— ์—†์—ˆ๊ณ , ๊ทธ๋Ÿฌ๊ธฐ์— Pure Function์„ ์‚ฌ์šฉํ•˜๋Š” Functional ํŒจ๋Ÿฌ๋‹ค์ž„์ด ๋‚˜ํƒ€๋‚  ์ˆ˜ ๋ฐ–์— ์—†์—ˆ๋‹ค.๊ทธ๋ฆฌ๊ณ  async ํ•œ ์ƒํ™ฉ์—์„œ asyncํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์–ด๋–ป๊ฒŒ ์ฒ˜๋ฆฌํ•  ๊ฒƒ์ธ๊ฐ€? ์— ๋Œ€ํ•œ ๋Œ€๋‹ต์œผ๋กœ stream ์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ํ˜๋ ค๋ณด๋‚ด์ž๋Š” Reactive Programming์ด ๋‚˜์˜ค๊ฒŒ ๋˜์—ˆ๋‹ค.Comb..