L. Holanda
L. Holanda

Reputation: 4621

Providing transactional logic on couchbase 4

Background:

I've seen lots of material on transaction support for NoSQL document oriented databases. As I could learn, essentially there is no native transactional support to ensure multiple documents will be updated and requiring transactional updates could be a strong evidence that the document model could be refactored as one single document. However, there could be some exceptional cases, for example, the classic bank transfer scenario, which is recommended to be implemented using the Two Phase Commit.

My question:

I have noticed Couchbase documentation always had a dedicated section on "Providing Transactional Logic - Performing Two-Phase Commits". This has been explained the same way since version 1.8 until version 3.x. However, on version 4 documentation (both 4.0 and 4.1 DP) this topic disappeared and I couldn't find anything else related to transactional logic.

Is anyone aware of any changes proposed or upcoming new features for transactional support?

With the introduction of N1QL, this could be feasible, specially considering that N1QL provides DML operations. But documentation on DML operations is basically non existent as per 4.0 docs that states:

Note:

DML statements are beta in Couchbase Server 4.0.

Upvotes: 2

Views: 184

Answers (2)

Matt Ingenthron
Matt Ingenthron

Reputation: 1894

As of Couchbase Server 6.5 (in beta as I write this), Couchbase can, on behalf of an app, atomically modify more than one document in a transaction.

A lot of that older advice is still valid and newly refreshed in the current documentation. While it pre-dates the 6.5 transaction support, there's a great blog series on ACID Properties with Couchbase that talks about some of the considerations and tradeoffs.

Upvotes: 2

NoSQLKnowHow
NoSQLKnowHow

Reputation: 4845

With Couchbase 4.0 and N1QL, it does not change in this regard. I cannot speculate on when/if this functionality will be added to N1QL.

As an aside, using DML with N1QL in Couchbase is set to be GA in the upcoming 4.1 release due out soon.

Upvotes: 1

Related Questions