Reactive Programming in Scala 5 – Actor

Coursera 의 Reactive Programming In Scala 수업 중 5 번째 챕터입니다. Actor 는 원래 1973년에 인공지능 연구를 위해 개발되었는데, 1995년에는 Erlang/OTP 에서 텔레커뮤니케이션 플랫폼을 위해 사용되기도했다. 2006년에는 스칼라 스탠다드 라이브러리로 구현되었고, 2009년에는 Akka 가 만들어졌다. Why Actors? 액터가 왜 필요한지를 기존의 스레드를 사용하는 방법과 비교해 알아보자. 지난번에 배웠던 bank account 예제를 들고오면 class BankAccount { private … Continue reading Reactive Programming in Scala 5 – Actor

Reactive Programming in Scala 4 – Observable, Rx, Scheduler

Coursera 의 Reactive Programming In Scala 수업 중 4 번째 챕터입니다. 지난시간엔 단일 데이터에 대해 latency 를 지원하는 Future, Promise 에 대해서 알아봤다. 이번에는 컬렉션에서 latency 를 지원하는 방법인 Observable 을 배워보자. One Many Synchronous T/Try[T] Iterable[T] Asynchronous Future[T] Observable[T] From Futures to Observables Future 의 정의를 다시 보면, trait Future[T] { def onComplete[U](f: Try[T] => … Continue reading Reactive Programming in Scala 4 – Observable, Rx, Scheduler

Reactive Programming in Scala 3 – Try, Future, Promise

Coursera 의 Reactive Programming In Scala 수업 중 3 번째 챕터입니다. Try, Future, Promise 이번시간엔 Try, Future, Awaitable, Async, Promise 에 대해 알아본다. 모나드가 삶을 윤택하게 하리라 Monads and Effects 프로그래밍에서 4가지 본질적 effects 는 One Many Synchronous T/Try[T] Iterable[T] Asynchronous Future[T] Observable[T] asynchoronous computation 을 살펴보기전에 synchronous 부터 살펴볼건데 간단한 어드벤쳐 게임으로 시작하자. trait Adventure … Continue reading Reactive Programming in Scala 3 – Try, Future, Promise

Reactive Programming in Scala 2 – Stateful Object

Coursera 의 Reactive Programming In Scala 수업 중 2 번째 챕터입니다. Stateful Object 지금까지 우리가 작성한 프로그램은 side-effect free 였기 때문에, time 이 중요한 요소가 아니였다. 무슨말인고 하니, 모든 프로그램은 sequence of actions 에 대해 항상 같은 결과를 주게 되어있었다. 이건 substitution model 에 반영되어 있다. Substitution Model substitution model 을 복습해 보면, 프로그램의 evaluation 은 … Continue reading Reactive Programming in Scala 2 – Stateful Object

Reactive Programming in Scala – 1

Coursera 의 Reactive Programming In Scala 수업 중 1 번째 챕터입니다. Monad, Generator What is Reactive Programming? reactive 란 뜻은 React to events (event-driven) React to load (scalable) React to failures (resilient) React to users (responsive) Event-driven event-driven 을 통해 scalable, resilient 해질 수 있고, 이 3가지를 통해 responsive 한 서비스를 만들 수 있다. 옛날에는 시스템이 … Continue reading Reactive Programming in Scala – 1