3 Replies Latest reply on Jan 11, 2010 3:21 AM by galder.zamarreno

    Small road map question

    roman.mandeleil1

      Hi JBoss Cache fellows,

      I see that pessimistic locking is being deprecated for MVCC scheme, the question is why ? I do understand that pessimistic lock scheme has very poor
      performance but in some case you don't have any other option. Why to deprecate ? Why it can't be left as an option ?

      Thank in advance
      Roman

        • 1. Re: Small road map question
          galder.zamarreno

          In which cases do you wanna use PL instead of MVCC?

          • 2. Re: Small road map question
            roman.mandeleil1

            Let's say I am working on a trading application, ask orders against bid orders, when there is an order match there is a deal.

            The point is that I can't take any chance there. If the order is there I don't want any other cache instance to pull it out. I prefer all the instances to lock, proceed and then go on. The safety factor is very important here.

            Regards
            Roman

            • 3. Re: Small road map question
              galder.zamarreno
              A match could modify those orders somehow in which case you'd need a WL and hence others wouldn't be able to match that order. You could also do a get with Option.forceWriteLock() so that reads result on WL. Finally, for any future development, I'd suggest you use Infinispan rather than JBoss Cache since the latter is in maintenance mode now.