Skip to content

homerquan/awesome-akka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 

Repository files navigation

Awesome AKKA

Author: Homer Quan (hi@homerquan.me)

SCALA and AKKA

Why Scala

JVM and Java compatibility Functional and OO style: productivity Actor: flexible scale up/down, maintainable, fault tolerance * Real time: Scala is built for stream, async processing (lambda, future, promise)

Why AKKA

https://www.typesafe.com/community/core-projects/akka http://blog.confluent.io/2015/01/29/making-sense-of-stream-processing/ http://www.typesafe.com/blog/reactive-streams-webinar-qa

How to code in Akka stream

http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M2/scala/stream-cookbook.html

Async style programming

Scala and AKKA is non-blocking async language. Please familiar yourself with concepts such as Future and Promise

Actors

Scala and AKKA provides a concurrency mechanism called “Actor”. It would benefit WISE in scalability and resilience.

Actor is an isolated resource unit and communicate with each other via messages. It needs a storage persistence to recover from failure or bootstrap. We select cassandra as storage provider. Sample code: https://github.com/krasserm/akka-persistence-cassandra

Find vehicles by spitial query: build index in memory http://jspatial.sourceforge.net/

Actor is built for share nothing. But sometime it has to use share status: http://stackoverflow.com/questions/7307217/akka-sharing-mutable-state

Common Actor patterns https://doc.akka.io/docs/akka/2.5.4/scala/howto.html

HA

Akka persistent: http://www.slideshare.net/ktoso/akka-persistence-event-sourcing-in-30-minutes

Multi tenant

  • Each account will has its own actor system

AKKA streem

Important cencepts

  • Graph: Flow (lines in the graph e.g., f1, f2 … ) + source (in) + sink (out) + junctions (bcast and merge)
  • Flow: A linear processing unit composited by stages e.g., f1: s1=>s2=>s3
  • Stage: The basic processing unit, which can be
    • pull
    • push
    • pushpull (for most stream processing)
    • stateful (if change internal status)

Code samples

Actors

Other

About

Scala akka awesome

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published