Skip to content

Latest commit

 

History

History

like-count

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LikeCount Service

The main function of the LikeCount service is fetch the number of likes on an item.


Database (like)

Although noSQL database is used but a proper Schema is maintained.

Shares this collection with LikeBatchUpdaterService. Although it violates the microservices design pattern, but it works because one service can only read and the other can only write.

Shares this collection with LikeBatchUpdaterService. Although it violates the microservices design pattern, but it works because one service can only read and the other can only write.


API Reference

Fetches the number of like on an item (a post or comment) with id itemId (postId or commentId).

  GET /api/likeCount/:itemId

Architecture

Calculating likeCount

The total likes on an item are calculated by summing the values of RTLikeCount and DailyLikeCount.


Architecture Diagram

likeCount