Coder Social home page Coder Social logo

chrischenyc / microservices-in-go Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 498 KB

following along Nick Jackson's "Building Microservices with Go" series on YouTube

License: MIT License

Go 99.77% Makefile 0.23%
golang microservice api container

microservices-in-go's Introduction

Building Microservices with Go

I'm following along Nick Jackson's Building Microservices with Go series on YouTube.

Building Microservices with Go - Nick Jackson

I love his style of teaching.


Background

I started using Go since Apr 2021, but mostly with AWS SDK for Go V2 and Lambda in Go.

Come to think of it, my previous project was also a serverless one on AWS, but with Javascript.

So last time I developed commerical container-based system was around 2019-2020. And it was a monolith server backed by TypeScript, Node.js, PostgreSQL, and of course, Kubernetes. We ran into the textbook Monolith Hell, a prevailing architecture struggle described in Chris Richardson's book Microservices Patterns. I'm reading this book by the way.

Microservices Patterns - Chris Richardson

Goals

  • learn more Go
  • brush up building REST APIs
  • learn gRPC
  • last but not least: learn Nick Jackson's style of teaching

Logs

  • 2021-09-12: init commit!
  • 2021-09-12: ep-01 hello world http server
  • 2021-09-14: ep-02 refactor to http handler modules. shut down server gracefully
  • 2021-09-14: ep-03 basic REST api
  • 2021-09-16: ep-04 basic REST api CRUD
  • 2021-09-26: ep-05 use Gorilla Mux to bootstrap REST routes. it is very similar to express.js.
  • 2021-10-02: ep-06 use Go validator to validate REST request input. it is a different approach from joi, where the validation rules are tied with HTTP handler middleware.
  • 2021-10-04: ep-07 generate Swagger API docs.
  • 2021-10-09: ep-08 generate API client from Swagger spec.
  • 2021-10-09: ep-09 more gorilla handler/middleware.

Tricks

  • auto-compile and re-start the server on file changes. unlike Javascript, Go community doesn't seem to have a go-to solution.

    # https://techinscribed.com/5-ways-to-live-reloading-go-applications/
    
    npx nodemon --exec go run main.go --signal SIGTERM
  • run go tests recursively in all sub directories

    go test -v ./...

other references I read

open questions

microservices-in-go's People

Contributors

chrischenyc avatar

Stargazers

 avatar

Watchers

 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.