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
370
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
55
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
84
Climbing Out From the Digital Mud with Unikernels - HL2017
eyberg
0
170
Using Unikernels in Production Today
eyberg
0
230
Adventures In Building Unikernel Clouds
eyberg
0
110
No Parachute Introduction into Unikernel Orchestration
eyberg
0
250
You Say MicroServices - I say Unikernels
eyberg
1
210
The Current State of C++ Unikernels
eyberg
1
250
UniKernel Workflows
eyberg
0
96
Other Decks in Technology
See All in Technology
勝手に!深堀り!Cloud Run worker pools / Deep dive Cloud Run worker pools
iselegant
4
660
Part1 GitHubってなんだろう?その1
tomokusaba
3
680
Aspire をカスタマイズしよう & Aspire 9.2
nenonaninu
0
380
Previewでもここまで追える! Azure AI Foundryで始めるLLMトレース
tomodo_ysys
2
570
コードや知識を組み込む / Incorporating Codes and Knowledge
ks91
PRO
0
170
CodeRabbitと過ごした1ヶ月 ─ AIコードレビュー導入で実感したチーム開発の進化
mitohato14
1
240
Serverlessだからこそコードと設計にはこだわろう
kenichirokimura
2
750
非root化Androidスマホでも動く仮想マシンアプリを試してみた
arkw
0
120
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
150
ビジネスとデザインとエンジニアリングを繋ぐために 一人のエンジニアは何ができるか / What can a single engineer do to connect business, design, and engineering?
kaminashi
2
890
正式リリースされた Semantic Kernel の Agent Framework 全部紹介!
okazuki
1
960
MySQL InnoDB Data Recovery - The Last Resort
lefred
0
110
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
336
57k
Designing Experiences People Love
moore
142
24k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
120
52k
Practical Orchestrator
shlominoach
187
11k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Rails Girls Zürich Keynote
gr2m
94
13k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
RailsConf 2023
tenderlove
30
1.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.7k
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