akka presentation schule@synyx
DESCRIPTION
Demonstration of a web crawler implemented using Akka. Link to the sources coming soon.TRANSCRIPT
Florian Hopfhttp://blog.florian-hopf.de
DownloadPage
IndexContent
Parse Links& Content
Link downloaded already?
Sequential Example
1. Scale Up
Thread A Thread BPageStore
Thread A Thread BPageStore
Synchronize and Suffer
Actor-Framework
Message PassingConcurrency
Actor A Actor B
Thread A Thread B
Master
IndexingActor
PageParsingActor
PageStoreFetch
Page
PageContent
IndexPage
Indexed
Simple Example
Actors are accessedby references
ActorInstance
Reference
ActorInstance
Reference
ActorInstanceActor
Instancen
ActorInstances
Fetching Pagesin parallel
2. Scale Out
References can pointto remote machines
akka { actor { deployment { /serviceA/aggregation { router = "roundrobin" nrofinstances = 10 target { nodes =
["akka://[email protected]:2552", "akka://[email protected]:2552"]
} } } } }
3. Fault Tolerance
Actors are supervisedby their parent
Master
IndexingActor
PageParsingActor
PageStore
ActorInstance
Reference
Master
IndexingActor
PageParsingActor
PageStore
ActorInstance
Reference
Actions:EscalateResumeRestart
Stop
Network fail on download
Master
IndexingActor
PageParsingActor
PageStore
Resume PageParsingActor, resend message
Indexing Failure, I/O Error
Master
IndexingActor
PageParsingActor
PageStore
Restart Master
Scaling UpScaling Out
Fault Tolerance
Software Transactional Memory
Durable Mailboxes
http://akka.io