Difficulty: beginner
Estimated Time: 15 minutes

This is a simple tutorial for the features of Whip with a simple microservices application.

In particular, it will highlight:

  1. Whip can be deployed on an application with no code changes (bottom of p2). Additionally, Whip can operate under partial deployment (i.e., only one of the services will have a Whip adapter).
  2. Whip can detect first-order contract failures.
  3. Whip can detect higher-order contract failures. Whip blames correctly (Section 5). Under partial deployment though, Whip uses the same blame label for all non Whip-enhanced services.
  4. Whip leverages other adapters in enhanced communication to transmit blame labels for services.
  5. Whip can detect indexed contract violations.

You will be able to do the tutorial interactively in your browser! Just follow the steps shown in the page.

You've completed your first Whip interactive demo!

In particular, you saw that:

  1. Whip can be deployed on an application with no code changes (bottom of p2). Additionally, Whip can operate under partial deployment (i.e., only one of the services will have a Whip adapter).
  2. Whip can detect first-order contract failures.
  3. Whip can detect higher-order contract failures. Whip blames correctly (Section 5). Under partial deployment though, Whip uses the same blame label for all non Whip-enhanced services.
  4. Whip leverages other adapters in enhanced communication to transmit blame labels for services.
  5. Whip can detect indexed contract violations.

For more information, check out the Whip documentation at http://whip.services/docs.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Whip Quickstart

Step 1 of 6

Step 1 - Overview of project

This is the Katacoda interactive tutorial page. Instructions will be printed here. On the bottom right is your terminal. On the top right is an editor where you can edit files (it will save automatically).

You can click a code example in this document to execute it in the terminal automatically -- no need to copy and paste.

This tutorial revovles around a simple microservices application.

The microservices application is a simple distributed calculator. It consists of three services: an adder, which performs numeric addition (which you could imagine being an extremely computationally expensive operation that must be distributed), a discovery service for adders, and a client which issues addition commands. The workflow of the application is:

  1. An adder joins the set of available adders by invoking the register_adder operation on the discovery service that includes the address where the adder can be invoked.
  2. A client requests the address of an available adder by invoking the get_adder_info. The discovery service returns a random available adder to the client.
  3. With the given adder service address, the client invokes the add operation on the adder. The adder performs the computation and returns the result to the client.

The Thrift network protocol is defined in src/calc.thrift. You can click on the file in the editor in the top right pane. The services are implemented in Python and their implementations can be found in the src/ subdirectory.