GithubHelp home page GithubHelp logo

akka-examples's Introduction

Akka Cluster + Group Routing

Running

There are a few ways to run the application. You can start by running the following:

sbt "runMain com.example.Application"

Once you have this running, the cluster will be up with a parent actor (as a singleton) and several worker actors. To see work submit to this system, add a client to the cluster in a new terminal:

sbt "runMain com.example.ClientMain"

If you would like to see more interesting behavior, run the following commands. Each command should be in a new terminal window:

sbt "runMain com.example.Application 2551"
sbt "runMain com.example.Application 2552"
sbt "runMain com.example.Application 0"
sbt "runMain com.example.WorkerMain"
sbt "runMain com.example.ClientMain"

The three terminals that ran Application will all have the actor singleton, and a worker. You can terminate 2551, and see the singleton move to another cluster member with the "parent" role.

Tests

To test this application, you will need to run the following command:

sbt multi-jvm:test

Test Structure

This project uses the SBT multi-jvm plugin. Tests are all in src/main/multi-jvm/scala. ApplicationTest contains the tests that will be executed by this command.

akka-examples's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.