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
Compile Time Code Weaving with Go
Search
Ian Eyberg
July 10, 2015
Technology
0
350
Compile Time Code Weaving with Go
Goweave is a project to implement compile-time code weaving with go.
Ian Eyberg
July 10, 2015
Tweet
Share
More Decks by Ian Eyberg
See All by Ian Eyberg
Creating Open Source Unikernel Packages
eyberg
0
53
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
80
Climbing Out From the Digital Mud with Unikernels - HL2017
eyberg
0
160
Using Unikernels in Production Today
eyberg
0
220
Adventures In Building Unikernel Clouds
eyberg
0
100
No Parachute Introduction into Unikernel Orchestration
eyberg
0
250
You Say MicroServices - I say Unikernels
eyberg
1
200
The Current State of C++ Unikernels
eyberg
1
250
UniKernel Workflows
eyberg
0
94
Other Decks in Technology
See All in Technology
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
480
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
podman_update_2024-12
orimanabu
1
270
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
410
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
200
UI State設計とテスト方針
rmakiyama
2
560
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
450
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
220
Featured
See All Featured
A designer walks into a library…
pauljervisheath
204
24k
Code Reviewing Like a Champion
maltzj
520
39k
Optimising Largest Contentful Paint
csswizardry
33
3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
The Cult of Friendly URLs
andyhume
78
6.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Code Review Best Practice
trishagee
65
17k
Transcript
Compile Time Code Weaving with Go https://github.com/deferpanic/goweave
I like your software but…
What sucks about Go?
Do you know about aspectj?
Really?
I’m not a code purist
“which is our full time job . write a program
to write a program” - rob pike / gopherfest 2015
None
Go is Actually a Decent Fit
Prior Art go fmt go fix go generate
go fix
No Wrapping I don’t want to update code && leave
the refs in it’s non-trivial I don’t want to hack it in/out each time I could forget in the future or not find all in the past
Aspect Contains behavior that is prominent in many places but
don’t really have anything to do with your business logic. Logging is a canonical example.
Pointcut an expression that details where to apply your behavior
CALL Before, after or wrap around calling a method. EXECUTE Before or after inside executing a method. WITHIN Every single call within a method.
Advice fmt.Println("Hello, 世界")
Logging
Monitoring
Performance Analysis
Debugging & Tracing
Undo Functionality
None
Behavior Mutation
Security
Transactions
Log every call to Itoa
Validation
Time Database Query Latencies
Ensure we log every panic in a goroutine
loom central place for storing .weave files you don’t have
to re-invent the wheel more eyes - better software
it’s really
HACKY
https://github.com/deferpanic/goweave https://github.com/deferpanic/loom