Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MicroServices and MonoRepo
Search
Hiroaki Egashira
August 06, 2019
Programming
2
1.2k
MicroServices and MonoRepo
Golangのマイクロサービスをmono repositoryでBazelを利用して管理する方法についてお話しました。
Hiroaki Egashira
August 06, 2019
Tweet
Share
More Decks by Hiroaki Egashira
See All by Hiroaki Egashira
レコメンドへの大規模アクセスを支えるGo製サーバーの裏側
_hiro511
7
3.5k
WinTicketにおける リアルタイム性と高負荷を考慮したアーキテクチャ/WinTicket Architecture
_hiro511
4
3.1k
WinTicketにおけるライブ配信システムの実現
_hiro511
2
750
Other Decks in Programming
See All in Programming
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
Jakarta EE meets AI
ivargrimstad
0
630
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
距離関数を極める! / SESSIONS 2024
gam0022
0
290
Jakarta EE meets AI
ivargrimstad
0
700
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.8k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Featured
See All Featured
Done Done
chrislema
181
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Ruby is Unlike a Banana
tanoku
97
11k
BBQ
matthewcrist
85
9.3k
What's new in Ruby 2.0
geeforr
343
31k
How to train your dragon (web standard)
notwaldorf
88
5.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Transcript
ُؕؠٞئ٭لتכ .POP3FQP $"54 $ZCFS"HFOU *OD )JSPBLJ&HBTIJSB娡㱳◽
娡㱳◽)JSPBLJ&HBTIJSB 䇗僖劔䌋⚡炘ئؕف٭ؙ٭ةؘ٤ع⪌炘 $"54 8JO5JDLFUفشؠؙ٤غطشؠٛ٭غ IJSP @IJSP
8JO5JDLFU ˝ ؛٤ٚؕ٤琂魸䤷烨ئؕع ˝ 侇ꝴ䤷烨⯈頇⪌⺎耆 ˝ ⪒㎁⚡㕙סٚؕه何⥼鿥⟓ ˝ "CFNB57ס琂魸زٔ٤ؾٜכ鵽Ⳃ
ُؕؠٞئ٭لت َٝةعٛלֹיױ־
.VMUJQMF3FQPTJUPSJFT WT .POP3FQPTJUPSZ
.POP3FQPTJUPSZ ˝ (PPHMF 'BDFCPPL 5XJUUFS⺱喋 ˝ ❣㰆畘杼ب٤وٜמך׀ ˝ ┉鞉䓪סֵ㚺催 ˝
ؤ٭غס⪦僗כ⫋⮵榫ֿ㳊佄 ˝ 㛻׀םٛنؒؠذٛ٤ءֿ㳊佄 חסَٝةعٛךخ٭تؤ٭غ畘杼
.POP3FQPTJUPSZ ˝ .VMUJQMF3FQPTJUPSJFTס㕙⺬ 邾丗סَٝةعٛמ㚺催ⱶֻיյ㚺催鱮׳סֿꪫ⠠ ❣㰆꞊➟ب٤وٜמך׀
.POP3FQPTJUPSZ ˝ (PPHMF 'BDFCPPL 5XJUUFS⺱喋 ˝ ❣㰆畘杼ب٤وٜמך׀ ˝ ┉鞉䓪סֵ㚺催 ˝
ؤ٭غס⪦僗כ⫋⮵榫ֿ㳊佄 ˝ 㛻׀םٛنؒؠذٛ٤ءֿ㳊佄 חסَٝةعٛךخ٭تؤ٭غ畘杼
.POP3FQPTJUPSZ ˝ 邾丗סُؕؠٞئ٭لتמ㚺催ⱶֻכ׀ؓعِشؠםؤِشعך⺎耆 ˝ ف٭ة٘٤畘杼㳊佄 ┉鞉䓪סֵ㚺催
.POP3FQPTJUPSZ ˝ (PPHMF 'BDFCPPL 5XJUUFS⺱喋 ˝ ❣㰆畘杼ب٤وٜמך׀ ˝ ┉鞉䓪סֵ㚺催 ˝
ؤ٭غס⪦僗כ⫋⮵榫ֿ㳊佄 ˝ 㛻׀םٛنؒؠذٛ٤ءֿ㳊佄 חסَٝةعٛךخ٭تؤ٭غ畘杼
لٜغכطتعⲖ曍荁ׂגַ
#B[FM ˝ (P 1SPUPDPM#VFS $ +"7" "OESPJE J04 םל喋չם銧鏤מ㵚䑴 ˝
䑒釐ם甙䢥דׄلٜغ٬طتعסך鵭ַ ˝ تآ٭ٚهٜ ˝ 䦡䍖⺎耆 لٜغ٬طتعبتطّ
(PMBOHXJUI#B[FM ˝ #B[FMסؕ٤تع٭ٜ CSFXJOTUBMMCB[FM ˝ 803,41"$&نٜؒؕס⛼䡗 㛙鼧ס❣㰆꞊➟םל鋗鳭 ˝ #6*-%نٜؒؕ⛼䡗 لٜغ亠嫎炐גס
(B[FMMF⮵榫י舅Ⳃ榟䡗ך׀
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", urls = [ "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.19.1/rules_go-0.19.1.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/0.19.1/rules_go-0.19.1.tar.gz", ], sha256 = "8df59f11fb697743cbb3f26cfb8750395f30471e9eabde0d174c3aebc7a1cd39", ) load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains") go_rules_dependencies() go_register_toolchains() http_archive( name = "bazel_gazelle", urls = [ "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz", "https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.1/bazel-gazelle-0.18.1.tar.gz", ], sha256 = "be9296bfd64882e3c08e3283c58fcb461fa6dd3c171764fcc4cf322f60615a9b", ) load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") gazelle_dependencies() 803,41"$& SVMFT@HP (B[FMMF
load("@bazel_gazelle//:def.bzl", "gazelle") # gazelle:prefix github.com/hiro511/golang-bazel gazelle(name = “gazelle”) #6*-%CB[FM
$ tree . !"" BUILD.bazel !"" WORKSPACE #"" cmd #""
main.go $ bazel run //:gazelle (B[FMMF
$ tree . !"" BUILD.bazel !"" WORKSPACE #"" cmd !""
BUILD.bazel #"" main.go $ cat cmd/BUILD.bazel load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["main.go"], importpath = "github.com/hiro511/golang-bazel/cmd", visibility = ["//visibility:public"], ) (B[FMMF ̚舅Ⳃ榟䡗
$ cat cmd/BUILD.bazel load("@io_bazel_rules_go//go:def.bzl", “go_library”, “go_binary”) go_library( name = "go_default_library",
srcs = ["main.go"], importpath = "github.com/hiro511/golang-bazel/cmd", visibility = ["//visibility:public"], ) go_binary( name = “hello", embed = [":go_default_library"], visibility = ["//visibility:public"], ) $ bazel run //cmd:hello INFO: Analyzed target //cmd:hello (1 packages loaded, 3 targets configured). INFO: Found 1 target... Target //cmd:hello up-to-date: bazel-bin/cmd/darwin_amd64_stripped/hello INFO: Elapsed time: 0.533s, Critical Path: 0.37s INFO: 2 processes: 2 darwin-sandbox. INFO: Build completed successfully, 5 total actions INFO: Build completed successfully, 5 total actions hello world 3VO فؕػٜٛ٭ٜ
㛙鼧❣㰆꞊➟ ˝ HPNPE (PQLHMPDLنٜؒؕ־❣㰆قشآ٭ة鱮ײ 803,41"$&نٜؒؕמ傴׀鱮׳ HB[FMMFVQEBUFSFQPTGSPN@MFHPNPE HB[FMMFVQEBUFSFQPTGSPN@MF(PQLHMPDL (P.PEVMFTכEFQמ㵚䑴
1SPUPDPM#VFS ˝ HPMBOHQSPUPCVGכHPHPQSPUPמ㵚䑴 ˝ #6*-%CB[FMמٜ٭ٜ鴑鋗דׄ (P銧鏤סؤ٭غ榟䡗⺎耆
ٛٓ٭ع؞ٔشبٖ ˝ ꝧ氦縖$*םלךلٜغؓؗعوشع⪦僗ך׀ ˝ لٜغ냕鵭ך׀ ˝ ؞ٔشبٖفشؠؙ٤غ OHJOY 8FC%"7NPEVMF
#B[FM3FNPUF$BDIF (PPHMF$MPVE4UPSBHF لٜغؓؗعوشعٛٓ٭عמ؞ٔشبٖ⺎耆
ױכ״ ˝ .POP3FQPTJUPSZ ❣㰆畘杼ֿب٤وٜյ┉鞉䓪ֵֿյؤ٭غס⪦僗٬⫋⮵榫ֿ㳊佄 ˝ #B[FM لٜغ٬طتعص٭ٜյ❣㰆꞊➟杼鉮י㲔产סך鵭ַ (B[FMMF⮵榫י(PMBOHסخ٭تؤ٭غסلٜغٜ٭ٜ舅Ⳃ榟䡗⺎耆 (P.PEVMFTEFQס錃㲊אסױױ✳ֻ 1SPUPDPM#VFSס(PMBOHؤ٤قٜؕ⺎耆
ٛٓ٭ع؞ٔشبٖךلٜغؓؗعوشع⪦僗⺎耆
ֵֿכַׇֹױג