Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

locking with .NET client

1 reply [Last post]
  • Login or register to post comments
Tue, 10/16/2012 - 05:13
Lubos
Offline
Joined: 09/03/2012
Groups: None

hi,

i'm developing app written in .NET. i'm using couchbase client found here.

what i'm trying to make is
1. to get the object from cache
2. lock it for writes/reads (or at least signalize locking if somebody else gets it)
3. modify it
4. release the lock

is it possible to use clients api to lock the document?

thx
Lubos

Top
  • Login or register to post comments
Mon, 10/22/2012 - 08:47
john
Offline
Joined: 01/05/2012
Groups: None

Hi Lubos,

Couchbase does offer a get with lock facility that provides pessimistic locking. Unfortunately, it is not implemented currently in the .NET client. You can read more about that feature in the Java docs - http://www.couchbase.com/docs/couchbase-sdk-java-1.0/couchbase-sdk-java-.... I've created an issue for tracking this feature in .NET - http://www.couchbase.com/issues/browse/NCBC-145. I hope to add it after the 1.2 release of the client.

Depending on your use exact use case, you might be able to take advantage of CAS operations, which are optimistic concurrency controls.

http://www.couchbase.com/docs/couchbase-sdk-net-1.1/couchbase-sdk-net-up...

-- John

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker