Skip to content

This is a simple docker based microservice to do simple calculations.

Notifications You must be signed in to change notification settings

sachithmuhandiram/simplest-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The simplest Microservice

Here I am developing a simple microservice based system using golang.

This system has an API gateway (mainmodule) and four microservices,

  • Add (addmodule)
  • Substraction
  • Divide
  • Multiply

First API gateway will develop to handle just single operation in one request. Later it will be modified to handle complex mathematical operations.

Eg: When API gateway gets 1+10(8-6)/2

  1. Sends (8-6) to substration service gets the answer.
  2. Sends 2/2 to divide service and gets the answer.
  3. Sends 1*10 to multiply service and gets the answer.
  4. Sends 1+10 to add module and gets the final answer.

API gateway and other services will be developed using minimal 3rd party packages.

Important

To Do

  • Add Unit tests for each module
  • 2 phase builds of docker images. As I use four alpine:golang instances.
  • API gateway functionalities one by one.
    • - Implementing circuite-braker pattern
    • - Service Descovery
    • - Security (http requests etc)
    • - Logical expression parsing

How to run

git clone https://github.com/sachithmuhandiram/simplest-microservice.git

sudo docker-compose up --build

https://www.reddit.com/r/golang/comments/cweswg/golang_part_time_developer_beginners_level/

About

This is a simple docker based microservice to do simple calculations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published