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
330
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
52
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
77
Climbing Out From the Digital Mud with Unikernels - HL2017
eyberg
0
140
Using Unikernels in Production Today
eyberg
0
210
Adventures In Building Unikernel Clouds
eyberg
0
92
No Parachute Introduction into Unikernel Orchestration
eyberg
0
240
You Say MicroServices - I say Unikernels
eyberg
1
190
The Current State of C++ Unikernels
eyberg
1
240
UniKernel Workflows
eyberg
0
91
Other Decks in Technology
See All in Technology
Tellus の衛星データを見てみよう #mf_fukuoka
kongmingstrap
0
210
長期間TiDBを使ってきた話 @ 私たちはなぜNewSQLを使うのかTiDB選定5社が語る選定理由と活用LT / Experiences with TiDB Over Time
chibiegg
2
900
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
240
Azure犬駆動開発の記録/GlobalAzureFukuoka2024_20240420
nina01
1
220
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
140
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
4
440
チームでロジカルシンキングに改めて向き合っている話 〜学習環境と実践⽅法〜
sansantech
PRO
3
2.6k
TechFeed Experts Night#27 〜 フロントエンドフレームワーク最前線 (Svelte)
baseballyama
1
530
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
210
DMM.com アルファ室採用案内資料
hsugita
1
160
Building a RAG-poweredAI chat appwith Python and VS Code
pamelafox
0
100
LLM開発・活用の舞台裏@2024.04.25
yushin_n
1
340
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
325
20k
Side Projects
sachag
451
41k
Art, The Web, and Tiny UX
lynnandtonic
289
19k
GitHub's CSS Performance
jonrohan
1025
450k
The Cost Of JavaScript in 2023
addyosmani
16
3.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Building Applications with DynamoDB
mza
88
5.6k
Adopting Sorbet at Scale
ufuk
68
8.6k
The Brand Is Dead. Long Live the Brand.
mthomps
49
29k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
RailsConf 2023
tenderlove
4
540
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
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