Git Product home page Git Product logo

java-akka-cluster-example's Introduction

Akka Cluster Example in Java

Introduction

This project was made while testing the Akka Cluster features. It contains a small example of a router distributed in a cluster, written in Java. Nodes can be added on the fly. You can specify on what port the node runs and if the node should send messages across the cluster.

How to run

You can run the program like every ordinary Java main program. Make sure you have mvn clean installed the project before to get the Akka dependency.

../Node 2550                for running on port 2550 (first seed-node)
../Node 2551                for running on port 2551 (second seed-node)
../Node                     for running on a random port
../Node 0                   for running on a random port
../Node 0 message-sender    for running on a random port and it will distribute message among the nodes

At least one of the seed-nodes needs to be up for the other nodes to join the cluster.

Example

  1. Run a node with 2550
  2. Run a node with 0 message-sender
  3. View results (messages should be handled 3 at a time in a round-robin fashion over the nodes)
  4. Add a node with 0 and view results.

java-akka-cluster-example's People

Contributors

martinkanters avatar

Watchers

 avatar  avatar

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.