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 6065827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:26:04+00:00 2026-05-23T09:26:04+00:00

I have some problem in system I am developing. I have one python script

  • 0

I have some problem in system I am developing. I have one python script which first works with a virtulisation software and if that operation succeeds, it writes things to database.
If some exception occurs in the virtulisation software then I can manage all things, but the real problem will occur if inserting in database fails. If insert fails , i will have to revert things in that virtulization software otherwise things will become asynchronous. But problem is, reverting things in that software is not possible all the time.

How to handle things so that i can keep the database in sync with that software? Any middle ware or special application??? Or any logic in programming?

  • 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-23T09:26:04+00:00Added an answer on May 23, 2026 at 9:26 am

    You want two actions in your system (OP: operation in your virt. software; WDB: write to database) to be atomic (either both take place, or none). Kind of a distributed transaction, but your virtualized software does not directly support directly a transactionable behaviour (no rollback). If you could make them part of some distributed transactional system, you’d be done (see eg), but that is often impossible or impractical. Different strategies to attain a pseudo-transactional behaviour depends on the particulars of your scenario. Some examples:


    1. Open TX (transaction in DB)
    2. WDB
    3. OP
    4. If OP succeeded, commit TX, else rollback TX.

    Only feasible if what you write to DB does not depend on OP operation (improbable).


    1. OP1 (first phase of the operation: you get the results, but do not alter anything)
    2. Open TX
    3. WDB
    4. OP2 (second phase: you modify the virt. sofware)
    5. Commit TX or rollback

    (Steps 4-5 can be switched) This would be a poor’s man “Two-phase commit” implementation. Only feasible if you can divide your operation in those two phases.


    1. Open TX
    2. Dummy WDB (write a dummy result to DB)
    3. Rollback TX
    4. OP
    5. WDB

    This checks that the DB is operational, doing a dummy writing before attempting the real operation and writing. Feasible, but not foolproof.


    1. OP
    2. WDB
    3. If fail: save data to a raw file, log error, send mail to IT, turn red lights on.

    Sound pathetic… but sometimes it’s the only feasible way.

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

Sidebar

Related Questions

I have a problem: imagine I have a plugin-based system. I need some kind
I have problem in some JavaScript that I am writing where the Switch statement
I have an intermittent problem with some code that writes to a Windows Event
Problem: We have a web app that calls some web services asynchronously (from the
I discovered to have some problem to fully understand callbacks scoping when trying to
Here's my problem - I have some code like this: <mx:Canvas width=300 height=300> <mx:Button
So I have run up against this problem a few times: I have some
I've some CSS problem in Firefox 3. I have several image buttons on my
I have run into a bit of a tricky problem in some C++ code,
I have problem when I try insert some data to Informix TEXT column via

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.