Transactions and sub-document operations using .NET

I’m using the Couchbase.Transaction library and it appears that the sub-document operations which are typically possible by way of the .NET SDK are not available there. Is it expected that they will not be available, or am I missing something?

1 Like

That is correct.

Couchbase.Transactions uses sub-document operations extensively under the covers, but only Get/Insert/Replace/Remove are supported as transactional operations for now.

1 Like

You wrote “for now”. Is there some hope or discussion of providing this functionality in the future?

Query is on the roadmap, but not SubDocument, as far as I know.

Hey @malclear , thanks for the interest! @Richard_Ponton did bring this up on your behalf a bit earlier today and we had a good discussion about it. It’s not in a solid spot on the roadmap at the moment, but I did want to let you know we’re talking about it.

One question for you: what is it you hope to gain with Sub-Document with transactions? In many ways, Sub-Document just moves the processing from the client to the cluster and gains some transport time advantages possibly at the cost of creating a bottleneck elsewhere. When we talked through it a little bit earlier, it wasn’t entirely clear how one would want to use Sub-Document with Transactions.

Maybe you can fill us in on your use case?

Also @shivani_g and @AV25242 will probably take interest as the product managers in this area!

2 Likes

It is not a high-demand need that I have, but it could have been useful for the very reasons you listed: quantity of data across the wire and concentration of logic on the server side.
The application in our system that will be the first to use Couchbase is what I call a “projector”. It reads events from our Event Sourced system’s journal and interprets them in order to create projections, or views, for the clients. I’d thought that the document types could equate one-to-one to the view-models, but this means we would need to make several small mutations to some of the larger documents, rather than moving the large block of data across the wire for each streamed event being handled.
The alternative is to join smaller documents together to form the view, which will be OK.
– Malcolm Learner

1 Like