Summing Up
Time for another recap. In this chapter, we have focused on modifying the structure of your APIs to favor good performance. You learned how to adjust the API response in two ways: with the number of records returned by request and with the amount of data embedded in each object.
To optimize the number of records in an application response, you explored applying pagination to API payloads. You learned about offset-based pagination and page-based pagination and implemented them in a real Rails application using Kaminari. You explored cursor-based pagination, seeing how it is especially useful on applications that operate on a large scale.
You looked at the difference between linking and embedding data to finetune the amount of data included ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access