Defend Earth against an alien invasion
like a pro with Akka Cluster


Krzysztof Otrębski @kotrebski

Goals

Details of the code are not important.
I want you to get an idea how akka cluster works.
https://it.wikipedia.org/wiki/File:Richard-feynman.jpg

...it seems to have been the general policy then to not try to repeat psychological experiments,

Richard Feynman

Cyclotron: Princeton vs MIT

MIT - had built a new cyclotron (...) It was what I would call a gold-plated cyclotron.
Princeton - The whole cyclotron was there (in basement) in one room, and it was complete, absolute chaos!
Who has more papers?

What is on the screen

Our defence: towers and command centers

Some important cluster settings


      akka {
      cluster {
      auto-down-unreachable-after = 30s
      }
      }
    
*It can be too short to use on PROD, but good for having this presentation

Let's see some action

What you know now:

  1. How sharding works
  2. What you need sharding and persistent actors for
  3. It's good to run failover tests before going on protoduction

How to run this demo on your own laptop

    
      #Clone project from GitHub:
      $ git clone https://github.com/otrebski/reactive-missile-defend.git

      #Run shared journal
      $ export SEED_NODE=akka.tcp://defend@localhost:3000; export HOST=localhost;export PORT=3000; sbt sj ↵

      #Run Swing UI
      $ SEED_NODE=akka.tcp://defend@localhost:3000; HOST=localhost; PORT=3001; sbt ui ↵

      #Run Command Center's node
      $ SEED_NODE=akka.tcp://defend@localhost:3000; HOST=localhost; PORT=3002 sbt cc ↵

      #Run another Command Center's node
      $ SEED_NODE=akka.tcp://defend@localhost:3000; HOST=localhost; PORT=3003 sbt cc ↵
    
    

Thank you

Questions time

/