• Stars
    star
    1,104
  • Rank 42,038 (Top 0.9 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code repository for my Building Microservices YouTube series https://www.youtube.com/playlist?list=PLmD8u-IFdreyh6EUfevBcbiuCKzFk0EW_

Building Microservices in Go YouTube

Code repository for my Building Microservices YouTube series https://www.youtube.com/playlist?list=PLmD8u-IFdreyh6EUfevBcbiuCKzFk0EW_

Week by week Building Microservices builds on the previous weeks code teaching you how to build a multi-tier microservice system. The code structure for the course is one of a mono repo. To make it simple to follow along, each episode has its own branch showing progress to date.

Get $100 dollars of Digital Ocean credits, valid for 90 days with my referal link. Not needed for the YouTube tutorials, but helps me pay for my own servers.

DigitalOcean Referral Badge

https://m.do.co/c/c6dee99fad25

Services

Product API ./product-api

RESTful Go based JSON API built using the Gorilla framework. The API allows CRUD based operations on a product list.

Frontend website ./frontend

ReactJS website for presenting the Product API information.

Currency ./currency

gRPC service supporting simple Unaray and Bidirectional streaming methods.

Product Images ./product-images

Go based image service supporting Gzipped content, multi-part forms and a RESTful approach for uploading and downloading images.

Series Content

Over the weeks we will look at the following topics, teaching you everything you need to know regarding building microservices with the go programming language:

  • Introduction to microservices
  • RESTFul microservices
  • gRPC microservices
  • Packaging applications with Docker
  • Testing microservice
  • Continuous Delivery
  • Observability
  • Using Kubernetes
  • Debugging
  • Security
  • Asynchronous microservices
  • Caching
  • Microservice reliability using a Service Mesh

Episode 1 - Building a simple microservice

https://youtu.be/VzBGi_n65iU

Branch: episode_1

In this episode I show you how to build the simplest service you can using the standard packages in the Go programming language.

Episode 2 - Building a simple microservice, continued

https://youtu.be/hodOppKJm5Y

Branch: episode_2

In this episode we learn more about the standard library and look at how we can refactor last episodes example into a reusable microservice pattern.

Episode 3 - RESTFul microservices

https://youtu.be/eBeqtmrvVpg

Branch: episode_3

In this episode we start to learn about RESTFul services and reading and writing data using the JSON format.

Episode 4 - RESTful microservices

https://youtu.be/UZbHLVsjpF0

Branch episode_4

We continue to look at how you can implement RESTFul services with the Standard API

Episode 5 - Gorilla toolkit

https://youtu.be/DD3JlT_u0DM

Branch episode_5

In this epsode we refactor our Standard library RESTful service and start to implement the Gorill toolkit for routing.

Episode 6 - JSON Validation

https://youtu.be/gE8_-8KoOLc

Branch episode_6

In this episode we will look at the Go Validator package and how it can be used to validate JSON.

Episode 7 - Documenting APIs with Swagger

https://youtu.be/07XhTqE-j8k

Branch episode_7

This epsiode shows you how you can document the API we have been building over the last couple of weeks. As a bonus we will also look at how we can embed ReDoc to build a nice documentation API direct into our service.

Episode 8 - Auto-generating HTTP client code from Swagger documentation

https://youtu.be/Zn4joNjqBFc

Branch episode_8

In this episode we look at how we can use the Swagger API documentation we created in the last episode and generate a Go client SDK. As it turns out I had a little bug in my code hope you all find the process of debugging this and finding root cause useful too.

Episode 9 - CORS (Cross-Origin Resource Sharing)

https://youtu.be/RlYoy_RiYPw

Branch episode_9

In this episode we are going to take a look at CORS (Cross-Origin Resource Sharing). CORS is a security feature built into web browsers which restricts upstream requests to sites on different domains. We look at a typical example of a React website on one domain calling a back end API, see the impact of CORS and how to solve it.

Episode 10 - Serving and uploading files

https://youtu.be/ctmhYJpGsgU

Branch episode_10

In this episode you will learn how to upload and serve files using the Go standard library.

Episode 11 - Handling multi-part form uploads

https://youtu.be/_7-IhHMptNo

Branch episode_11

In this episode you will learn how to handle multi-part form uploads. Mult-part forms used to be common place as they are the basic way that browsers would upload data to a server. This pattern has fallen out of fashion as most moder data transfer to the server is done using XHR requests. There might still be a case when you need to know this though.

Episode 12 - Using Gzip compression for HTTP responses

https://youtu.be/GtSg1H7SU5Y

Branch episode_12

In this episode we walk through how to wrap a http.ResponseWriter to enable Gzip compression for HTTP responses.

HTTP Headers Accept-Encoding: https://developer.mozilla.org/en-US/d...

HTTP ResponseWriter: https://golang.org/pkg/net/http/#Resp...

Episode 13 - Introduction to gRPC and Protocol Buffers

gRPC is a high performance framework for client server applications. It is designed to be cross platform and is an awesome alternative to RESTful services.

In this episode we take a quick look at gRPC and Protocol Buffers, and how you can use them to build a simple API. This is the first video in a series of content where we dig into gRPC services.

gRPC Framework: https://grpc.io/

Protocol Buffers v3 Language Guide: https://developers.google.com/protocol-buffers/docs/proto3

Protocol Buffers v3 Encoding format: https://developers.google.com/protocol-buffers/docs/encoding

https://youtu.be/pMgty_RYIOc

Branch episode_13

Episode 14 - gRPC Client Connections

In this episode we take a quick look at how you can connect to gRPC services in Go.

Protocol Buffers Enum Specification: https://developers.google.com/protocol-buffers/docs/reference/proto3-spec#enum_definition

gRPC Creating gRPC Clients: https://grpc.io/docs/tutorials/basic/go/#client

https://youtu.be/oTBcd5J0VYU

Branch episode_14

Episode 15 - Refactoring Part 1/3

This video is part 1 of 3 where we start to clean up the code base a little before continuing to develop our gRPC service. Refactoring is a natural part of software development, it is difficult to get things right first time all the time. Rather than spend too much time on the perfect solution I like to go with the flow and clean up at a later date.

As part of our refactoring we look at the encoding/xml and how it is very similar in use to encoding/json.

Encoding/XML: https://golang.org/pkg/encoding/xml/

https://youtu.be/Vl88R9acq-Y

Branch episode_15_1

Episode 15 - Refactoring Part 2/3

In this episode I continue to refactor the code base so far. These videos are really just intended to ensure that you are not completely confused when looking at the source code changes between episode 14 and episode 16.

Source Code: https://github.com/nicholasjackson/building-microservices-youtube/tree/episode_15_2

Encoding/XML: https://golang.org/pkg/encoding/xml/

https://youtu.be/QBl8LZ0Rems

Branch episode_15_2

Episode 15 - Refactoring Part 3/3

In this episode I finalize the refactoring for the code base.

https://youtu.be/ARvOyAsuFog

Branch episode_15_2

Episode 16 - gRPC Bi-directional streaming, part 1/2

In this video we start to look at gRPC bi-directional streaming

gRPC streaming allows you to independently receive streamed messages from the client and send a response to it. This episode looks at the basics of streaming API by adding an update to our currency service.

Server-side streaming: https://grpc.io/docs/languages/go/basics/#server-side-streaming-rpc

Client-side streaming: https://grpc.io/docs/languages/go/basics/#client-side-streaming-rpc

https://youtu.be/4ohwkWVgEZM

Branch episode_16

Episode 17 - gRPC Bi-directional streaming, part 2/2

In this video we continue to look at gRPC bi-directional streaming.

You will see how to take the simple example in the first part and how it can be implemented into the Products API to support independent client and server streams. The simple example allows a client in the Product API to subscribe for currency rate changes in the Currency service. Whenever a rate changes the currency service broadcasts this change to all interested subscribers.

Server-side streaming: https://grpc.io/docs/languages/go/basics/#server-side-streaming-rpc

Client-side streaming: https://grpc.io/docs/languages/go/basics/#client-side-streaming-rpc

https://youtu.be/MT5tXSKa-KY

Branch episode_17

More Repositories

1

fake-service

Simple service for testing upstream service communications
Go
387
star
2

mtls-go-example

Simple example using mutual TLS authentication with a Golang server
Shell
146
star
3

demo-consul-service-mesh

Demos built using Docker Compose showing Consul Service Mesh features
Shell
144
star
4

building-microservices-in-go

Example code to accompany the book building Microservices in go
Go
100
star
5

cnitch

Container Snitch checks running processes under the Docker Engine and alerts if any are found to be running as root
Go
70
star
6

go-microservice-template

Template setup for a microservice written in Go - DEPRECATED
Go
54
star
7

minke

Tools for building Microservices with Docker
Ruby
45
star
8

env

Package to provide configuration as environment variables for 12 factor applications
Go
42
star
9

shipyard

Consul and Kubernetes running on Docker https://shipyard.demo.gs/
Shell
41
star
10

wasp

Wasm System Plugins for Go
WebAssembly
37
star
11

protractor-cucumber-example

Small example of how to use protractor with cucumber for angular application testing.
JavaScript
37
star
12

envoy-experiments

Experiments with Envoy Proxy
WebAssembly
35
star
13

demo-vault

Demos for Hashicorp Vault
Java
34
star
14

docker-consul-envoy

Docker image with Consul and Envoy
HCL
30
star
15

terraform-digitalocean-k8s

Terraform / Packer example for Kubernetes on DigitalOcean
HCL
29
star
16

terraform-digitalocean-lifecycle

Zero downtime upgrades of images in Terraform
HCL
28
star
17

helloworld

Example microservice to show the use of go-microservice-template and minke build gem.
Go
26
star
18

open-faas-functions

Collection of functions for OpenFaas (http://openfaas.com)
Go
24
star
19

microservice-basebox

Docker basebox built on alpine, contains Consul template and Skaware daemon runner.
23
star
20

bakery

Simple tool to backup and restore ChromeOS Crostini containers
Go
20
star
21

minke-generator-go

Minke generator to create a REST API microservice with Golang
HTML
19
star
22

dotfiles

Various configuration dotfiles for Vim, etc
Lua
18
star
23

grpc-consul-resolver

HashiCorp Consul Resolver for use with gRPC load balancer
Go
17
star
24

dagger-example

Simple example to build and deploy a Go app using the Dagger Go SDK
Go
16
star
25

terraform-provider-slack

Terraform provider for administering slack
Go
16
star
26

terraform-nomad-multicloud

Example repository for running a federated Nomad / Consul / Vault cluster in AWS and GCP
HCL
15
star
27

consul-escape-hatch-demo

Example showing how the Envoy configuration escape hatch can be used with Consul
HCL
14
star
28

all-things-microservices

Monorepo for All Things Microservices YouTube Series
Go
13
star
29

terraform-azure-k8s

Example to create a Kubernetes cluster in Azure
HCL
13
star
30

consul-release-controller

Canary deployment controller for Consul Service Mesh
Go
13
star
31

kapsule

Kapsule is a tool for packaging LLM models into encrypted OCI images that can be pushed to a registry like Docker Hub
Go
13
star
32

terraform-modules

Example Terraform modules
HCL
12
star
33

terraform-provider-workshop

MDX
11
star
34

terraform-aws-hashicorp-suite

Terraform module for creating HashiCorp Nomad and Consul clusters
HCL
11
star
35

vault-dev-patterns

Various HashiCorp Vault development patterns
Go
11
star
36

slack-bot-lex-lambda

Example slack bot using AWS Lambda and Lex
JavaScript
11
star
37

pipe

Multi provider event grid written in go
Go
10
star
38

consul-smi-controller

Controller implementing SMI Spec for HashiCorp Consul
Go
9
star
39

nomad-arm6l

Build of Nomad for Arm6l such as the Raspberry Pi Zero
HCL
8
star
40

consul-canary-deployment

Example showing how to do automated canary deployments with Consul and Flagger
HCL
8
star
41

waypoint-ecs

Example repository for running HashiCorp Waypoint on ECS
HCL
8
star
42

testing-microservices

Simple example app to show a holistic testing strategy for micro services in Go
Go
7
star
43

terraform-aws-open-faas-nomad

Example Terraform configuration to create OpenFaas on Nomad for AWS
HCL
7
star
44

terraform-aws-gcp-vpn

Terraform module to create a VPN between AWS and GCP
HCL
7
star
45

open-faas-templates

GoCV OpenCV template for OpenFaaS
Go
6
star
46

config

Config is a simple package for loading JSON formatted config files.
Go
6
star
47

bench

Bench is a simple load testing application for Microservices
Go
6
star
48

wasm-examples

Various language examples to use Wasm and WASI
WebAssembly
6
star
49

ultraclient

Load balancing, circuit breaking client with retries for Go
Go
6
star
50

terraform_ci

Example code from Digital Ocean Tide conference
HCL
6
star
51

cloud-pong

Terminal based Cloud Pong
Shell
6
star
52

drone-face-detection

Golang application to detect faces from an RTSP video stream using OpenCV
Go
6
star
53

consul-gateways-demo

Demo code for multi-cloud Consul gateways
Shell
6
star
54

terraform-for-developers

JavaScript
6
star
55

terraform-alicloud-demo

Simple Demo showing how Terraform can be used with Alibaba Cloud and Circle CI
HCL
6
star
56

consul-connect-router

Simple http router for Consul Connect services
Go
6
star
57

oscon-wasm-plugins-example-code

Example code from OSCON Session - Plugin Development with WASM and Go
WebAssembly
5
star
58

textbox-example

Example of basic sentiment analysis with Machinebox.io
Go
5
star
59

terraform-gcp-hashicorp-suite

Terraform module to run Nomad on Google Cloud
HCL
5
star
60

consul-migrating-brownfield-to-greenfield

Workshop showing how to migrate legacy applications running in VMs to Kubernetes using a Service Mesh
5
star
61

vault-application-secrets

Example showing how to use Vault and Vault Agent to inject application secrets
HCL
5
star
62

terraform-gcp-cloud-run-vault

Terraform module to run HashiCorp Vault on Google Cloud Run
HCL
5
star
63

envoy-binaries

Repo containing Envoy Proxy binaries
5
star
64

expense-report

Example expense report application that uses Vault's transit secrets engine
Go
5
star
65

demo-terraform-minecraft

Deploy a Minecraft Server with Terraform
HCL
4
star
66

workshop-vault-for-developers

Vault for Developers Workshop
Go
4
star
67

terraform-cfgmgmtcamp

Example code for config management camp talk
HCL
4
star
68

consul-loader

Simple gem to push a yaml file into consul key values
Ruby
4
star
69

consul-envoy-windows

Example of running two services using Consul Service Mesh and Envoy on Windows
HCL
4
star
70

consul-servce-mesh-example

HCL
4
star
71

terraform-aws-fargate-example

EKS Cluster with DB and Pod
HCL
3
star
72

hashicraft

HCL
3
star
73

consul-fargate-injection

Utility to inject Consul service mesh containers for EKS Fargate
Go
3
star
74

go-mobile-framework

Example framework for the Go mobile talk
Go
3
star
75

spot-gps-cache

Simple server written in Go to cache calls to Spot GPS Tracker API.
Ruby
3
star
76

waypoint-eks-fargate-example

Example showing how to run Waypoint on EKS Fargate
HCL
3
star
77

measured-application-delivery

Example showing how to use canary deployments and app migration with Consul Service Mesh
HCL
3
star
78

waypoint-plugin-tfc

Waypoint Plugin to interact with Terraform Cloud
Go
3
star
79

terraform-nomad-multi-cloud

Terraform example to demonstrate a multi-cloud instance of Nomad running on AWS and GCP
HCL
3
star
80

workshop-spring-vault

Workshop showing how to use Spring Boot with Vault
MDX
3
star
81

demo-securing-llms-with-vault

Demo repo showing how to secure the training and storage of Large Language Models using HashiCorp Vault
Jupyter Notebook
3
star
82

vault-dotnet

Example app showing how to use Vault with DotNet
C#
2
star
83

vault-plugin-template

Example template repo for creating Vault secrets plugins
Go
2
star
84

demo-terraform-basics

Shell
2
star
85

open-skills

Open source framework to manage and promote skills within an organisation
2
star
86

SwigGo

Example code to create a c++ library that can be wrapped with Swig so that it can be used with Go
Ruby
2
star
87

vault-k8s-demo

Demo showing how to write Vault secrets in Kubernetes containers
Shell
2
star
88

echo-config

Simple service showing how to load json based config
Go
2
star
89

sainsmart-lcd2004

Golang I2C interface for Periph.io and the LCD 2004
Go
2
star
90

m3o-examples

Examples of services built in M3O (https://m3o.com/)
Go
2
star
91

hashicorp-shipyard-modules

HashiCorp modules for Shipyard (shipyard.run)
HCL
2
star
92

nicholasjackson.github.io

Github Pages
CSS
2
star
93

sleepy-client

Useless package, serves no purpose, do not use
Go
2
star
94

sentinel_aws_example

Example Sentinel policy to check AWS providers
HCL
2
star
95

sphero-mini

Library for interacting with the Sphero Mini using Bluetooth LE
Go
2
star
96

tfc-plan

Simple tool to generate a JSON plan from Terraform Enterprise or Terraform Cloud
Go
2
star
97

periph-gpio-simulator

Simple GPIO simulator for Raspberry Pi and Periph.io
Go
2
star
98

kitura-http-test

Swift package to make testing handlers in the Kitura framework super easy
Swift
2
star
99

KituraTesting

Example of effective unit testing for Kitura handlers
Swift
2
star
100

rcswitch

433MHz switch receiving and transmission library for Periph.io
Go
2
star