ch
Feedback
JusticeTech System

JusticeTech System

前往频道在 Telegram

Learn to learn before you teach

显示更多
未指定国家未指定类别
226
订阅者
-124 小时
-17 天
-330 天
帖子存档
I know I did a lot with this guy but I don't know how to brag with it 😄😄 This ought to just be a telegram bot but it's not
I know I did a lot with this guy but I don't know how to brag with it 😄😄 This ought to just be a telegram bot but it's not lookin like it

How it is going
How it is going

On first attempt
+1
On first attempt

How many developers now a days still practice Algorithm and Flow chart 😃😃 Lazy folks everywhere

‼️ Tech Against Terrorism tested 27 AI models with 2,000+ prompts seeking bomb-making and weapons guidance. ChatGPT refused o
+1
‼️ Tech Against Terrorism tested 27 AI models with 2,000+ prompts seeking bomb-making and weapons guidance. ChatGPT refused only 48% of them, the UN-backed group's new report found. The report documents 30+ cases of AI supporting extremist attacks, linked to 70+ deaths, and flags open-source models as the harder problem because safeguards can be stripped out entirely. Australia is already moving. The report lands as a 13-year-old faces extremism charges over alleged AI-generated mass shooting scenarios, and Australian researchers are already pushing for turnover-based fines or geoblocks on noncompliant platforms.

If you have any questions drop it here If i can't answer it other will do

I hope you learn a little from this Happy building

Step by step flow 1. Client create an Idempotency key (UUID/ unique string) 2. Client the payment request with the key in header 3. Server check if the key already exits in database 4. If yes return the stored response (no new changes) 5. If yes process the payment, store the results with the key and return the response What get stored: Idempotency key Request details (this can be optional depends on you) Response (success or failure) Timestamp (for expiration)

Let me round up

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

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

Let me go deeper

So it keeps retrying in the background till become successful Infact you can proceed to had some logic

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 😀

Now follow me let's make it more fun

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

Have you ever come across something called Idempotency key

This is where it become fun So let's go

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?

In this case what is the native solution?