© Cloves Carneiro Jr. and Tim Schmelmer 2016

Cloves Carneiro Jr. and Tim Schmelmer, Microservices From Day One, 10.1007/978-1-4842-1937-9_6

6. Consuming Your APIs

Cloves CarneiroJr. and Tim Schmelmer2

(1)Hollywood, Florida, USA

(2)Broomfield, Colorado, USA

The size ofclient-side libraries, and the features included in them, can vary widely. We will discuss the pros and cons of including various responsibilities, like exposing network errors, or making service calls, validating service responses, caching expensive API calls, handling errors, and alarming when things go wrong. Key topics in this chapter include

  • How much code should live in a client library?

  • Libraries should not have business logic, ever.

  • Handling errors is a must, and depends on the ...

Get Microservices From Day One: Build robust and scalable software from the start 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.