๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
@dsalgorithms
11.5K
subscribers
20
photos
2
files
144
links
It contains data structures & algorithmic problem solutions.
Download Telegram
Join
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
11.5K subscribers
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%96%F0%9D%97%BC%F0%9D%97%BB%F0%9D%98%80%F0%9D%97%B2%F0%9D%97%BB%F0%9D%98%80%F0%9D%98%82%F0%9D%98%80-%F0%9D%98%80%F0%9D%97%AE%F0%9D%98%86%F0%9D%98%80-%F0%9D%97%9F%F0%9D%97%B2%F0%9D%98%81%F0%9D%98%80-%F0%9D%97%AE%F0%9D%97%B4%F0%9D%97%BF%F0%9D%97%B2%F0%9D%97%B2-share-7493668307510861825-PYp1/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
CRDTs: Conflict-Free Replicated Data Types for Distributed Systems | Kanahaiya Gupta posted on the topic | LinkedIn
๐๐ผ๐ป๐๐ฒ๐ป๐๐๐ ๐๐ฎ๐๐: โ๐๐ฒ๐โ๐ ๐ฎ๐ด๐ฟ๐ฒ๐ฒ ๐ฏ๐ฒ๐ณ๐ผ๐ฟ๐ฒ ๐๐ฒ ๐ฎ๐ฐ๐.โ
๐๐ฅ๐๐ง๐ ๐๐ฎ๐: โ๐๐ฒ๐โ๐ ๐ฎ๐ฐ๐. ๐ช๐ฒโ๐น๐น ๐บ๐ฒ๐ฟ๐ด๐ฒ ๐น๐ฎ๐๐ฒ๐ฟ.โ
๐คฏ
โ
At first, that sounds like a recipe for data corruption.
Two replicas.
No immediate coordination.
Both changing the same data.
What could possibly go wrong?
๐จ
CRDTโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%AC%F0%9D%97%BC%F0%9D%98%82%F0%9D%97%BF-%F0%9D%97%BF%F0%9D%97%B2%F0%9D%97%BD%F0%9D%97%B9%F0%9D%97%B6%F0%9D%97%B0%F0%9D%97%AE%F0%9D%98%80-%F0%9D%97%B0%F0%9D%97%AE%F0%9D%97%BB%F0%9D%98%81-%F0%9D%98%81%F0%9D%97%AE%F0%9D%97%B9%F0%9D%97%B8-share-7494016228458684416-T2Zv/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
Designing for Network Partitions in Distributed Systems | Kanahaiya Gupta posted on the topic | LinkedIn
๐ฌ๐ผ๐๐ฟ ๐ฟ๐ฒ๐ฝ๐น๐ถ๐ฐ๐ฎ๐ ๐ฐ๐ฎ๐ป'๐ ๐๐ฎ๐น๐ธ ๐๐ผ ๐ฒ๐ฎ๐ฐ๐ต ๐ผ๐๐ต๐ฒ๐ฟ. ๐๐ผ ๐๐ผ๐ ๐ฟ๐ฒ๐ท๐ฒ๐ฐ๐ ๐๐ต๐ฒ ๐๐๐ฒ๐ฟ?
Or accept the write and deal with the consequences later?
๐ฅ
โ
A network partition happens.
Replica A is disconnected from B and C.
Then a user says:
"Update my shopping cart."
You have two choices.โฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%94-%F0%9D%97%B1%F0%9D%97%B6%F0%9D%98%80%F0%9D%98%81%F0%9D%97%BF%F0%9D%97%B6%F0%9D%97%AF%F0%9D%98%82%F0%9D%98%81%F0%9D%97%B2%F0%9D%97%B1-%F0%9D%98%80%F0%9D%98%86%F0%9D%98%80%F0%9D%98%81%F0%9D%97%B2%F0%9D%97%BA-%F0%9D%97%B0-share-7494404118522793984-SWKL/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐ ๐ฑ๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐๐๐๐๐ฒ๐บ ๐ฐ๐ฎ๐ป ๐ฏ๐ฒ ๐ฐ๐ผ๐บ๐ฝ๐น๐ฒ๐๐ฒ๐น๐ ๐ฐ๐ผ๐ฟ๐ฟ๐ฒ๐ฐ๐โฆ
๐๐ป๐ฑ ๐๐๐ถ๐น๐น ๐บ๐ฎ๐ธ๐ฒ ๐๐ฒ๐ฟ๐ผ ๐๐ฒ๐ป๐๐ฒ ๐๐ผ ๐๐๐ฒ๐ฟ๐.
๐จ
โ
Imagine opening a conversation and seeing:โฆโฆ
๐ ๐ฑ๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐๐๐๐๐ฒ๐บ ๐ฐ๐ฎ๐ป ๐ฏ๐ฒ ๐ฐ๐ผ๐บ๐ฝ๐น๐ฒ๐๐ฒ๐น๐ ๐ฐ๐ผ๐ฟ๐ฟ๐ฒ๐ฐ๐โฆ
๐๐ป๐ฑ ๐๐๐ถ๐น๐น ๐บ๐ฎ๐ธ๐ฒ ๐๐ฒ๐ฟ๐ผ ๐๐ฒ๐ป๐๐ฒ ๐๐ผ ๐๐๐ฒ๐ฟ๐.
๐จ
โ
Imagine opening a conversation and seeing:
Bob: โGreat idea!โ
No context.
No original message.
Just the reply.
Great idea about what?
The data is there.
The replicas mayโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%A0%F0%9D%97%BC%F0%9D%98%80%F0%9D%98%81-%F0%9D%97%B1%F0%9D%97%B6%F0%9D%98%80%F0%9D%98%81%F0%9D%97%BF%F0%9D%97%B6%F0%9D%97%AF%F0%9D%98%82%F0%9D%98%81%F0%9D%97%B2%F0%9D%97%B1-%F0%9D%98%80%F0%9D%98%86%F0%9D%98%80%F0%9D%98%81%F0%9D%97%B2%F0%9D%97%BA%F0%9D%98%80-share-7494752851064315906-iT4x/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐ ๐ผ๐๐ ๐ฑ๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐๐๐๐๐ฒ๐บ๐ ๐ฎ๐ฟ๐ฒ ๐ผ๐๐ฒ๐ฟ-๐ฐ๐ผ๐ผ๐ฟ๐ฑ๐ถ๐ป๐ฎ๐๐ฒ๐ฑ.
๐ง๐ต๐ฒ ๐ฟ๐ฒ๐ฎ๐น ๐บ๐ถ๐๐๐ฎ๐ธ๐ฒ? ๐ฆ๐ผ๐น๐๐ถ๐ป๐ด ๐๐ต๐ฒ ๐๐ฟ๐ผ๐ป๐ด ๐ฝ๐ฟ๐ผ๐ฏ๐น๐ฒ๐บ.
๐ฅ
โ
We often jump straight to:โฆ | Kanahaiyaโฆ
๐ ๐ผ๐๐ ๐ฑ๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐๐๐๐๐ฒ๐บ๐ ๐ฎ๐ฟ๐ฒ ๐ผ๐๐ฒ๐ฟ-๐ฐ๐ผ๐ผ๐ฟ๐ฑ๐ถ๐ป๐ฎ๐๐ฒ๐ฑ.
๐ง๐ต๐ฒ ๐ฟ๐ฒ๐ฎ๐น ๐บ๐ถ๐๐๐ฎ๐ธ๐ฒ? ๐ฆ๐ผ๐น๐๐ถ๐ป๐ด ๐๐ต๐ฒ ๐๐ฟ๐ผ๐ป๐ด ๐ฝ๐ฟ๐ผ๐ฏ๐น๐ฒ๐บ.
๐ฅ
โ
We often jump straight to:
๐
Consensus
๐
Locks
๐
Transactions
๐
Global coordination
Because distributed systems are hard.
But sometimes, the real question is muchโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%9C%F0%9D%97%B3-%F0%9D%9F%AD%F0%9D%9F%AC%F0%9D%9F%AC%F0%9D%9F%AC%F0%9D%9F%AC-%F0%9D%98%80%F0%9D%97%B2%F0%9D%97%BF%F0%9D%98%83%F0%9D%97%B2%F0%9D%97%BF%F0%9D%98%80-%F0%9D%97%BB%F0%9D%97%B2%F0%9D%97%B2%F0%9D%97%B1-share-7495115540496039936-IT7d/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐๐ณ ๐ญ๐ฌ,๐ฌ๐ฌ๐ฌ ๐๐ฒ๐ฟ๐๐ฒ๐ฟ๐ ๐ป๐ฒ๐ฒ๐ฑ ๐๐ผ ๐ธ๐ป๐ผ๐ ๐๐ผ๐บ๐ฒ๐๐ต๐ถ๐ป๐ดโฆ
๐๐ผ๐ปโ๐ ๐บ๐ฎ๐ธ๐ฒ ๐ผ๐ป๐ฒ ๐๐ฒ๐ฟ๐๐ฒ๐ฟ ๐ฐ๐ฎ๐น๐น ๐๐ต๐ฒ๐บ ๐ฎ๐น๐น.
๐จ
โ
Imagine a new configuration is deployed.
10โฆ
๐๐ณ ๐ญ๐ฌ,๐ฌ๐ฌ๐ฌ ๐๐ฒ๐ฟ๐๐ฒ๐ฟ๐ ๐ป๐ฒ๐ฒ๐ฑ ๐๐ผ ๐ธ๐ป๐ผ๐ ๐๐ผ๐บ๐ฒ๐๐ต๐ถ๐ป๐ดโฆ
๐๐ผ๐ปโ๐ ๐บ๐ฎ๐ธ๐ฒ ๐ผ๐ป๐ฒ ๐๐ฒ๐ฟ๐๐ฒ๐ฟ ๐ฐ๐ฎ๐น๐น ๐๐ต๐ฒ๐บ ๐ฎ๐น๐น.
๐จ
โ
Imagine a new configuration is deployed.
10,000 servers need to know.
The obvious solution?
One node โ 10,000 messages.
Simple.
Until that โsimpleโ design becomes your bottleneck.โฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%AC%F0%9D%97%BC%F0%9D%98%82%F0%9D%97%BF-%F0%9D%97%B1%F0%9D%97%B6%F0%9D%98%80%F0%9D%98%81%F0%9D%97%BF%F0%9D%97%B6%F0%9D%97%AF%F0%9D%98%82%F0%9D%98%81%F0%9D%97%B2%F0%9D%97%B1-%F0%9D%98%80%F0%9D%98%86%F0%9D%98%80%F0%9D%98%81%F0%9D%97%B2%F0%9D%97%BA-share-7495462714237009921-oaQy/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐ฌ๐ผ๐๐ฟ ๐ฑ๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐๐๐๐๐ฒ๐บ ๐ฐ๐ฎ๐ป ๐ป๐ฒ๐๐ฒ๐ฟ ๐ธ๐ป๐ผ๐ ๐ณ๐ผ๐ฟ ๐๐๐ฟ๐ฒ ๐๐ต๐ผ ๐ถ๐ ๐ฎ๐น๐ถ๐๐ฒ.
๐๐ป๐ฑ ๐๐ต๐ฎ๐โ๐ ๐ป๐ผ๐ ๐ฎ ๐ฏ๐๐ด.
๐จ
โ
Imagine a cluster:
A B C D E
Then D suddenlyโฆโฆ
๐ฌ๐ผ๐๐ฟ ๐ฑ๐ถ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ฑ ๐๐๐๐๐ฒ๐บ ๐ฐ๐ฎ๐ป ๐ป๐ฒ๐๐ฒ๐ฟ ๐ธ๐ป๐ผ๐ ๐ณ๐ผ๐ฟ ๐๐๐ฟ๐ฒ ๐๐ต๐ผ ๐ถ๐ ๐ฎ๐น๐ถ๐๐ฒ.
๐๐ป๐ฑ ๐๐ต๐ฎ๐โ๐ ๐ป๐ผ๐ ๐ฎ ๐ฏ๐๐ด.
๐จ
โ
Imagine a cluster:
A B C D E
Then D suddenly disappears from A's view.
A says:
"D is dead."
B says:
"I can still reach D."
And D?
"I'm literally still here."
โ๏ธ
That isโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%94%F0%9D%97%B1%F0%9D%97%B1-%F0%9D%9F%AD-%F0%9D%98%80%F0%9D%97%B2%F0%9D%97%BF%F0%9D%98%83%F0%9D%97%B2%F0%9D%97%BF-%F0%9D%97%AA%F0%9D%97%B5%F0%9D%98%86-%F0%9D%97%BA%F0%9D%97%BC%F0%9D%98%83%F0%9D%97%B2-%F0%9D%97%BA%F0%9D%97%B6%F0%9D%97%B9%F0%9D%97%B9%F0%9D%97%B6%F0%9D%97%BC%F0%9D%97%BB%F0%9D%98%80-share-7495835669043355648-0zWE/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐๐ฑ๐ฑ ๐ญ ๐๐ฒ๐ฟ๐๐ฒ๐ฟ.
๐ช๐ต๐ ๐บ๐ผ๐๐ฒ ๐บ๐ถ๐น๐น๐ถ๐ผ๐ป๐ ๐ผ๐ณ ๐ธ๐ฒ๐๐?
๐จ
Thatโs the problem consistent hashing was built to solve.
โ
Imagine your system hasโฆ
๐๐ฑ๐ฑ ๐ญ ๐๐ฒ๐ฟ๐๐ฒ๐ฟ.
๐ช๐ต๐ ๐บ๐ผ๐๐ฒ ๐บ๐ถ๐น๐น๐ถ๐ผ๐ป๐ ๐ผ๐ณ ๐ธ๐ฒ๐๐?
๐จ
Thatโs the problem consistent hashing was built to solve.
โ
Imagine your system has 3 servers:
A B C
And millions of users.
A simple rule decides where each user's data lives:
hash(user_id) % number_of_servers
Fast.โฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%A7%F0%9D%97%B5%F0%9D%97%B2-%F0%9D%97%BA%F0%9D%97%BC%F0%9D%98%80%F0%9D%98%81-%F0%9D%97%B2%F0%9D%98%85%F0%9D%97%BD%F0%9D%97%B2%F0%9D%97%BB%F0%9D%98%80%F0%9D%97%B6%F0%9D%98%83%F0%9D%97%B2-%F0%9D%97%B1%F0%9D%97%AE%F0%9D%98%81-share-7496183906136809472-JPgt/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐ง๐ต๐ฒ ๐บ๐ผ๐๐ ๐ฒ๐ ๐ฝ๐ฒ๐ป๐๐ถ๐๐ฒ ๐ฑ๐ฎ๐๐ฎ๐ฏ๐ฎ๐๐ฒ ๐บ๐ถ๐๐๐ฎ๐ธ๐ฒ?
Choosing your shard key before understanding your queries.
๐จ
โ
At 10,000 users, almost anyโฆ
๐ง๐ต๐ฒ ๐บ๐ผ๐๐ ๐ฒ๐ ๐ฝ๐ฒ๐ป๐๐ถ๐๐ฒ ๐ฑ๐ฎ๐๐ฎ๐ฏ๐ฎ๐๐ฒ ๐บ๐ถ๐๐๐ฎ๐ธ๐ฒ?
Choosing your shard key before understanding your queries.
๐จ
โ
At 10,000 users, almost any partitioning strategy works.
At 100 million?
The wrong one becomes an architectural constraint you carry for years.
โ๏ธ
โ
๐๐ผ๐ป๐๐ถ๐ฑ๐ฒ๐ฟโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://www.linkedin.com/posts/kanahaiya-gupta_%F0%9D%97%A3%F0%9D%97%AE%F0%9D%97%BF%F0%9D%98%81%F0%9D%97%B6%F0%9D%98%81%F0%9D%97%B6%F0%9D%97%BC%F0%9D%97%BB%F0%9D%97%B6%F0%9D%97%BB%F0%9D%97%B4-%F0%9D%97%B0%F0%9D%97%AE%F0%9D%97%BB-%F0%9D%98%80%F0%9D%97%B0%F0%9D%97%AE%F0%9D%97%B9%F0%9D%97%B2-share-7496563230887284737-EgI1/?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAAnABVQBlknMXqfQbboPiNxNmcKfRLyBNs
LinkedIn
๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐ถ๐ป๐ด ๐ฐ๐ฎ๐ป ๐๐ฐ๐ฎ๐น๐ฒ ๐๐ผ๐๐ฟ ๐ฑ๐ฎ๐๐ฎ๐ฏ๐ฎ๐๐ฒ.
๐๐ ๐ฐ๐ฎ๐ป ๐ฎ๐น๐๐ผ ๐บ๐ฎ๐ธ๐ฒ ๐๐ผ๐๐ฟ ๐ป๐ฒ๐ ๐ ๐ผ๐๐๐ฎ๐ด๐ฒ ๐ฏ๐ถ๐ด๐ด๐ฒ๐ฟ.
๐จ
โ
Imagine 1 billion users.
So you split theโฆโฆ
๐ฃ๐ฎ๐ฟ๐๐ถ๐๐ถ๐ผ๐ป๐ถ๐ป๐ด ๐ฐ๐ฎ๐ป ๐๐ฐ๐ฎ๐น๐ฒ ๐๐ผ๐๐ฟ ๐ฑ๐ฎ๐๐ฎ๐ฏ๐ฎ๐๐ฒ.
๐๐ ๐ฐ๐ฎ๐ป ๐ฎ๐น๐๐ผ ๐บ๐ฎ๐ธ๐ฒ ๐๐ผ๐๐ฟ ๐ป๐ฒ๐ ๐ ๐ผ๐๐๐ฎ๐ด๐ฒ ๐ฏ๐ถ๐ด๐ด๐ฒ๐ฟ.
๐จ
โ
Imagine 1 billion users.
So you split the data:
๐
Users AโM โ Partition 1
๐
Users NโZ โ Partition 2
Traffic is distributed.
The database can scale.
โ๏ธ
Then Server A crashes.โฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://lnkd.in/p/d9Gi8UjF
LinkedIn
Distributed transactions don't solve your hardest problem.
They make you pay for certainty.
๐ฅ
โ
Imagine transferring $100 fromโฆ
Distributed transactions don't solve your hardest problem.
They make you pay for certainty.
๐ฅ
โ
Imagine transferring $100 from Alice to Bob.
Alice's balance lives on Partition A.
Bob's balance lives on Partition B.
Step 1:
Alice โ -$100
โ
Then the serverโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://lnkd.in/p/dcsBZK7t
LinkedIn
#distributedsystems #microservices #systemdesign #softwarearchitecture #engineering | Kanahaiya Gupta
๐ฆ๐ฎ๐ด๐ฎ ๐ฑ๐ผ๐ปโ๐ ๐ฝ๐ฟ๐ฒ๐๐ฒ๐ป๐ ๐ณ๐ฎ๐ถ๐น๐๐ฟ๐ฒ.๐ง๐ต๐ฒ๐ ๐ฑ๐ฒ๐๐ถ๐ด๐ป ๐ณ๐ผ๐ฟ ๐ถ๐.
โ
Imagine an e-commerce order:
๐
Reserve inventory
๐
Charge payment
๐
Create shipment
Three services.
Three databases.
One business workflow.
Now imagine:
Inventory
โ
Payment
โ
Shipping
โ
A traditional transactionโฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://lnkd.in/p/gxd-Qtcv
LinkedIn
Exactly-once processing isn't the real goal.
Exactly-once effects are.
Imagine a payment service receives:
๐ณ
Charge $100
The serverโฆ
Exactly-once processing isn't the real goal.
Exactly-once effects are.
Imagine a payment service receives:
๐ณ
Charge $100
The server charges the customer successfully.
Then it crashes before the response reaches the client.
The client sees:
"No response."โฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://lnkd.in/p/gx8BUgc5
LinkedIn
๐ ๐ผ๐๐ engineers try to fix message ordering by adding more ordering.
That can be the wrong solution.
๐จ
โ
Imagine a banking system.โฆ
๐ ๐ผ๐๐ engineers try to fix message ordering by adding more ordering.
That can be the wrong solution.
๐จ
โ
Imagine a banking system.
A customer does:
๐
Create account
๐
Deposit $100
But the network delivers:
Deposit $100
โ
Create account
The messages are valid.โฆ
๐๐๐ง๐ ๐ฆ๐ง๐ฅ๐จ๐๐ง๐จ๐ฅ๐๐ฆ ๐๐ก๐ ๐๐๐๐ข๐ฅ๐๐ง๐๐ ๐ฆ
https://lnkd.in/p/gJeu_Fui
LinkedIn
๐ ๐ผ๐๐ ๐ฒ๐ป๐ด๐ถ๐ป๐ฒ๐ฒ๐ฟ๐ ๐๐ต๐ถ๐ป๐ธ ๐ฒ๐๐ฒ๐ป๐ ๐๐๐ฟ๐ฒ๐ฎ๐บ๐ถ๐ป๐ด ๐ถ๐ ๐ฎ๐ฏ๐ผ๐๐ ๐บ๐ผ๐๐ถ๐ป๐ด ๐บ๐ฒ๐๐๐ฎ๐ด๐ฒ๐.
๐ง๐ต๐ฎ๐'๐ ๐ป๐ผ๐ ๐๐ต๐ฒ ๐ถ๐ป๐๐ฒ๐ฟ๐ฒ๐๐๐ถ๐ป๐ด ๐ฝ๐ฎ๐ฟ๐.
โ
The interesting partโฆ | Kanahaiyaโฆ
๐ ๐ผ๐๐ ๐ฒ๐ป๐ด๐ถ๐ป๐ฒ๐ฒ๐ฟ๐ ๐๐ต๐ถ๐ป๐ธ ๐ฒ๐๐ฒ๐ป๐ ๐๐๐ฟ๐ฒ๐ฎ๐บ๐ถ๐ป๐ด ๐ถ๐ ๐ฎ๐ฏ๐ผ๐๐ ๐บ๐ผ๐๐ถ๐ป๐ด ๐บ๐ฒ๐๐๐ฎ๐ด๐ฒ๐.
๐ง๐ต๐ฎ๐'๐ ๐ป๐ผ๐ ๐๐ต๐ฒ ๐ถ๐ป๐๐ฒ๐ฟ๐ฒ๐๐๐ถ๐ป๐ด ๐ฝ๐ฎ๐ฟ๐.
โ
The interesting part is this:
๐ฌ๐ผ๐ ๐ฑ๐ผ๐ป'๐ ๐ณ๐ผ๐ฟ๐ด๐ฒ๐ ๐๐ต๐ฎ๐ ๐ต๐ฎ๐ฝ๐ฝ๐ฒ๐ป๐ฒ๐ฑ.
๐ฅ
โ
Imagine your database says:
Balance = $250
Great.
But how did it become $250?
You don't know.โฆ