Skip to content

Instantly share code, notes, and snippets.

@dcmoore
Last active November 15, 2023 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcmoore/8eb91a9eb38b358bd51c68f59545f3fd to your computer and use it in GitHub Desktop.
Save dcmoore/8eb91a9eb38b358bd51c68f59545f3fd to your computer and use it in GitHub Desktop.
Integrate with a really buggy fake gold mining service to practice your resilient integration patterns.

Welcome to the Building Resilient Integrations Workshop! If you're reading this, you should've seen the presentation portion of the workshop by now. This is the coding exercise portion. Below you'll find documentation for the buggy API:

Base URL: https://resilient-integration-workshop.onrender.com

Endpoints:
  - POST /v1/register?userName=X
  - POST /v1/excavate
  - POST /v1/store?userName=X&bucketId=X
  - GET /v1/totals?userId=X

The following curl commands should take you through the flow if you replace the various X values with real values:

curl -iX POST "https://resilient-integration-workshop.onrender.com/v1/register?userName=X"
curl -iX POST "https://resilient-integration-workshop.onrender.com/v1/excavate"
curl -iX POST "https://resilient-integration-workshop.onrender.com/v1/store?userName=X&bucketId=X"
curl -iX GET "https://resilient-integration-workshop.onrender.com/v1/totals?userId=X"

Your goal is to create a website that creates an account, mines gold, stores it, and displays the account total to the user. The API is designed to fail in random and strange ways. This gives you an opportunity to practice the resilient integration patterns covered in the presentation. If properly implemented, your website should successfully integrate with the API and experience no downtime, despite the likely event of our API experiencing downtime. When the API is down, you should give it the space to gracefully recover. If you don't it might take longer for the API to get back up and running.

Tip: Remember the patterns we covered in the presentation.

  • Don't Fully Trust Documentation
  • Circuit Breaker
  • Exponential Backoff
  • Single Responsibility Principle
  • Clear/Concise Logging
  • Load Testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment