The FoodFinder API can be called with baking ingredients and will return vendors that sell the ingredients, along with their inventories and prices.
FoodFinder makes underlying calls to the FoodSupplier API to find out which vendors sell the ingredient, then to the FoodVendor API to find out the inventory and price of the ingredient for each vendor.
A FoodFinder client, called FoodClient, is also provided and can be used to make calls to the FoodFinder API.
To build the program, run:
bazel build :all
Run the services in seperate terminal windows:
./bazel-bin/food_supplier
./bazel-bin/food_vendor
./bazel-bin/food_finder
Then run the client:
./bazel-bin/food_client
Make sure FoodSupplier
, FoodVendor
and FoodFinder
are running before attempting to run FoodClient
.
This project has been instrumented using OpenCensus. You can export traces and metrics produced by interactions between the food services. Currently, the project supports exporting traces to Zipkin or GCP, and metrics to GCP.
To view traces in Zipkin, install Zipkin and visit http://localhost:9411/zipkin.
You can also export traces from Zipkin to GCP by creating a GCP project and following these instructions.
You can export metrics to GCP using Stackdriver. Just set your STACKDRIVER_PROJECT_ID
environment variable to the name of your GCP project.