Messenger API Design Evaluation and Latency Budget

Understand how we achieve the non-functional requirements for the Messenger API.

Introduction

Modeling an adequate API is a complex task that involves fine-tuning different technical dimensions. These technical dimensions have different parameters to be optimized, and their tradeoffs must be considered. In this lesson, we’ll discuss how non-functional requirements can be achieved and what optimization decisions we need to take. We’ll also discuss the latency and response time of our proposed API of Messenger.

Non-functional requirements

The following section discusses how the messenger API meets the non-functional requirements:

Consistency

A chat application would require rolling out new features frequently, which needs periodic API versioning. We keep the endpoints, error messages, URL patterns, and relevant data entities uniformHaving a standard naming convention so that it is easy to map from one to the other. to achieve consistency. Moreover, during a chat, the messages must be delivered in sequence; therefore, we utilize the FIFO (First In, First Out) messaging queue with strict ordering.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.