Richard Pajerski Software development and consulting

Multi-document transactions in Domino: needed!

by Richard Pajerski


Posted on Tuesday July 31, 2018 at 02:44PM in Technology


Among the areas getting attention in the upcoming release of Domino 10 is the data store.  As part of making Domino more bullet-proof, removing the 64GB limit on the NSF size is planned and will be a fantastic improvement.  Naturally, this is going to put more emphasis on overall database scalability.  As Domino gets more scalable, I think it's going to need a feature that many of us have been seeking for some time: multi-document ACID transactions.


Being able to save two or more documents as a single transaction cannot currently be done natively in Domino.  The best we can get is saving all of the fields associated with a single document using NotesDocument.Save: the operation either succeeds or fails.  This is fine for most Notes/Domino applications but there are a number of cases where having a transactional save across multiple documents is desirable.  A simple work order system where multiple, related tasks are attached to a main work order request is an obvious example.  Implementing each task as a separate document is an intuitive approach and can simplify programming of such a system.


MongoDB 4.0 recently introduced multi-document transactions.  And although Domino doesn't directly compete with MongoDB or other NoSQL databases, as it begins to scale, it's nonetheless going to need to act more like them.


What do you think?



Comments:

I second this, especially because NSF has transaction support built in, which unfortunately is not exposed yet in Java or LotusScript and only available via undocumented C API methods.

It‘s not full ACID, but already pretty useful. You can try it out with Domino JNA.

Here is an example where I roll back a document creation:
https://github.com/klehmann/domino-jna/blob/master/domino-jna/src/test/java/com/mindoo/domino/jna/test/TestTransactions.java/

And here is the code of the class providing access to transactions with comments:
https://github.com/klehmann/domino-jna/blob/master/domino-jna/src/main/java/com/mindoo/domino/jna/transactions/Transactions.java

Posted by Karsten Lehmann on July 31, 2018 at 03:36 PM EDT #


Thanks for your comments, Karsten -- I will take a look at Domino JNA. Which parts of the undocumented API are not full ACID? Do you have any idea if IBM/HCL is considering transactions for the future?

Posted by Richard on July 31, 2018 at 04:46 PM EDT #


All I know is in the code comments of the Transaction class. Looking at the ACID definition, I think I was wrong. Looks pretty good for most operations, but IBM/DCL dev said that there some folder operations (add/remove document) might not be 100% covered yet.

Posted by Karsten Lehmann on August 01, 2018 at 03:51 AM EDT #


Please make sure to also post your suggestion as a new idea here: https://domino.ideas.aha.io/?project=IDEAAD

Posted by Erik on August 01, 2018 at 05:07 AM EDT #


I don't know if exposing transaction support for developers is already planned. I requested it for V10 via the Design Partner program in March 2018, feels like a low hanging fruit, but I may be wrong.

Posted by Karsten Lehmann on August 01, 2018 at 05:09 AM EDT #


Sounds great. Could also be an idea for the Product Ideas forum: https://domino.ideas.aha.io

Posted by Patrick Zarnikow on August 01, 2018 at 05:59 AM EDT #


Leave a Comment

HTML Syntax: Allowed