Click here to Skip to main content
15,891,607 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Child Objects Inheriting Property Values from Parents Pin
led mike28-Nov-07 6:22
led mike28-Nov-07 6:22 
QuestionScaling out transaction processing Pin
Anubis33316-Nov-07 7:50
Anubis33316-Nov-07 7:50 
AnswerRe: Scaling out transaction processing Pin
led mike19-Nov-07 4:50
led mike19-Nov-07 4:50 
GeneralRe: Scaling out transaction processing Pin
Anubis33327-Nov-07 10:29
Anubis33327-Nov-07 10:29 
GeneralRe: Scaling out transaction processing Pin
led mike27-Nov-07 11:17
led mike27-Nov-07 11:17 
GeneralRe: Scaling out transaction processing Pin
Anubis33328-Nov-07 4:09
Anubis33328-Nov-07 4:09 
QuestionArchitecture for implementing locking Pin
Simon P Stevens15-Nov-07 2:00
Simon P Stevens15-Nov-07 2:00 
AnswerRe: Architecture for implementing locking Pin
cmf-DBA15-Nov-07 11:19
cmf-DBA15-Nov-07 11:19 
Hi there !

First all sorry about my little english. My native language is spanish.

Well, reading carefully your post, seems You must to add support for Managing Locking and Concurrency.


(Follows fragments were taken from the Microsoft Best Practices Series)

...

Managing Locking and Concurrency

Some applications take the “Last in Wins” approach when it comes to updating data in a database. With the “Last in Wins” approach, the database is updated, and no effort is made to compare updates against the original record, potentially overwriting any changes made by other users since the records were last refreshed. However, at times it is important for the application to determine if the data has been changed since it was initially read, before performing the update.

Data access logic components implement the code to manage locking and concurrency.

There are two ways to manage locking and concurrency:

Pessimistic concurrency. A user who reads a row with the intention of updating it establishes a lock on the row in the data source. No one else can change the row until the user releases the lock.

Optimistic concurrency. A user does not lock a row when reading it. Other users are free to access the row in the meantime. When a user wants to update a row, the application must determine whether another user has changed the row since it was read. Attempting to update a record that has already been changed causes a concurrency violation.


Using Pessimistic Concurrency

Pessimistic concurrency is primarily used in environments where there is heavy contention for data, and where the cost of protecting data through locks is less than the cost of rolling back transactions if concurrency conflicts occur. Pessimistic concurrency is best implemented when lock times will be short, as in programmatic processing of records.

Pessimistic concurrency requires a persistent connection to the database and is not a scalable option when users are interacting with data, because records might be locked for relatively large periods of time.


Using Optimistic Concurrency

Optimistic concurrency is appropriate in environments where there is low contention for data, or where read-only access to data is required.

Optimistic concurrency improves database performance by reducing the amount of locking required, thereby reducing the load on the database server.

Optimistic concurrency is used extensively in .NET to address the needs of mobile and disconnected applications, where locking data rows for prolonged periods of time would be infeasible. Also, maintaining record locks requires a persistent connection to the database server, which is not possible in disconnected applications.

Testing for Optimistic Concurrency Violations

There are several ways to test for optimistic concurrency violations:

 Use distributed time stamps. Distributed time stamps are appropriate when
reconciliation is not required. Add a time stamp or version column to each table in the database. The time stamp column is returned with any query of the contents of the table. When an update is attempted, the time stamp value in the database is compared to the original time stamp value contained in the modified row. If the values match, the update is performed and the time stamp column is updated with the current time to reflect the update. If the values do not match, an optimistic concurrency violation has occurred.

(end MS Article)

I have used datetimes instead of time stamp or version columns.

My two cents.

Hope this helps a bit.


cmf a little DBA.
GeneralRe: Architecture for implementing locking Pin
Simon P Stevens16-Nov-07 3:28
Simon P Stevens16-Nov-07 3:28 
GeneralRe: Architecture for implementing locking Pin
cmf-DBA16-Nov-07 9:24
cmf-DBA16-Nov-07 9:24 
GeneralRe: Architecture for implementing locking Pin
Simon P Stevens19-Nov-07 10:21
Simon P Stevens19-Nov-07 10:21 
GeneralRe: Architecture for implementing locking Pin
cmf-DBA20-Nov-07 3:17
cmf-DBA20-Nov-07 3:17 
QuestionWrapping Composite Controls Pin
Tristan Rhodes14-Nov-07 3:12
Tristan Rhodes14-Nov-07 3:12 
AnswerRe: Wrapping Composite Controls Pin
led mike15-Nov-07 4:45
led mike15-Nov-07 4:45 
GeneralRe: Wrapping Composite Controls Pin
Tristan Rhodes15-Nov-07 22:44
Tristan Rhodes15-Nov-07 22:44 
GeneralRe: Wrapping Composite Controls Pin
led mike19-Nov-07 12:00
led mike19-Nov-07 12:00 
GeneralRe: Wrapping Composite Controls Pin
Tristan Rhodes22-Nov-07 4:59
Tristan Rhodes22-Nov-07 4:59 
Question3D architecture Pin
rsaint2713-Nov-07 7:56
rsaint2713-Nov-07 7:56 
AnswerRe: 3D architecture Pin
Tristan Rhodes14-Nov-07 3:26
Tristan Rhodes14-Nov-07 3:26 
QuestionCalling UDDI services from DNA platform Pin
GuimaSun12-Nov-07 8:43
GuimaSun12-Nov-07 8:43 
Questioninstruction executed per second by a microprocessor Pin
akhshay gandhi12-Nov-07 7:11
akhshay gandhi12-Nov-07 7:11 
AnswerRe: instruction executed per second by a microprocessor Pin
Luc Pattyn12-Nov-07 7:40
sitebuilderLuc Pattyn12-Nov-07 7:40 
QuestionGood UML tool Pin
Oshtri Deka12-Nov-07 0:33
professionalOshtri Deka12-Nov-07 0:33 
AnswerRe: Good UML tool Pin
Tristan Rhodes14-Nov-07 3:21
Tristan Rhodes14-Nov-07 3:21 
GeneralRe: Good UML tool Pin
tnotstar31-Jan-08 9:08
tnotstar31-Jan-08 9:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.