Upgrade to Pro — share decks privately, control downloads, hide ads and more …

なぜ Go はマイクロサービスのための言語なのか - Why Go is a language for microservices

Kohei
July 13, 2019

なぜ Go はマイクロサービスのための言語なのか - Why Go is a language for microservices

Kohei

July 13, 2019
Tweet

More Decks by Kohei

Other Decks in Technology

Transcript

  1. SIerɺࠃ಺Ϋϥ΢υϕϯμʔΛܦͯ2018೥1݄ Nulab ೖࣾ Cacoo νʔϜͷόοΫΤϯυΤϯδχΞ ։ൃݴޠ ΄΅ ≡, ·Εʹ Java,

    Node.js ొஃ࣮੷ Kubernetes Meetup Tokyo #14 CloudNative Days Fukuoka 2019 AWS Summit Osaka Kohei Kimura @cohhei
  2. "Go was designed by and for people who write —and

    read and debug and maintain—large software systems." Rob Pike, Go at Google
  3. FROM golang:1.7.3 WORKDIR /go/src/github.com/alexellis/href-counter/ RUN go get -d -v golang.org/x/net/html

    COPY app.go . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=0 /go/src/github.com/alexellis/href-counter/app . CMD ["./app"] ΈΜͳ͍͖ͩ͢ multi-stage builds
  4. FROM golang:1.7.3 WORKDIR /go/src/github.com/alexellis/href-counter/ RUN go get -d -v golang.org/x/net/html

    COPY app.go . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=0 /go/src/github.com/alexellis/href-counter/app . CMD ["./app"] ΈΜͳ͍͖ͩ͢ multi-stage builds Ϗϧυ༻ͷεςʔδ
  5. FROM golang:1.7.3 WORKDIR /go/src/github.com/alexellis/href-counter/ RUN go get -d -v golang.org/x/net/html

    COPY app.go . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=0 /go/src/github.com/alexellis/href-counter/app . CMD ["./app"] ΈΜͳ͍͖ͩ͢ multi-stage builds ࣮ߦ༻ͷεςʔδ Go ͸Πϯετʔϧ͞Ε͍ͯͳ͍ Ϗϧυ༻ͷεςʔδ͔Β ϑΝΠϧΛίϐʔ
  6. Protofiles Git repositories Generated code Generate Webhook git push origin

    develop/ beta/master Protocol Buffers ϑΝΠϧ͸୯ҰͷϦϙδτϦͰ؅ཧ ϑΝΠϧ͕ߋ৽͞ΕΔͱ → Jenkins ্Ͱ Java ͱ Go ͷίʔυੜ੒ → ଞϓϩδΣΫτ͸ dep ensure ͳͲͰऔಘ Protofilesͱੜ੒͞Εͨίʔυͷϒϥϯν͸Ұக Other applications Generated code