Slashdot Mirror


User: Incognito+Milquetoas

Incognito+Milquetoas's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Copy In Copy Out on Data Locking In a Web Application? · · Score: 1

    We had a similar problem where we need locking across parent child records and across multiple web pages.

    We handled locking as follows:
    When a user goes to edit a record we make a copy of the record making the primary key of the parent record the negative value (e.g. key was 27 copy gets -27) and stamping a timestamp on it and the user who is editing. Then we copy all the child records as well with new keys but referencing the negative parent.

    This lets us use the database to hold changes between pages without having a large object model hold the data in the application server. We update the date stamp of the lock every intermediate save to the negative record.

    When the user finishes there multipage editing session and gracefully saves or cancels we copy back over the original record their changes and delete the negative copy.

    If a second user tries to edit they are told it is locked.

    If the first user exits ungracefully (e.g. reboots their PC mid session) we allow the same user to start a new edit session without a lock message but they lose their changes... (we could have given them a choice I guess to keep editing where they left off)

    If the lock was held for 2 hours without any updates any user can aquire the lock in case someone shut off their computer and left.

    A nightly job checks for abandoned records every night.

  2. Re:Finding credit cards numbers is easy on Why Are CC Numbers Still So Easy To Find? · · Score: 1

    Great... Now you've done it. Google is going to drop all the slashdot pages.