An API is a defined interface through which software components communicate and request functionality or data. In distributed web applications, backend services expose APIs that frontends call on behalf of users. section 1.1
A web API connects several implementation concerns:
- HTTP routes receive requests and dispatch them to handler functions. section 6.3
- Handlers use data models, database-access functions, and persistence structures to manage application data. section 6.3
- Frontend code constructs HTTP requests, sends parameters, and interprets serialized or deserialized responses. section 9.8
- Well-designed APIs reduce roundtrips while supporting throughput, response-time, availability, and predictable latency requirements. section 1.2
RESTful web service
A Rust service built with Actix exposes a set of APIs over HTTP using REST. A larger implementation can add tutor-management routes, with corresponding handlers and database-access functions; a frontend can then invoke those APIs and process the responses. section 3.0 section 6.3 section 9.8
Use the distributed-systems stack diagram to place APIs between application frontends, backend services, and supporting infrastructure. section 1.1











































