1 Reply Latest reply on Oct 15, 2013 7:38 PM by Sanne Grinovero

    Can Infinispan make Mongo Transactional?

    Bill Burke Master

      Given that Infinispan can support 1pc and 2pc transactions, if you use Mongo as a store, does this mean Mongo can then be used transactionally?  I've been balking about using Mongo because of its lack of transactions.  If Infinispan can make Mongo transactional this would be a huge value add.

        • 1. Re: Can Infinispan make Mongo Transactional?
          Sanne Grinovero Master

          The simple answer is yes: from the point of view of the Infinispan client you would "experience" transactional storage.


          But there are some catches; first, Infinispan is going to assume that when something is sent to it for storage, that it will actually be stored, while it is my understanding that with MongoDB you have no certainty.

          Second, you won't be able to use its "document oriented" features: you would only use it as a key/value store.


          Basically what you get is a (very large) buffer which allows consistent (distributed) locking on entries and that will only "flush" the the MongoDB store if the transaction is actually committed.

          So you know the writes where meant to be written (committed), and that you're writing the correct ones (isolation and locking), but you still don't know for sure that your data is going to be safely stored.


          In practice considering that Infinispan would replicate the data at its own level - even before storing it in MongoDB - the missing storage guarantee on MongoDB could be considered mitigated?

          1 of 1 people found this helpful