Skip to content

sloppycoder/ngms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next generation micro service project (ngms)

badge

POC for next generation cloud native micro service using gRPC. grpc-gateway is used to translate between REST to gRPC when needed.

The benefits of the architecture:

  • standardized interface spec
  • more express and powerful than REST
  • better performance with binary based protocol
  • cloud native, integrates seamlessly into K8S

Components

Tools used in this repo

  1. Go 1.13
  2. MongoDB server 4.2 test data. Any Python 3.7 installation will do
  3. minikube, your local Kubernetes cluster for testing
  4. skaffold, think of npm serve for K8S development
  5. GitHuab actions workflow is used to build and publish docker images on Github Package Registry.

Create dev database and populate with seed data

Install MongoDB server 4.2 then

# populate test data 
# this will import 1 json document into dev db, accounts collection
cd benchmark
mongoimport -u dev -p dev --db=dev --collection=accounts < benchmark/seed.json

Quick Start

To quickly try the setup including Prometheus and Grafana but without installing Go and compile and etc,

  1. minikube
  2. make sure your /etc/hosts contain an entry called vmhost.localm which is used by db.yaml
  3. Run cd k8s; ./all
  4. Open browser to grafana and Locust by getting url with
minikube service grafana --url

minikube service locust --url

Run this with Docker without Kubernetes

The docker public images below should work for this purpose.

To be written. contributors welcome

# these steps are not yet tesed
# populate test data.. 
mongoimport -u dev -p dev --db=dev --collection=accounts < benchmark/seed.json

docker run -n account-svc docker.pkg.github.com/sloppycoder/ngms/account-svc:latest
docker run -n locust docker.pkg.github.com/sloppycoder/ngms/benchmark:latest


Releases

No releases published

Packages

No packages published