Giter Club home page Giter Club logo

grpc's Introduction

Microservices Orchestration Demo

  • Service discovery with either consul or kubernetes services
  • Load balancing between nodes
  • Pub/Sub Events with Kafka
  • Circuit breaker [TODO]

Build

Build docker images

make build

Run

Option 1: Docker + Consul

You can run the demo locally in docker using consul as service discovery (go-micro default registry)

make up

To check the output

make logs

To stop it type

make down

Option 2: Kubernetes in minikube

You can use a local kubernetes cluster to deploy the demo Install minikube an activate set up the terminal to use the minikube docker

eval $(minikube docker-env)

Rebuild the images so they are available inside the minikube docker

make build

Deploy Kafka, it will take some seconds

make deploy-kafka

Once kafka is ready then deploy the demo

make deploy

To remove all services type:

make destroy
make destroy-kafka

Appendix: Installation fo Protocol Buffers (Mac OSX)

Install the proto compiler

With brew

NOTE: The next steps will install the compiler from the source, alternatively you can use brew

brew install protobuf

From source

Prerequisites

brew install autoconf && brew install automake
  1. Download the appropriate release here: https://github.com/google/protobuf/releases

  2. Configure and build the compiler

./autogen.sh
./configure
make
make check
  1. Install it
sudo make install
which protoc
protoc --version

Install the Go plugin for the proto compiler

go get -u github.com/golang/protobuf/protoc-gen-go

Make sure $GOPATH/bin is available on the $PATH

Compile the proto spec to Go classes

protoc --go_out=. protobuf/greeter.proto

grpc's People

Contributors

hmoragrega avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.