1 Reply Latest reply on May 30, 2014 2:35 PM by vbchin2

    what is the behaviour of an asynchronous transaction?

    francesco.sclano

      Hi,

      I'm investigating asynchronous transaction in order to improve performances.

      Could you please explain me what is the behaviour of a transaction in a replicated asynchronous cache?

      If I have a transaction composed by operations, in which every operation depends by previous operation (i.e. order of execution of operations is important).

      For instance, consider a transaction T that performs a read of data1 needed to build data2, data2 is then written on cache.

       

      TRANSACTION T {

             

              // 1° operation

              data1 = get(key1);

             

              // 2° operation

              data2 = elaborate(data1);

             

              // 3° operation

              put(data2);

             

      }

       

       

      In other words, I need that "entire transactions" are asynchronously executed, but I need that operations performed inside a transaction remain synchronous.

      Is it possible? If yes, how I have to configure infinispan?

       

      Many Thanks

       

      Francesco Sclano

        • 1. Re: what is the behaviour of an asynchronous transaction?
          vbchin2

          Straight from the Infinispan User Guide:

          However, when a synchronous replication returns successfully, the caller knows for sure that all modifications have been applied to all cache instances, whereas this is not be the case with asynchronous replication. With asynchronous replication, errors are simply written to a log. Even when using transactions, a transaction may succeed but replication may not succeed on all cache instances. 

          Having said that, batching would have been a great choice provided your replication was synchronous.