Mutant solution with Go-Micro

This repo contains an examples solution for serving microservices via the micro api. We use the following technologies:
Go Micro is a pluggable RPC framework for distributed systems development.
The micro philosophy is sane defaults with a pluggable architecture. It provides defaults to get you started quickly but everything can be easily swapped out. It comes with built in support for {json,proto}-rpc encoding, consul or multicast dns for service discovery, http for communication and random hashed client side load balancing.
Consul is a service mesh solution providing a full featured control plane with service discovery, configuration, and segmentation functionality. Each of these features can be used individually as needed, or they can be used together to build a full service mesh. Consul requires a data plane and supports both a proxy and native integration model. Consul ships with a simple built-in proxy so that everything works out of the box, but also supports 3rd party proxy integrations such as Envoy.
The micro api is an API gateway which serves HTTP and routes to RPC based services.
In the micro ecosystem we logically separate concerns via architecture and tooling. Read more on buiding an API layer of services
in the architecture blog post.
Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.

Project Overview
The technologies used are the followings:
- GoLang: Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
- Go Dep: Golang dependency manager.
- Protobuf: This is protobuf code generation for micro, to use Google's data interchange format.
Project code structure:
doc/ Some documentation resources
srv/ ml-mutant micreoservices
gateway
mutant
stats
deploy/ Deployment instruction and resources
verndor/ Dependency folder created by dep
Getting Started
Let's start setting up our workspace doing the following:
Then get the repository using go get:
go get github.com/rodrigodmd/ml-mutant-srv
Resolve Dependencies with dep:
cd $GOPATH/src/github.com/rodrigodmd/ml-mutant-srv
dep ensure
To run all the services locally we can use docker compose.
docker-compose up
Local endpoints:
http://localhost:8080/api/mutant
http://localhost:8080/api/stats
Try with curl
Mutant DNA:
curl --header "Content-Type: application/json" \
--request POST \
--data '{ "dna": ["ATGCAA","CAGTTT","TTATTT","AGAAGG","CCACTA","TCACTG"] }}' \
http://localhost:8080/api/mutant
Human DNA:
curl --header "Content-Type: application/json" \
--request POST \
--data '{ "dna": ["ATGC", "CAGT", "TATT", "AGAA"] }}' \
http://localhost:8080/api/mutant
Invalid DNA structure:
curl --header "Content-Type: application/json" \
--request POST \
--data '{ "dna": ["ATGCAA","invalid","TTATTT","AGAAGG","CCACTA","TCACTG"] }}' \
http://localhost:8080/api/mutant
Get stats:
curl --header "Content-Type: application/json" \
--request GET \
http://localhost:8080/api/stats
Try with go micro web
You can also play with the go micro development web: http://localhost:8082

Congratulations! Now you are ready to work in each micro service:
Build and push base docker image:
make docker-push
Deploymeny
Go to deployment section.