Search⌘ K
AI Features

Requirements of the CamelCamelCamel API

Explore the essential requirements for designing the CamelCamelCamel API, which provides users with price drop notifications on Amazon products. Understand both functional needs like product search and watch lists, and critical non-functional factors such as availability, reliability, scalability, and low latency that ensure a responsive and dependable service.

Introduction to the CamelCamelCamel API

In e-commerce, customers are inquisitive to know when a price drop occurs for a specific product. Customers cannot regularly examine a product to track price changes. So, they are notified via price drop alerts (to entice customers to buy things) when the price of a specific product has decreased. The CamelCamelCamel API (referred to as C3 in further discussion) provides a price drop alert service for customers interested in buying products on Amazon. We'll analyze and discuss the workflow and operations of the C3 service because designing a C3 API requires us to properly understand the service's core functionality.

To provide these services to the clients, C3 uses the product advertising API (PA-API) of Amazon. Most of the features, such as customer reviews, product promotions, items for sale, seller reviews, product prices, and much of the data that Amazon uses, are accessible through this API. C3 can access Amazon’s databases and benefit by using the PA-API.

Let's start by identifying the requirements for the C3 API.

Requirements

This section discusses all the functional and non-functional requirements to design a C3 API.

Functional requirements

  • Search product: The C3 API service should allow users to search for a specific product.

  • Price timeline: The service should allow users to obtain a price timeline of the products.

  • Add to price watch: The user should be able to add a product to the price watch list by defining the target price and get notifications when the product’s price drops.

  • Get watch list: The user can add multiple products to the price watch list. The service should allow users to see their price watch list.

Functional and non-functional requirements of C3 API
Functional and non-functional requirements of C3 API

Non-functional requirements

  • Availability: The availability of the API is imperative because several users continuously interact with and depend on the C3 service for product prices. Our service should provide data even if a third-party service provider such as Amazon fails since C3 relies heavily on the service provider's data to deliver services.

  • Reliability: The product's data and price drop alerts should be as accurate as possible to provide reliable service to the users.

  • Scalability: The service should scale seamlessly to handle the increasing number of users and marketplaces.

  • Low latency: The latency of the service should be as low as possible.

Prerequisites

We covered some of the functional requirements of C3 service in our mini-design chapters earlier in this course. They will act as building blocks for our design and are listed below:

  • Search service: The search functionality allows users to find products of interest using our service.

  • Pub-sub service: The pub-sub service acts as a building block when a user adds a product to the watch list and expects to get a notification about price drops.

What role can caching and indexing play in optimizing the search service at C3, and where in the pipeline should they be introduced for maximum impact?

Use the AI assessment widget below to submit your solution and get an interactive response.

Caching and Indexing in Search Optimization

How will we design a C3 API?

The rest of the chapter is composed of the following lessons:

  1. CamelCamelCamel API Design Decisions: In this lesson, we’ll discuss the workflow and components involved in the C3 service. We'll also focus on making design decisions to build an effective C3 API service.

  2. API Model for CamelCamelCamel Service: We’ll discuss the data entities and endpoints of the C3 service needed to fulfill the functional requirements. We'll also define formats of request and response messages in this lesson.

  3. CamelCamelCamel's Communication with Amazon Service: We’ll discuss how the C3 and Amazon APIs communicate synchronously to provide up-to-date results for the client’s query.

  4. CamelCamelCamel API Design Evaluation and Latency Budget: This lesson discusses the non-functional requirements and optimizations for the C3 service. The response time of the API will also be a focal point because we'll see a change in processing time due to synchronous communication.

Let's start by discussing design considerations in the next lesson.