Skip to content

Well I'm trying to make and connect three independent micro-services

Notifications You must be signed in to change notification settings

shivamsouravjha/Micro-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro-Game

An online self-publishing portal to let users read the content. Theyare meant tohelp readers be consistent inreading and develop a regular userbase.Chapters are unlocked daily per series for new users.New User and New Content are managed to make sure free 4 chapters for everyone(every chapter added is made available to everyone).Independent Micro-Services made to inter-connect Services.MetaData is uploaded in bulk and stored in Relational Database. This also has the function of unlocking a chapter everyday for the user(regular signing means one chapter unlocked daily).

Explaining the Architecture

This application contains three services,

User Service

  • Service description : Contains user details like name, email etc
  • Apis :
    • Fetch users
    • Create a new user

Content Service

  • Service description : Contains meta of readable content that we serve to the users
  • Each content is structured as a series which can contain multiple chapters.
  • Example: consider a series called “Harry Potter” which has 7 chapters
  • Apis required :
    • Fetch content for a user
    • Input : userid , multiple series ids
    • Output : content meta with only unlocked chapters per series
    • Api for bulk upload of the content

Daily Pass

  • Service description : Contains the details of how many chapters per series is unlocked for a particular user

    • When a user installs the Pratilipi Application (i.e. day1 of user creation) , 4 chapters are unlocked by default on the day of installation
    • Rest of the chapters are released on a daily basis; that is one chapter per day
    • Any new content that is uploaded, again by default has 4 unlocked chapters for all the users
  • So if a series is uploaded after user creation then the existing users should also see that series with only 4 chapters unlocked

  • Apis

    • Api to unlock one chapters for the given user and series
    • For testing purpose : this api should not be idempotent, if I hit the api twice, it should unlock two episodes for the requested user and series
    • Number of unlocked chapters = 4 + no. of times unlock api is hit
    • Fetch daily pass data by user
  • Import Postman Requests Curl (Import using JSON link)

Explaining APIs:-

Inter-Connected Microservices:-

  • CreateUser
    • New User is created and userID is sent to get all available chapter.
  • UserSeries
    • All available chapters with userID is stored in DailyPass Service Database.
  • SeriesContent
    • New Series is added,it's added to all existing users.

Things I used:-

  • Go(lang)
  • SQL
  • RabbitMQ(to connect microservices)
  • JWT(for unlocking chapters)

How did I deploy things?

Overall Schematic

Group Schema (5)

User Service Schematic

System Flow (2)

Content Service Schematic

System Flow (11)

DailyPass Service Schematic

System Flow (10)

About

Well I'm trying to make and connect three independent micro-services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages