Requirements of the Comment API


In today's technological world, complex applications have emerged that have enhanced interaction between users across the globe. One example of such applications is the social media platforms where users post their content, including creative works consisting of images and videos. Such platforms allow users to comment on a post to provide feedback, additional information, suggestions, corrections, or appreciation. The process of creating a comment on a post is a complex system that involves the interaction of different components at different levels. Therefore, there is a need to design an API to interlink the communication of all the interacting components in the comment system.

In this lesson, we will focus on the requirements for designing the API for a comment service so that we will be able to perform various functions related to comments.

Introduction to the comment service API

When a client intends to perform an action relevant to a comment—for example, creating, updating, or deleting a comment—a request is initiated and passed through the API gateway. The API gateway acts as a reverse proxyA reverse proxy sits at the edge of the application's backend. Its main job is to direct client requests to one of many application/origin servers. Reverse proxies provide a layer of security to backend servers by hiding their identity. by routing requests from clients to services. It also provides some other preliminary features, including authorization, access control, cache, throttling limits, and so on.

Upon the successful completion (or unsuccessful attempt) of a received request at the backend, a response is generated and sent back to the client accordingly. The following figure abstracts the components involved in this process.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy