API Design - Pagination, Filtering & Versioning
Learn API Design - Pagination, Filtering & Versioning (REST API Development, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Business Requirement An orders service exposes GET /api/orders . It returns every order in the table. On the developer's machine the table holds ten rows and the endpoint answers in four milliseconds. In production the table holds two million rows. Problem Statement That endpoint is a production incident waiting to happen, and it fails in three places at once. The database - a full table scan reads and sorts two million rows. The application - Hibernate builds two million entity objects, then Jackson serialises them into a single string. The heap holds the whole result twice. This is where...
More lessons in REST API Development
- REST API & RESTful Web Services
- HTTP Methods
- HTTP Status Codes
- Building REST APIs with Spring Boot
- Request Mapping Annotations
- Reading Request Data
- ResponseEntity
- DTOs: Request and Response
- JSON - Structure & Parsing
- REST API - Save & Update Operation
- REST API - Get & Delete Operation
- Spring Boot - Interceptor
- Mini Project: Book Catalogue REST API