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
Wprowadzenie do Watermill GoCracow
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Robert Laszczak
November 05, 2019
Programming
37
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
74
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
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
670
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
680
信頼性の目標を誰も求めてない
shubox
0
490
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
270
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
自分的「カンファレンスの楽しみ方」
syumai
0
190
Foundry Localでエージェント開発
seosoft
0
140
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
120
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
140
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
2
340
RSSとCodexを使ってX投稿自動化してみた
ochtum
0
110
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
150
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1.6k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
560
Building Adaptive Systems
keathley
44
3.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Pragmatic Product Professional
lauravandoore
37
7.4k
The Invisible Side of Design
smashingmag
301
52k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
870
Git: the NoSQL Database
bkeepers
PRO
432
67k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
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