Messenger API Design Decisions

Understand some of the primary technical considerations that will direct the design of the Messenger API.

Introduction

The design of Messenger API will involve many services that each play a role in sending, receiving, and storing user messages. In this lesson, we’ll go over Messenger's high-level design and the workflow for handling requests of different functional requirements. Next, we’ll consider some technical aspects that affect our design decisions—for example, API architectural styles, communication protocols, and data formats.

Design overview

The following illustration shows the components and services involved in Messenger API. Incoming requests go through three main services:

  1. Asset service: This service handles media and documents sent via chat messages.

  2. User data services: This service manages user profile data and the relevant metadata.

  3. Real-time services: These services are responsible for two-way user communication, such as chat.

Apart from these services, there are also some components that facilitate these services, such as Zookeeper and messaging queue. The detailed responsibilities of each of these services and components are listed in the table below:

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