Our gate keeps no memory, so two actions asked at the same instant on the same record were both judged on the record as it was, and both could pass. We built the sender that sits on the company's side and holds each record from the request until the action has run. On our live service, eight payments asked at once to a supplier that may be paid three times a day now give exactly three.
## Why it matters
Several agents now work on the same company records at the same time. A rule such as "this supplier may be paid three times a day" has to hold when eight payments are asked in the same second, not only when they arrive one by one.
## What we found
Our gate keeps no memory: it receives an action together with the records it is about, compares them with the owner's rules and answers passes or does not pass. That is what makes it give the same answer whoever asks. It also means that two actions asked at the same instant are both judged on the record as it was a moment before. Both can pass, and the count goes past the limit.
## What we built
The order is kept where the records live: on the company's side. We now ship the sender that does it. For each action it asks the gate, answers the gate's questions from the company's own system, and holds every record the action reads or moves from the request until the action has run. Two actions on the same record go one after the other, and the second is judged on what the first left. Actions that share no record still go together, so nothing slows down that does not have to.
The gate itself did not change: it still keeps no memory and reaches into no system.
## The numbers
On our live service, eight payments were asked at the same moment to a supplier that may be paid three times a day, thirty times over. With no order kept, 233 of 240 payments were made, 143 of them past the limit. With the sender keeping the order, exactly three were made in all thirty rounds. The same invoice asked twice at once was paid twice in 27 rounds of 30 with no order, and once in 30 of 30 with it. Keeping the order cost no extra request to the gate; an action waited about two seconds for the ones ahead of it on the same record.
```chart
{"title": "Payments made when 8 are asked at once and 3 are allowed", "series": ["Payments made per round, on average"], "unit": "", "max": 8, "rows": [["Allowed by the rule", 3], ["Sender keeping no order", 7.8], ["Sender keeping the order", 3]]}
```
In a simulation of 20,000 tasks where calls arrive in pairs, the decisions that differed from the rules went from 341 to 9, and the 9 share one cause that the shipped version now covers.
## What it does not give
The sender orders the records the rules read and the record an action moves. A record that a company's own function changes on the side, which no rule reads, is held only if the company names it. The tests use a simulated company with a plain payment system.
## In plain words
If two agents try to make the last allowed payment at the same moment, one goes first and the other is judged on what the first one did. The rule holds, and the count is shown.
This update is not available.