Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6126119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:19:55+00:00 2026-05-23T16:19:55+00:00

I was talking to a guy who was using an ATM when it crashed

  • 0

I was talking to a guy who was using an ATM when it crashed (it was running Windows XP, apparently) and took his money.

A transactional database with write-ahead logging can ensure that your database remains in a consistent state, even if the ATM crashes (i.e. you will always know how much money should be in the ATM and in the customer’s account). Dispensing cash, however, is not just a DB transaction and is not an instant operation, so should you commit the transaction before or after the cash is dispensed? In both cases, it is possible for either the bank or the customer to lose money if the ATM crashes at the right time.

Are there any perfect (or at least reasonably perfect) solutions to this problem?

One way I can think is if the ATM had the capability to count the amount of money in it. If the ATM committed the transaction first and then dispensed the cash, then upon recovering from a crash, the ATM could immediately dispense any additional money above what it should contain according to the guaranteed consistent database.

But from a hardware standpoint I don’t know if that would really be feasible.

What do you think? Are there any other ways to deal with this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:19:55+00:00Added an answer on May 23, 2026 at 4:19 pm

    If there is an activity outside the database system within a transaction, using “status” column to build a “manual transaction” is a solution for such situation.

    for example:
    Dispense Cache Status:

    0 - Check the account of user
    1 - Check passed, dispensing cache
    2 - Dispense cache sucessfully
    -1 - Updated status after reboot the ATM from crash if the status is 1
    -2 - Updated status after reboot the ATM for other erratic situations ...
    

    You may design more status to describe the difficult crash situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As a guy who frequently switches between QA, build and operations, I keep running
I was talking to a guy and he says he likes his site with
Talking about javax.crypto.Cipher I was trying to encrypt data using Cipher.getInstance(RSA/None/NoPadding, BC) but I
I am taking an assembly course now, and the guy who checks our home
I was reading this article , and this guy goes on talking about how
So, I was talking with a guy the other day about Enterprise Library Logging
Talking from a 'best practice' point of view, what do you think is the
Talking about hibernate and others ORMs, the ORMs evangelists talk about SQL like the
Talking about SimpleModal the jQuery plugin. Most of the time I think it is
Talking about System.Collections.Generic.List<T> here. With example below can Method1 and Method2 execute and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.