Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Wprowadzenie do Watermill GoCracow
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Robert Laszczak
November 05, 2019
Programming
39
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Wprowadzenie do Watermill GoCracow
Robert Laszczak
November 05, 2019
More Decks by Robert Laszczak
See All by Robert Laszczak
Let's build event-driven application in 15 minutes - introduction to Watermill
roblaszczak
0
840
Wprowadzenie do Watermill - Gophers Silesia
roblaszczak
1
78
Event-driven application made easy with Watermill
roblaszczak
1
250
Tactical DDD patterns in Go
roblaszczak
0
110
Other Decks in Programming
See All in Programming
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
ChromeでローカルLLM
ryu1013
0
140
ActionController meets Protocol Buffers
sorah
0
530
The Rails Doctrine Decade
koic
2
590
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
570
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
600
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
230
Workers Cache を知る
syumai
0
370
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
The Limits of Empathy - UXLibs8
cassininazir
2
720
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Typedesign – Prime Four
hannesfritz
42
3.2k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
We Have a Design System, Now What?
morganepeng
55
8.4k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
940
Transcript
roblaszczak Wprowadzenie do Watermill zbudujmy aplikację opartą o eventy w
30 minut
roblaszczak About me • I’m Robert • Tech Lead @
• Blogging at https://threedots.tech/ • @roblaszczak at
roblaszczak Cascading failures
roblaszczak
roblaszczak
roblaszczak
roblaszczak PROBLEM?
roblaszczak BUILDING EVENT-DRIVEN APPLICATIONS IS NOT EASY
roblaszczak Building applications based on Kafka is not easy •
Consumer groups • Partitioning • At-least-once delivery • Message Ack and Nack support • Not losing any message • Not everyone is familiar with event-driven architecture
roblaszczak How to make building event-driven applications easy in Go?
roblaszczak Watermill
roblaszczak 1.4k GitHub Stars
roblaszczak 16 Contributors
roblaszczak 8 Supported Pub/Subs
roblaszczak
roblaszczak Watermill is a library Watermill is not a framework
roblaszczak
roblaszczak HOW?
roblaszczak Unix philosophy (1978) • Write programs that do one
thing and do it well. • Write programs to work together. • Write programs to handle text streams message, because that is a universal interface.
roblaszczak type Publisher interface { Publish(topic string, messages ...*Message) error
Close() error } type Subscriber interface { Subscribe(ctx context.Context, topic string) (<-chan *Message, error) Close() error }
roblaszczak type HandlerFunc func(msg *Message) ([]*Message, error)
roblaszczak
roblaszczak
roblaszczak
roblaszczak
roblaszczak Testing
roblaszczak func TestPublishSubscribe(t *testing.T) { features := tests.Features{ ConsumerGroups: true,
ExactlyOnceDelivery: false, GuaranteedOrder: false, Persistent: true, } tests.TestPubSub( t, features, createPubSub, createPubSubWithConsumerGrup, ) }
roblaszczak var stressTestTestsCount = 10 func TestPubSubStressTest( t *testing.T, features
Features, pubSubConstructor PubSubConstructor, consumerGroupPubSubConstructor ConsumerGroupPubSubConstructor, ) { for i := 0; i < stressTestTestsCount; i++ { t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { t.Parallel() TestPubSub(t, features, pubSubConstructor, consumerGroupConstructor) }) } }
roblaszczak
roblaszczak How fast is Watermill?
roblaszczak Pub/Sub Publish (messages / s) Subscribe (messages / s)
Kafka 70,252 117,529 NATS 76,208 38,169 SQL (MySQL) 6,989 143 Google Cloud Pub/Sub 7,416 39,591 AMQP 2,408 10,608
roblaszczak Pub/Sub Publish (messages / s) Subscribe (messages / s)
Kafka 70,252 117,529 NATS 76,208 38,169 SQL (MySQL) 6,989 143 Google Cloud Pub/Sub 7,416 39,591 AMQP 2,408 10,608
roblaszczak Pub/Sub Publish (messages / s) Subscribe (messages / s)
Kafka 70,252 117,529 NATS 76,208 38,169 SQL (MySQL) 6,989 143 Google Cloud Pub/Sub 7,416 39,591 AMQP 2,408 10,608
roblaszczak The first rule of live coding
roblaszczak Don’t do livecoding The first rule of live coding
roblaszczak Not covered • It’s even hard to show everything
in 20 minutes :) • Kafka and Google Cloud Pub/Sub internals • At-least-once delivery • CQRS component • Go to watermill.io !
roblaszczak
roblaszczak
roblaszczak Thanks for all contributors!
roblaszczak roblaszczak https://watermill.io/ https://threedots.tech/ THANKS!
roblaszczak Photo by Micheile Henderson @micheile010 // Visual Stories [nl]
on Unsplash Photo by Thomas Ehling on Unsplash