transaction and concurrency in mongodb 3.2.8.

394 views
Skip to first unread message

rahil shareef

unread,
Jul 23, 2016, 5:11:19 PM7/23/16
to mongodb-user
hi,

i want to develop an application in mongodb.3.2.8 and c#.

kindly tell me about concurrency and transactions/lock/wired tiger.

guide me and help me to start for it. any documentation and examples.

and what is the difference now from rdbms in transactions ?

Senthil

unread,
Jul 24, 2016, 4:21:02 PM7/24/16
to mongodb-user
if your application has more concurrent transactions then Mongodb is not the right choice.  However you can create all the relations in a single document, and so the updates will  be happening in a single document.   

Wan Bachtiar

unread,
Aug 4, 2016, 9:24:20 PM8/4/16
to mongodb-user

i want to develop an application in mongodb.3.2.8 and c#.

guide me and help me to start for it. any documentation and examples.

Hi Rahil,

I would suggest to check out Getting Started with MongoDB C# tutorial in the MongoDB manual as a starting point.

Also recommended to enroll in a free online course at MongoDB University M101N: MongoDB for .NET Developers. This course will go over basic installation, JSON, schema design, querying, insertion of data, indexing and working with the C# driver. In the course, you will build a blogging platform, backed by MongoDB. A new session has just started this week, and is not too late to join.

kindly tell me about concurrency and transactions/lock/wired tiger.

Please see MongoDB FAQ on concurrency for resources on MongoDB concurrency and locks.

In regards to WiredTiger:

  • Uses document-level concurrency control for write operations. As a result, multiple clients can modify different documents of a collection at the same time.
  • Most read and write operations uses optimistic concurrency control. WiredTiger uses only intent locks at the global, database and collection levels. When the storage engine detects conflicts between two operations, one will incur a write conflict causing MongoDB to transparently retry that operation.

For information about transactions, please see Atomicity and Transactions and Two Phase Commits tutorial.

Data in MongoDB has flexible and dynamic schema. In order to leverage this characteristic for performance and scalability, you need to design a suitable data model for your application use case. See also Data Model Examples and Patterns.

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages