Skip to main content

Building Diffy from source

Pre-requisite installation

  1. Java (jdk 17+)
  2. Maven (version 3.8.6+)

Cloning the repository

Let's start by cloning the repository from Github.

gh repo clone opendiffy/diffy
cd diffy

Launch the example services

The diffy repo includes an old and new versions of an example service that we can compare using Diffy. Let's launch primary, secondary, and candidate instances of the example service using the following script:


Note: Make that ports 9000, 9100, 9200 are available for primary, secondary, and candidate instances to listen on.

Launch Diffy

Let's open a new terminal window and run the following command from inside the diffy directory.

./example/ start

This command builds a diffy jar from source and then deploys it. Note: Diffy needs ports 8888 to serve the UI and 8880 as a Proxy port to receive sample traffic that will be multicast to primary, secondary and candidate. Please make sure these ports are available.

Send sample traffic

We are now ready to send some sample traffic to Diffy using the following command:


We have now successfully sent hundreds of requests to Diffy on its Proxy port which have been multicast to primary, secondary, and candidate. The resulting response triplets have been compared by Diffy and aggregated into a view that we can now see in the UI.

View the results

The Diffy UI hosted at http://localhost:8888 should look something like this: Diffy

You now have a working instance of Diffy. You can look at ./example/ and edit it to test your own services.