Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 25th, 2015, 05:21 AM
Registered User
 
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.
 
Old July 1st, 2015, 08:35 AM
Wrox Author
 
Join Date: May 2015
Posts: 59
Thanks: 1
Thanked 5 Times in 5 Posts
Default

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.





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





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