On Wed, Oct 20, 2010 at 1:39 AM, tsuna <[email protected]> wrote: > I would like to add that you can probably get rid of RowLock and use > checkAndPut instead to atomically create the row if it doesn't already > exist. This would probably solve the last problem I outlined where 2 > different instances of your web service attempt to assign the same ID > at the same time. The code would also be simpler and more efficient. >
Hi again, Ryan also mentions to avoid RowLock, so I will have to find out a way to avoid it all together, checkAndPut can be used for optimistic locking. So I think I will get rid of locking from returning an ID. In that case for running multiple instances users can if checkAndPut fails get a new Row ID. Thanks a lot, Imran > -- > Benoit "tsuna" Sigoure > Software Engineer @ www.StumbleUpon.com > -- Imran M Yousuf Entrepreneur & CEO Smart IT Engineering Ltd. Dhaka, Bangladesh Twitter: @imyousuf - http://twitter.com/imyousuf Blog: http://imyousuf-tech.blogs.smartitengineering.com/ Mobile: +880-1711402557
