Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Patterns, Principles and Practices of Domain-Driven Design
This is the forum to discuss the Wrox book Patterns, Principles and Practices of Domain-Driven Design by Scott Millett; ISBN: 978-1-118-71470-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Patterns, Principles and Practices of Domain-Driven Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 25th, 2015, 05:21 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Optimistic concurrency

I see a confusion in the definition of the optimistic concurrency in the book.

In page 503, it says "The optimistic concurrency option assumes that there are no issues with multiple users making changes simultaneously to the state of business objects, also known as last change wins."

And in the next paragraph comparing the database versions is mentioned as a kind of pessimistic concurency.

But in the last paragraph comparing versions is described as an optimistic concurreny implementation of NHibernate.

As far as I know, optimistic concurrency is not just a last change wins situation, and comparing database versions is an optimistic concurrency method.
Reply With Quote
  #2 (permalink)  
Old July 1st, 2015, 08:35 AM
Wrox Author
Points: 237, Level: 4
Points: 237, Level: 4 Points: 237, Level: 4 Points: 237, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2015
Posts: 59
Thanks: 1
Thanked 5 Times in 5 Posts

Hi Balkan,

Sorry for the long delay in responding to your query. I have recently moved jobs and had to relocate. Unfortunately my ISP made an utter shambles of configuring my internet so I've been offline for so long I am getting withdrawal symptoms.

I don't have a copy of the book at the moment (packed away in boxes due to the house move) to understand the full context of those statements, but I generally agree with your assertion. Optimistic concurrency is about allowing overlapping reads as an alternative to locking the data. If multiple of those readers then try to update, the first write wins and the others fail (because they are operating on stale data). A version check might be used to determine if the data is stale, but that's just the implementation detail

I've actually worked in domains where last write wins was used as the concurrency strategy. However, it is distinctly different from optimistic concurrency. I think we probably made a typo there and meant "first write wins". I'll double-check when I've unpacked the books, and if so will get it added to the errata.

I do apologise for that, and hope it didn't spoil your enjoyment of the book. I wish I could show you how much effort we put into the book trying to make everything perfect, and removing all mistakes. I really am sorry that this got through.

If you have any other questions or comments, please let me know.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimistic Concurrency check box morteza BOOK: Beginning ASP.NET 4 : in C# and VB 1 November 28th, 2011 03:12 AM
Getting optimistic error when trying to update asraj16 SQL Server 2000 0 October 12th, 2007 10:30 AM
CONCURRENCY pallone SQL Server 2000 13 December 6th, 2006 12:01 PM
Concurrency dextertoh Classic ASP Databases 2 May 17th, 2004 12:53 AM

All times are GMT -4. The time now is 02:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.