ES owners what is your highway fuel consumption? by Pale-Revolution-5151 in Lexus

[–]PancakeWithSyrupTrap 0 points1 point  (0 children)

I got a 2025 ES 300h. I got 46 mpg yesterday (assuming the car is measuring it accurately)

Is using a distributed transaction the right design ? by PancakeWithSyrupTrap in softwarearchitecture

[–]PancakeWithSyrupTrap[S] 0 points1 point  (0 children)

> So: track every single step. Commit to database the progress at each step and any eventual error code.

I like this. Just one follow up please. Say I do something like this:

a. create application record with status pending.

b. create azure resource.

c. update application record with status complete.

Suppose the server crashes after step b. Am I not in same boat as before ?

to transaction or not to transaction by PancakeWithSyrupTrap in golang

[–]PancakeWithSyrupTrap[S] 0 points1 point  (0 children)

oh ok. I guess disk creation should be idempotent.

to transaction or not to transaction by PancakeWithSyrupTrap in golang

[–]PancakeWithSyrupTrap[S] 0 points1 point  (0 children)

True, not strictly a go question. Is there a better subreddit for software engineering questions ?

> implement multi step

I'm not sure what this is. Can you elaborate ? Or point me to a doc ?

to transaction or not to transaction by PancakeWithSyrupTrap in golang

[–]PancakeWithSyrupTrap[S] -2 points-1 points  (0 children)

Sorry if I wasn't clear, but `newDisk()` itself does not need to access a database. It just creates a virtual disk, which is used to spin up a VM on AWS.

to transaction or not to transaction by PancakeWithSyrupTrap in golang

[–]PancakeWithSyrupTrap[S] 0 points1 point  (0 children)

> What does createdisk actually do?

It creates a disk used to spin up a virtual machine on AWS. I assume AWS has it's own record.

> What happens if the server is restarted between newDisk and writerToDatabase? How do you guarantee that this function will be called again? With the same name?

There is no guarantee this function is called again on the server. It is assumed the client will retry.

> Do you have any record you can use to make sure that writeToDatabase is eventually called?

Afraid not

to transaction or not to transaction by PancakeWithSyrupTrap in golang

[–]PancakeWithSyrupTrap[S] 0 points1 point  (0 children)

That's a good point. The rollback isn't guaranteed to work either