Slide 1

Slide 1 text

A Hitchhiker's Guide to Enterprise Microservices with Go {{ define "GoDays 2020“ }} @LeanderReimer #cloudnativenerd {{ end }}

Slide 2

Slide 2 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} #whoami 2 Mario-Leander Reimer Chief Software Architect QAware GmbH

Slide 3

Slide 3 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} Why you should Go Cloud Native in 2020? 3 https://www.loodse.com/blog/why-you-should-go-cloud-native-in-2020 Today

Slide 4

Slide 4 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} 4 Enterprise Cloud Native ANTIFRAGILITY HYPERSCALE TRAFFIC, DATA, FEATURES RECRUITING SPEED DEVOPS & CONTINUOUS DELIVERY OPEX SAVINGS (automation & utilization)

Slide 5

Slide 5 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} 5 https://www.tiobe.com/tiobe-index/ Tiobe
 Ranking

Slide 6

Slide 6 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} Criteria for Enterprise usage ✓ Maturity: active community, stable releases, security patches ✓ IDE Support: developer friendliness. IntelliJ, VS Code, Goland, … ✓ Tooling: build tools, dependency management, debuggers, profilers ✓ Library Ecosystem: good standard library and open source libraries ✓ Documentation: online docs, literature and training available ✓ Integration: good interop with Enterprise standards and technology 6

Slide 7

Slide 7 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} This is NOT an Enterprise Microservice! 7 package main import ( "fmt" "net/http" "os" ) func main() { http.HandleFunc("/", index) http.ListenAndServe(":8080", nil) } func index(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) fmt.Fprintf(w, "Hello World @ GoDays 2020.“) } But Go provides a solid foundation to build Enterprise Microservices.

Slide 8

Slide 8 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} Essential Cloud-native Design Principles • Design for Distribution: Containers; microservices; API driven development. • Design for Configuration: One image, multiple environments. • Design for Resiliency: Fault-tolerant and self-healing. • Design for Elasticity: Scales dynamically and reacts to stimuli. • Design for Delivery: Short roundtrips and automated provisioning. • Design for Performance: Responsive; concurrent; resource efficient. • Design for Automation: Automated Dev & Ops tasks. • Design for Diagnosability: Cluster-wide logs, metrics and traces. • Design for Security: Secure Endpoints, Zero Trust, E2E-Encryption 8

Slide 9

Slide 9 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} The Anatomy of an Enterprise Microservice 9

Slide 10

Slide 10 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} 10 • REST APIs • Swagger + OpenAPI v3 • RPC APIs • Loose Coupling • Event Driven Architecture • CQRS, Event Sourcing • Consul, Kubernetes, … • Cloud Provider • Circuit Breaking • Bulk Heading • Environment Variables • Kubernetes ConfigMaps • YAML or JSON files • Consensus with DDS, Raft, etcd, … • Support for RDBMS, noSQL, et al. • In-Memory Caches • Redis, Memcached • TLS, mTLS • Encryption + Signing • JWT, OpenID • Structured Logging • Health & Metrics • Prometheus, et.al. • OpenTracing Support • Jaeger, Zipkin Integration

Slide 11

Slide 11 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} 11 go get github.com/micro/go-micro go get github.com/NYTimes/gizmo/… go get github.com/koding/kite Microservice Chassis go get github.com/gin-gonic/gin
 go get github.com/go-martini/martini
 go get github.com/urfave/negroni
 go get github.com/gorilla/mux Web Frameworks

Slide 12

Slide 12 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} 12 import log "github.com/inconshreveable/log15"
 import log „github.com/sirupsen/logrus" import "github.com/prometheus/client_golang/prometheus"
 import "github.com/armon/go-metrics" import "github.com/opentracing/opentracing-go"
 import „github.com/uber/jaeger-client-go" import "github.com/jinzhu/gorm"
 import „upper.io/db.v3/postgresql" (mongo, …)
 import "gopkg.in/gorp.v1"
 import „github.com/jmoiron/sqlx"

Slide 13

Slide 13 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} Is Go and its library universe fit for the Cloud-native enterprise? 13 Yes.

Slide 14

Slide 14 text

{{ define "GoDays 2020" }} A Hitchhiker's Guide to Enterprise Microservices with Go // @LeanderReimer #cloudnativenerd #qaware {{ end }} Is Go and it’s library universe fit for the Cloud-native enterprise? 14 Yes, but …

Slide 15

Slide 15 text

Mario-Leander Reimer Chief Software Architect, QAware GmbH [email protected] https://www.qaware.de https://speakerdeck.com/lreimer/ https://github.com/lreimer/ &