ch
Feedback

不要被骗子欺骗!Telemetrio 会找到并标记这些频道 👉 如果想查看标记,请订阅

JusticeTech System 〽️

JusticeTech System 〽️

前往频道在 Telegram

Learn to learn before you teach

显示更多
未指定国家未指定类别
233
订阅者
+124 小时
-27 天
-130 天
帖子存档
So the whole essence of this Idempotency key is to spot a unique identify and make sure the request is only process once without do too much or Pilling up your code base Unique for each request Safe to retry multiple times Has a validity period (TTL) Mapped to the original response
17 7月, 16:16

What do we further need this Idempotency key Apis sometimes can be unreliable Network fails, client retries User double click This same request can reach your backend multiple times The goal is to ensure same action happen only once on the server So the key act as a fingerprint as request that is when if we've seen it before we don't do it again
17 7月, 16:12

Let me go deeper
17 7月, 16:08

So it keeps retrying in the background till become successful Infact you can proceed to had some logic
17 7月, 16:08

Let say a client/user send a request with a unique key then Idempotency key is generated all through to the backend If that same request is sent again with thesame key the backed will end up treating it as a retry and not a new payment 😀
17 7月, 16:06

Now follow me let's make it more fun
17 7月, 16:04

The real solution is in the use of Idempotency key What it does is that it makes every request not just unique but also safely repeatable
17 7月, 16:03

Have you ever come across something called Idempotency key
17 7月, 16:01

This is where it become fun So let's go
17 7月, 16:00

I know many people will say, why don't you just disable the pay button. Well what this will do is to improve the user experience which is good but won't solve the problem which is a bad practice Request can still be duplicated because of 1. Network retries 2. Mobile reconnect 3. Browser refresh 4. Client bugs It means that your backend needs to handle duplicate safely So what do will do in this case?
17 7月, 15:59

In this case what is the native solution?
17 7月, 15:54

PAYMENT SYSTEM INTEGRATION Now imagine this is the flow User click on the pay button Then internet become suddenly slow Then user click on pay again Due to this your backend end up receiving two identical payment requests Now if bot are processed the user will get debited twice
17 7月, 15:53

Get your writing materials
17 7月, 15:49

I forgot this payment system integration chat Let's do that now
17 7月, 15:49

For those into payment system integration to their respective project Let's have a quick chat Are you ready?
17 7月, 12:09

photo content
17 7月, 09:43

SMTP feature added to BaaS It means the value of this project has increased I actually built this not for my own consumption,
SMTP feature added to BaaS It means the value of this project has increased I actually built this not for my own consumption, I built it to sell it So if you want to buy it, you can still do that On my free time i will keep adding features and the more I do the more it's value increases Bot username : @BaaS_x_bot
17 7月, 08:40

Same prompt. Claude vs ChatGPT vs Figma Make Pick your winner 👇
Same prompt. Claude vs ChatGPT vs Figma Make Pick your winner 👇
16 7月, 17:42

I have not work on Chatra TG for a long while not Very soon
16 7月, 15:50

photo content
16 7月, 15:43