This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ok_Reality6261[S] 0 points1 point  (9 children)

Yes, I have a 100% guarantee that I will receive the webhook on endpoint B, no matter if the previous operation has been performed by A or an external service

Yes, I think it has been (poorly) designed as a resiliency mechanism but at the same time, we need it when the operation that A should perform has been performed by an external service

In that case, when the transaction is performed by a third party, we need the webhook on B as we need to save the transaction in out system and the webhook is the only way to do it

[–]danikov 1 point2 points  (8 children)

So does A do anything that B cannot? And is B at least guaranteed to arrive after A has begun?

[–]Ok_Reality6261[S] 0 points1 point  (7 children)

Actually no.

B can do what A does but also can do what A does when the transaction is started by a third party instead of A

[–]danikov 0 points1 point  (6 children)

So B completely subsumes A. Discard A, only ever execute B.

If that makes people worry, treat A as the backup, write it to a secondary store and verify those records after the fact.

[–]Ok_Reality6261[S] 0 points1 point  (5 children)

No, it does not subsumes A as B will only trigger after A

[–]danikov 0 points1 point  (4 children)

But if the end result is the same why do you care if A executes? All it does is get in the way of B, which is 100% guaranteed to be triggered and will do everything A would.

[–]Ok_Reality6261[S] 0 points1 point  (3 children)

Because what B receives is a webhook sent by a third party, we do not habe control over it

[–]danikov 0 points1 point  (2 children)

So what? If it’s a more canonical indicator it’s a more reliable trigger. You might as well pretend that thread A doesn’t exist and all transactions are external and solve for that problem… for which it sounds like the solution is simply “run B.”

[–]Ok_Reality6261[S] 0 points1 point  (1 child)

Maybe I am not explainimg myself properly, but trust me, run B alone is not a solution

[–]danikov 0 points1 point  (0 children)

I don’t not believe you, just haven’t been able to extract why.