View on GitHub

java-gossip-simulator

An experimental Java 17 API to enable simulating the dissemination of data across nodes in a network using the Gossip Epidemic Protocol β˜•οΈπŸ—£πŸž

Java Gossip Protocol Simulator API Build Status Maven Central javadoc

An experimental Java 17 API to enable simulating the dissemination of data across nodes (Hosts) in a network using the Gossip epidemic protocol.

The API enables running the simulation using a single computer. Every node is represented by a Plain Old Java Object GossipNode. Therefore, since this is a simulation API, there is no actual network communication, not even in localhost.

1. Examples

The figure below shows an example of the output for a simulation cycle, where nodes send a message to their neighbors. An infected node 🐞 is that one which has already received a message, otherwise it’s a non-infected node πŸ’š.

Simulation Results

A complete example is available here.

If you want to understand how the Gossip Protocol works, check this nice online graphical simulator.