SlideShare a Scribd company logo
1 of 15
Download to read offline
Akka Persistence Journal
Ikuo Matsumura
CyberAgent, Inc.
2017-05-14, Scala
Akka Persistence
Actor
•
• Actor -> supervisor strategy
• JVM
• JVM
•
2017-05-14, Scala 2
Akka Persistence Journal
• Event Sourcing API
• Ka4a, Cassandra, DynamoDB, Redis plugin
• Actor
• Snapshot
2017-05-14, Scala 3
"it stores a complete history
of the events associated with
the aggregates in your
domain"
— Reference 3: Introducing Event Sourcing, CQRS
Journey1
1
Dominic Be+s, Julian Dominguez, Grigori Melnik, Fernando Simonazzi, Mani Subramanian,
Exploring CQRS and Event Sourcing, 2012, h+ps://msdn.microsoC.com/en-us/library/
jj554200.aspx
2017-05-14, Scala
( )
• /JVM
•
•
• " " Actor
• , Cameo Pa3ern
2017-05-14, Scala 5
: 1 1Actor,
2017-05-14, Scala 6
Snapshot
2017-05-14, Scala 7
1. (expire)
• Ka.a, Kinesis, Cassandra, DynamoDB, Redis etc.
2. LRU (evict)
• Redis etc.
2017-05-14, Scala 8
2017-05-14, Scala 9
1 - remember-en))es
akka.cluster.sharding {
remember-entities = on
}
JVM
!
! actor ID
→ (?)
2017-05-14, Scala 10
2 - Persistence Query
val src: Source[String, NotUsed] = // persistenceId
PersistenceQuery(system)
.readJournalFor[ScalaReadJournal](
"akka-persistence-redis.read-journal") // Redis
.currentPersistenceIds
src.mapAsyncUnordered(...)( // Akka Stream
persistenceId => (persistenceId))
.runWith(Sink.ignore)
!
"
2017-05-14, Scala 11
: Persistence Query
Redis Journal ,
(JVM) 32GB RAM / 8core
• 15 , Actor
• Cat - Sharding Actor Meow ,
3meout=2
• Sweeper - ID 2
, Cluster Singleton
• : Meow
2
snapshot Redis Journal delete
2017-05-14, Scala 12
: Actor 400 9GB (→ 1000 20GB)
2017-05-14, Scala 13
: Actor 90 10 (→ 1000 2 )
2017-05-14, Scala 14
• Akka Persistence Journal
•
• rememberEn55es, Persistence Query
• Redis Persistence Query
• Actor 1000 ,
• : h?ps://github.com/ikuo/cat-cluster
2017-05-14, Scala 15

More Related Content

What's hot

What's hot (20)

Scaling .net containers with event driven workloads
Scaling .net containers with event driven workloadsScaling .net containers with event driven workloads
Scaling .net containers with event driven workloads
 
Scaling containers with KEDA
Scaling containers with KEDAScaling containers with KEDA
Scaling containers with KEDA
 
Introduction to Promitor
Introduction to PromitorIntroduction to Promitor
Introduction to Promitor
 
Elastic{ON} Seminar New York (2017)
Elastic{ON} Seminar New York (2017)Elastic{ON} Seminar New York (2017)
Elastic{ON} Seminar New York (2017)
 
Big data for dot net Devs with Spark
Big data for dot net Devs with SparkBig data for dot net Devs with Spark
Big data for dot net Devs with Spark
 
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
 
Improve monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss toolsImprove monitoring and observability for kubernetes with oss tools
Improve monitoring and observability for kubernetes with oss tools
 
Resillient microservices with AKS
Resillient microservices with AKSResillient microservices with AKS
Resillient microservices with AKS
 
Global Azure Bootcamp 2018 - Using Azure Functions and Microsoft Cognitive Se...
Global Azure Bootcamp 2018 - Using Azure Functions and Microsoft Cognitive Se...Global Azure Bootcamp 2018 - Using Azure Functions and Microsoft Cognitive Se...
Global Azure Bootcamp 2018 - Using Azure Functions and Microsoft Cognitive Se...
 
Autoscaling containers with event driven workloads
Autoscaling containers with event driven workloadsAutoscaling containers with event driven workloads
Autoscaling containers with event driven workloads
 
Integrate UK 2019 - Adventures of building a (multi-tenant) PaaS on Microsoft...
Integrate UK 2019 - Adventures of building a (multi-tenant) PaaS on Microsoft...Integrate UK 2019 - Adventures of building a (multi-tenant) PaaS on Microsoft...
Integrate UK 2019 - Adventures of building a (multi-tenant) PaaS on Microsoft...
 
Serverless Event Driven Containers with KEDA
Serverless Event Driven Containers with KEDAServerless Event Driven Containers with KEDA
Serverless Event Driven Containers with KEDA
 
Azure containers fundamentals
Azure containers fundamentalsAzure containers fundamentals
Azure containers fundamentals
 
Global Azure Virtual - Application Autoscaling with KEDA
Global Azure Virtual - Application Autoscaling with KEDAGlobal Azure Virtual - Application Autoscaling with KEDA
Global Azure Virtual - Application Autoscaling with KEDA
 
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
NDC London 2021 - Application Autoscaling Made Easy With Kubernetes Event-Dri...
 
サイボウズの開発を支える GitHub × CircleCI
サイボウズの開発を支える GitHub × CircleCIサイボウズの開発を支える GitHub × CircleCI
サイボウズの開発を支える GitHub × CircleCI
 
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
 
Cncf event driven autoscaling with keda
Cncf   event driven autoscaling with kedaCncf   event driven autoscaling with keda
Cncf event driven autoscaling with keda
 
Scaling containers with keda
Scaling containers  with kedaScaling containers  with keda
Scaling containers with keda
 
Monitoring kubernetes wwith prometheus and grafana azure singapore - 19 aug...
Monitoring kubernetes wwith prometheus and grafana   azure singapore - 19 aug...Monitoring kubernetes wwith prometheus and grafana   azure singapore - 19 aug...
Monitoring kubernetes wwith prometheus and grafana azure singapore - 19 aug...
 

Similar to Akka PersistenceのJournalのライフサイクル管理

Similar to Akka PersistenceのJournalのライフサイクル管理 (20)

20180309 DLIもくもく会 Deep Learning on AWS
20180309 DLIもくもく会 Deep Learning on AWS20180309 DLIもくもく会 Deep Learning on AWS
20180309 DLIもくもく会 Deep Learning on AWS
 
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
Amazon SageMaker 紹介 & ハンズオン(2018/07/03 実施)
 
Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...
Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...
Netflix Keystone SPaaS: Real-time Stream Processing as a Service - ABD320 - r...
 
Running Spark In Production in the Cloud is Not Easy with Nayur Khan
Running Spark In Production in the Cloud is Not Easy with Nayur KhanRunning Spark In Production in the Cloud is Not Easy with Nayur Khan
Running Spark In Production in the Cloud is Not Easy with Nayur Khan
 
クローラーをテストしよう!
クローラーをテストしよう!クローラーをテストしよう!
クローラーをテストしよう!
 
20181027 deep learningcommunity_aws
20181027 deep learningcommunity_aws20181027 deep learningcommunity_aws
20181027 deep learningcommunity_aws
 
Cloud Foundry Container Runtimeで快適Kubernetes運用
Cloud Foundry Container Runtimeで快適Kubernetes運用Cloud Foundry Container Runtimeで快適Kubernetes運用
Cloud Foundry Container Runtimeで快適Kubernetes運用
 
Apereo CAS: State of the Project 2018
Apereo CAS: State of the Project 2018Apereo CAS: State of the Project 2018
Apereo CAS: State of the Project 2018
 
Adopt-a-jsr Mar 1 2017 JAX-RS update
Adopt-a-jsr Mar 1 2017 JAX-RS updateAdopt-a-jsr Mar 1 2017 JAX-RS update
Adopt-a-jsr Mar 1 2017 JAX-RS update
 
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
Angular2 + AWS LambdaでサーバサイドレンダリングしてみたAngular2 + AWS Lambdaでサーバサイドレンダリングしてみた
Angular2 + AWS Lambdaでサーバサイドレンダリングしてみた
 
Sinatraで触れる生SQL
Sinatraで触れる生SQLSinatraで触れる生SQL
Sinatraで触れる生SQL
 
Wait! What’s going on inside my database? (PASS 2023 Update)
Wait! What’s going on inside my database? (PASS 2023 Update)Wait! What’s going on inside my database? (PASS 2023 Update)
Wait! What’s going on inside my database? (PASS 2023 Update)
 
(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per Second(BDT318) How Netflix Handles Up To 8 Million Events Per Second
(BDT318) How Netflix Handles Up To 8 Million Events Per Second
 
Vue Fes Japan 2018 参加レポート
Vue Fes Japan 2018 参加レポートVue Fes Japan 2018 参加レポート
Vue Fes Japan 2018 参加レポート
 
How elasticsearch powers the Guardian's newsroom
How elasticsearch powers the Guardian's newsroomHow elasticsearch powers the Guardian's newsroom
How elasticsearch powers the Guardian's newsroom
 
Heterogeneous Data Mining with Spark
Heterogeneous Data Mining with SparkHeterogeneous Data Mining with Spark
Heterogeneous Data Mining with Spark
 
Evolve 19 | Jayan Kandathil | Running AEM Workloads on Microsoft Azure
Evolve 19 | Jayan Kandathil | Running AEM Workloads on Microsoft AzureEvolve 19 | Jayan Kandathil | Running AEM Workloads on Microsoft Azure
Evolve 19 | Jayan Kandathil | Running AEM Workloads on Microsoft Azure
 
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
 
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
いそがしいひとのための Microsoft Ignite 2018 + 最新情報 Data & AI 編
 
GeeCON Prague : Building a Smart Security Camera with Raspberry Pi Zero, Java...
GeeCON Prague : Building a Smart Security Camera with Raspberry Pi Zero, Java...GeeCON Prague : Building a Smart Security Camera with Raspberry Pi Zero, Java...
GeeCON Prague : Building a Smart Security Camera with Raspberry Pi Zero, Java...
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 

Akka PersistenceのJournalのライフサイクル管理

  • 1. Akka Persistence Journal Ikuo Matsumura CyberAgent, Inc. 2017-05-14, Scala
  • 2. Akka Persistence Actor • • Actor -> supervisor strategy • JVM • JVM • 2017-05-14, Scala 2
  • 3. Akka Persistence Journal • Event Sourcing API • Ka4a, Cassandra, DynamoDB, Redis plugin • Actor • Snapshot 2017-05-14, Scala 3
  • 4. "it stores a complete history of the events associated with the aggregates in your domain" — Reference 3: Introducing Event Sourcing, CQRS Journey1 1 Dominic Be+s, Julian Dominguez, Grigori Melnik, Fernando Simonazzi, Mani Subramanian, Exploring CQRS and Event Sourcing, 2012, h+ps://msdn.microsoC.com/en-us/library/ jj554200.aspx 2017-05-14, Scala
  • 5. ( ) • /JVM • • • " " Actor • , Cameo Pa3ern 2017-05-14, Scala 5
  • 8. 1. (expire) • Ka.a, Kinesis, Cassandra, DynamoDB, Redis etc. 2. LRU (evict) • Redis etc. 2017-05-14, Scala 8
  • 10. 1 - remember-en))es akka.cluster.sharding { remember-entities = on } JVM ! ! actor ID → (?) 2017-05-14, Scala 10
  • 11. 2 - Persistence Query val src: Source[String, NotUsed] = // persistenceId PersistenceQuery(system) .readJournalFor[ScalaReadJournal]( "akka-persistence-redis.read-journal") // Redis .currentPersistenceIds src.mapAsyncUnordered(...)( // Akka Stream persistenceId => (persistenceId)) .runWith(Sink.ignore) ! " 2017-05-14, Scala 11
  • 12. : Persistence Query Redis Journal , (JVM) 32GB RAM / 8core • 15 , Actor • Cat - Sharding Actor Meow , 3meout=2 • Sweeper - ID 2 , Cluster Singleton • : Meow 2 snapshot Redis Journal delete 2017-05-14, Scala 12
  • 13. : Actor 400 9GB (→ 1000 20GB) 2017-05-14, Scala 13
  • 14. : Actor 90 10 (→ 1000 2 ) 2017-05-14, Scala 14
  • 15. • Akka Persistence Journal • • rememberEn55es, Persistence Query • Redis Persistence Query • Actor 1000 , • : h?ps://github.com/ikuo/cat-cluster 2017-05-14, Scala 15