Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Akka Streamsの縮退処理を用いた耐障害性の実現 〜 広告のリアルタイムオークションの...

Akka Streamsの縮退処理を用いた耐障害性の実現 〜 広告のリアルタイムオークションの事例 〜

「Scala将軍達の後の祭り」での発表資料です。

http://scala-syogun-matsuri.connpass.com/event/28124/

Ikuo Matsumura

March 26, 2016
Tweet

More Decks by Ikuo Matsumura

Other Decks in Programming

Transcript

  1. ࣗݾ঺հ @ikuo (Ikuo Matsumura) 2008~ ૊ࠐܥͷ෼ࢄγϛϡϨʔγϣϯͷઃܭ։ൃͳͲ; C++, MATLAB IBM Research

    - Tokyo 2011~ ϨγϐӫཆՁͷࣗಈܭࢉͷઃܭ։ൃͳͲ; Ruby/Rails, Treetop Cookpad, Inc. 2014~ SSP/RTBΦʔΫγϣϯͷઃܭ։ൃͳͲ; Scala/Akka CyberAgent, Inc. CA ProFit-X team
  2. ଟ਺ͷ֎෦઀ଓͷো֐͔ΒγεςϜΛकΓ͍ͨ * Photo by FEMA/Joselyne Augus5no; A home in Gilchrist,

    Texas, designed to resist flood waters survived Hurricane Ike in 2008.
  3. ִนϊʔυ (bulkhead) val bulkhead = Flow .apply[MyMessage] .buffer( bulkheadBufferSize, OverflowStrategy.dropHead

    ) όοϑΝͷ࠷େαΠζΛ௒͑Δͱɺݹ͍ϝοηʔδ ΛࣺͯΔ ( dropHead )
  4. ௨৴ϊʔυ (subscriber) val subscriberA = Sink(ActorSubscriber[MyMessage](actorA)) class ProxyA extends Actor

    with ActorSubscriber { def receive = { case OnNext(msg: MyMessage) => hostConnector .ask(httpReq(msg)) .map(...) .onComplete(request(1)) ... ֎෦ཁٻͷ׬ྃΛ଴͔ͬͯΒ࣍ͷϝοηʔδΛ্ྲྀ (bulkhead) ʹཁٻ͢ΔͷͰɺ֎෦ཁٻͷաఔͷͲ͕͜ ཯଎ʹͳͬͯ΋ϝʔϧϘοΫε͕ᷓΕͳ͍