▲ | frollogaston 4 days ago | |||||||||||||||||||||||||
Ah I see. Well that is typically just fan-out-fan-in like "run these 4 SQL queries and RPCs in parallel and collect responses," nothing too complicated since the shared resources like the DB handle are usually thread-safe. It works out fine in Go and Java, even though I have unrelated reasons to avoid Go. | ||||||||||||||||||||||||||
▲ | branko_d 3 days ago | parent | next [-] | |||||||||||||||||||||||||
“Running 4 SQL queries in parallel” is not thread-safe if done in separate transactions, and on data that is not read-only. If some other transaction commits at just the wrong time, it could change the result of some of these queries but not all. The results would not be consistent with each other. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | kentonv 4 days ago | parent | prev [-] | |||||||||||||||||||||||||
The Cloudflare Workers runtime is 1000x more complicated than your average web application. :) |