Microservices In Practice: Developing Instagram Clone — Media Service

Amr Saleh
Javarevisited
Published in
3 min readJun 14, 2020

--

This is part 4 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 real, the responsibilities of the media service should be to upload an image to a cloud object storage like Amazon S3 and stores a metadata about the image in a data store, MongoDB in our case.

To avoid paying for object storage services, media service has an additional responsibility (hack) to store the images on file system and to serve the images.

As always we start by cloning the Media service from GitHub.

Spring static resource configurations

--

--

Amr Saleh
Javarevisited

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