SlideShare una empresa de Scribd logo
1 de 33
Scala Conference in Japan 2013
Data Stream Processing and Analysis with
Akka




 CyberAgent Inc., Ameba Technology Laboratory
 ○ Roman Y. Shtykh, Mitsuharu Makita
株式会社サイバーエージェント
                                               2




Self Introduction
      シュティフ・ロマン

•   Roman Y. Shtykh
•   R&D Engineer
•   Ameba Technology Lab
•   Interests:
    • Distributed Computing
    • Information Retrieval
株式会社サイバーエージェント
                                                               3




Contents

• Ameba Services

• Ameba Technology Lab

• Onix: Data Stream Processing and Analysis

• Choice of Akka
株式会社サイバーエージェント
                                                 4




     Ameba Services
・       Monthly PV :
                    33.1
billion
・ Number of users :
             about 24 million




* As of Sep 2012
Ameba Pigg                株式会社サイバーエージェント
                                                       5


「 アメーバピグ」                「 ピグライフ」




「 ピグカフェ」                 「 ピグアイランド」
Smartphone Apps   株式会社サイバーエージェント
                                   6
株式会社サイバーエージェント
                                                 7




  Ameba Technology Laboratory
・ From April 2011

・ About 20 engineers
株式会社サイバーエージェント
                                                                                 8


                     Technology Areas
                                                   Smartphone
          News   Blog                                games

                                           Pigg                   Others
profile                 Now
                                Ameba

           Search                             Data Mining

                                Large-
                                Scale
                              Distribute
             Pigg                                  Messaging
    Blog            Gruppo      d Data
                                           Blog                 Gruppo
                              Processing


      Recommenders                                Filtering
株式会社サイバーエージェント
                                                                            9




Onix
• Generic real-time event processing and analysis platform

• Emphasis on
 • Low latency event processing with delivery guarantees
  •    => correct analysis real-time
 • Being replayable if failure still occurs
 • Scalability
 • Extensibility


• Built on Akka 2.0.x
株式会社サイバーエージェント
                                                            10




System Overview

• Collectors
 • data receivers
• Queue
• Sprinklers
 • pulling and scattering event data
• Processors
 • processing according to the specified
   tasks
株式会社サイバーエージェント
                                               11




Zones of Failure Resistance
株式会社サイバーエージェント
                                               12




Zones of Failure Resistance




Write-Ahead Log
株式会社サイバーエージェント
                                               13




Zones of Failure Resistance




Queue
株式会社サイバーエージェント
                                               14




Zones of Failure Resistance




Guaranteed Event Delivery
株式会社サイバーエージェント
                                    15




Replaying Events
株式会社サイバーエージェント
                                    16




Replaying Events




 Event replay
株式会社サイバーエージェント
                                                   17




Scaling Out
              topics/partitions


                      corresponding sprinklers
株式会社サイバーエージェント
                                                                18




Scaling Out
                           topics/partitions


                                   corresponding sprinklers



     1…* processors
         per a sprinkler
株式会社サイバーエージェント
                                                                 19




Scaling Out
                            topics/partitions


                                    corresponding sprinklers



     1…* processors
         per a sprinkler

     1…* processing tasks
         one 1 processor
株式会社サイバーエージェント
                                             20




Scaling Out:
Sprinklers and Processors
株式会社サイバーエージェント
                                                                                  21




Scaling Out:
Sprinklers and Processors




           increasing total throughput under an increased load
株式会社サイバーエージェント
                                                                           22




Scaling Out:
Sprinklers and Processors

                              mps

            6


            5


            4
                                                    mps
            3


            2


            1


                0   5000   10000    15000   20000




                                                    ※ in ideal settings
株式会社サイバーエージェント
                                             23



Scaling Out:
Sprinklers and Processors
Larger View
株式会社サイバーエージェント
                                                                               24




Extensibility
  Adding a new functionality is as simple as
 • Writing a processor plugin extending the base class
 • Registering it to the processor pool
 Processing functionality becomes available to all services
株式会社サイバーエージェント
                                   25




Results
•   Monthly,
•   Hourly,
•   Minutely,
•   You specify
株式会社サイバーエージェント
                                                           26




Possible Scenario: Integration with Patriot
• Log processing platform at Ameba
   •   since 2010
• Hadoop/Hive, HBase
• Working with
   •   User behavioral logs
   •   Access logs
   •   Textual data (blogs, etc.)




Enabling lambda architecture with Onix!
株式会社サイバーエージェント
                                                           27




Possible Scenario: Integration with Patriot
• Log processing platform at Ameba
     •    since 2010
• Hadoop/Hive, HBase,
                Onix (speed layer)
• Working with
     •    User behavioral logs
     •    Access logs
     •    Textual data (blogs, etc.)

• Supplementing Patriot with
  real-time analytics
 •       Incremental update of
         real-time views
 •       Emphasis on the latest data
株式会社サイバーエージェント
                                                                 28




Current State and Challenges
• Auto-scaling is not available yet
 • Needed to reduce management complexity
• Additional APIs and protocols to support
• Only basic processing tasks are implemented
• In beta
29



Processing Tasks
•           Spam Detection
    •        Identifying spams from
             articles, messages, comments, etc.

• Outlier Action Detection
    • Detecting fraud acts on online game
        •    Unauthorized users, etc.   # e.g.   R15+, R18+
        •    Unauthorized tools
        •    Abuses
    • Detecting other anomalies
        •    DDoS attacks
        • Invasions
        • Failures
株式会社サイバーエージェント
                                                                                                                     30




Why Akka?
• Gives loose coupling(疎結合)
  and location transparency(ロケーション透過性) for design
 •       Actor Model


• Easy scaling
 •       Asynchronous and Distributed by design
     •    Remoting
            Address addr = new Address("akka", "sys", "host", 1234);
            ActorRef ref = system.actorOf(new Props(RemoteDeploymentDocSpec.Echo.class).withDeploy(
                                                                        new Deploy(new RemoteScope(addr))));
     •    Microkernel
            bin/akka sample.kernel.hello.HelloKernel



• No visibility(可視性) and race condition(競合状態) concerns
  -> lower complexity of the system
 •       Isolated Mutability (単独可変性) provided by Actor Concurrency Model(並列モデル)
株式会社サイバーエージェント
                                                                                            31




Why Akka?
• “Let It Crash” Philosophy
 •   Surviving failures in a simple way instead of doing defensive programming
 •   Don’t be afraid to crash!


• Java API

• Open Source

• Responsive Community
株式会社サイバーエージェント
                                                                   32




Some Java-related ‘problems’
• Scala API is richer than Java API

• SBT is required if you want to do something 'fancy‘

• application.conf must be merged with multiple
  reference.conf manually if you need a fat jar
株式会社サイバーエージェント




Thank you for your attention!

Más contenido relacionado

Similar a Data Stream Processing and Analysis with Akka

#01-03 solaris11で深化するクラウド
#01-03 solaris11で深化するクラウド#01-03 solaris11で深化するクラウド
#01-03 solaris11で深化するクラウドSolarisJPNight
 
クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?
クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?
クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?Takakiyo Tanaka
 
クラウド鎖国からクラウド維新へ
クラウド鎖国からクラウド維新へクラウド鎖国からクラウド維新へ
クラウド鎖国からクラウド維新へCybozucommunity
 
サーバーレスで ガチ本番運用までやってるお話し
サーバーレスで ガチ本番運用までやってるお話しサーバーレスで ガチ本番運用までやってるお話し
サーバーレスで ガチ本番運用までやってるお話しAkira Nagata
 
ビッグIoTデータに対応したデータベース GridDB
ビッグIoTデータに対応したデータベース GridDBビッグIoTデータに対応したデータベース GridDB
ビッグIoTデータに対応したデータベース GridDBgriddb
 
オープニング
オープニングオープニング
オープニングkonekto
 
Microsoft open tech night 2020 feb18
Microsoft open tech night 2020 feb18Microsoft open tech night 2020 feb18
Microsoft open tech night 2020 feb18Masatomo Ito
 
云推送技术实现与敏捷开发
云推送技术实现与敏捷开发云推送技术实现与敏捷开发
云推送技术实现与敏捷开发kaerseng
 
Introduction to NetOpsCoding
Introduction to NetOpsCodingIntroduction to NetOpsCoding
Introduction to NetOpsCodingTaiji Tsuchiya
 
Wot2015 微博平台护城河-构建高效的防御体系-王关胜
Wot2015 微博平台护城河-构建高效的防御体系-王关胜Wot2015 微博平台护城河-构建高效的防御体系-王关胜
Wot2015 微博平台护城河-构建高效的防御体系-王关胜Weibo Corporation
 
第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料
第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料
第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料Tae Yoshida
 
Solaris11で深化するクラウド
Solaris11で深化するクラウドSolaris11で深化するクラウド
Solaris11で深化するクラウドYasushi Taki
 
ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術Drecom Co., Ltd.
 
Kansumi2013 tamagawa
Kansumi2013 tamagawaKansumi2013 tamagawa
Kansumi2013 tamagawaSORACOM, INC
 
Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-
Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-
Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-Masato Igeta
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)Amazon Web Services Japan
 
タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]
タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]
タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]DeNA
 

Similar a Data Stream Processing and Analysis with Akka (20)

Tonchidot
TonchidotTonchidot
Tonchidot
 
#01-03 solaris11で深化するクラウド
#01-03 solaris11で深化するクラウド#01-03 solaris11で深化するクラウド
#01-03 solaris11で深化するクラウド
 
クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?
クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?
クラウド、クラウドというけれどJavaのシステムにとってクラウドってメリットあるの?
 
Redmine Applied for Large Scale
Redmine Applied  for Large ScaleRedmine Applied  for Large Scale
Redmine Applied for Large Scale
 
クラウド鎖国からクラウド維新へ
クラウド鎖国からクラウド維新へクラウド鎖国からクラウド維新へ
クラウド鎖国からクラウド維新へ
 
サーバーレスで ガチ本番運用までやってるお話し
サーバーレスで ガチ本番運用までやってるお話しサーバーレスで ガチ本番運用までやってるお話し
サーバーレスで ガチ本番運用までやってるお話し
 
ビッグIoTデータに対応したデータベース GridDB
ビッグIoTデータに対応したデータベース GridDBビッグIoTデータに対応したデータベース GridDB
ビッグIoTデータに対応したデータベース GridDB
 
オープニング
オープニングオープニング
オープニング
 
Microsoft open tech night 2020 feb18
Microsoft open tech night 2020 feb18Microsoft open tech night 2020 feb18
Microsoft open tech night 2020 feb18
 
云推送技术实现与敏捷开发
云推送技术实现与敏捷开发云推送技术实现与敏捷开发
云推送技术实现与敏捷开发
 
Introduction to NetOpsCoding
Introduction to NetOpsCodingIntroduction to NetOpsCoding
Introduction to NetOpsCoding
 
Wot2015 微博平台护城河-构建高效的防御体系-王关胜
Wot2015 微博平台护城河-构建高效的防御体系-王关胜Wot2015 微博平台护城河-构建高效的防御体系-王关胜
Wot2015 微博平台护城河-构建高效的防御体系-王关胜
 
第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料
第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料
第4回SIA研究会(例会)プレゼン資料1_ m2 soft 紹介資料
 
Solaris11で深化するクラウド
Solaris11で深化するクラウドSolaris11で深化するクラウド
Solaris11で深化するクラウド
 
ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術ログ解析を支えるNoSQLの技術
ログ解析を支えるNoSQLの技術
 
Spring Boot on Kubernetes : Yahoo!ズバトク事例 #jjug_ccc
Spring Boot on Kubernetes : Yahoo!ズバトク事例 #jjug_cccSpring Boot on Kubernetes : Yahoo!ズバトク事例 #jjug_ccc
Spring Boot on Kubernetes : Yahoo!ズバトク事例 #jjug_ccc
 
Kansumi2013 tamagawa
Kansumi2013 tamagawaKansumi2013 tamagawa
Kansumi2013 tamagawa
 
Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-
Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-
Webな技術でIoT自販機を作って運用している話 -ポケットチェンジでのものづくり-
 
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
202205 AWS Black Belt Online Seminar Amazon VPC IP Address Manager (IPAM)
 
タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]
タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]
タクシーxAIを支えるKubernetesとAIデータパイプラインの信頼性の取り組みについて [SRE NEXT 2020]
 

Último

[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 

Último (9)

[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 

Data Stream Processing and Analysis with Akka