Chapter 6. Integrated AvailableTrade Frontend with APIs

Up to this point, you’ve been learning and implementing resilient patterns for individual microservice components. You’ve successfully deployed the AvailableTrade single-page application, the Account Open serverless API, and the containerized Trade Stock APIs. Your retail stock trading application only becomes useful when these components are integrated. In this chapter, you’ll integrate the UI with the backend services to prepare for recovery orchestration in Chapter 7 and learn more resilience patterns along the way.

In this chapter, you will accomplish the following:

  • Integrate your microservices with the UI

  • Automate endpoint configuration

  • Integrate API calls

  • Configure rational client timeouts

  • Deal gracefully with API unavailability

  • Monitor real user experience

  • Observe and track JavaScript errors

  • Trace user actions to backend processing

Technical Requirements

The functional requirement of this chapter is to integrate the AvailableTrade UI with the Trade Stock and the Trade Confirms microservices using the JavaScript Fetch API. In addition to integration, as with prior chapters, you’ll make informed design decisions to ensure a reliable user experience. You’ll also apply nonfunctional instrumentation to capture usage and performance data to help engineers reliably operate the AvailableTrade system. Figure 6-1 shows an overview of the data flow from the brokerage customer’s browser as they load your website ...

Get Engineering Resilient Systems on AWS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.