Microservices In Practice: Developing Instagram Clone —Newsfeed Service

Amr Saleh
Javarevisited
Published in
4 min readJun 21, 2020

--

This is part 7 of Developing Instagram Clone series, other parts are linked below

  1. Developing Instagram Clone: Introduction.
  2. Developing Instagram Clone: Discovery Service.
  3. Developing Instagram Clone: Auth Service.
  4. Developing Instagram Clone: Media Service.
  5. Developing Instagram Clone: Post Service.
  6. Developing Instagram Clone: Graph Service.
  7. Developing Instagram Clone: Newsfeed Service.
  8. Developing Instagram Clone: Gateway Service.
  9. Developing Instagram Clone: Front-end Service

In any social network, there is a place where updates from followings. In our case updates mean new photos.

The feed service has two main functionalities

  1. Generate user feed based on the posts the user is following.
  2. Retrieve user feed.

Feed Generation Models

There are two models that we will discuss, the pull and the push models.

  • Pull model: whenever feed service receives a request to generate the feed for a user, it will perform the following steps:
    1. Retrieve…

--

--

Amr Saleh
Javarevisited

I’m a software engineer who is passionate about software architecture and design. Enjoy coding in Java, Scala, and JavaScript.