Hi Donald,

You're right, we'd need more docs about our distributed architecture. Well,
talking about Cassandra similarities, we also have a writeQuorum, so if
it's the majority (default in v2.2), you always are consistent.

The main difference is that we have the concept of Transaction, in both
local and distributed modes. When running distributed, the transactions use
a 2 phase lock like protocol, with the cool thing that everything is
optimistic, so no locks between the begin and the commit, but everything is
executed at commit time only.

During the commit time, OrientDB acquires locks on the touched records and
check the version of records (optimistic MVCC approach). At this point this
could happen:

   1. All the record can be locked and nobody touched the records since the
   beginning of the tx, so the transaction is committed. Cool.
   2. If somebody modified any of the records that are part of the
   transaction, the transaction fails and the client can retry it
   3. If at commit time, another transaction locked any of the same
   records, the transaction fails, but the retry in this case is automatic and
   configurable

If you have 5 servers, and writeQuorum is the majority (N/2+1 = 3), this
could happen:

   1. All the 5 servers commit the TX: cool
   2. 1 or 2 servers report any error, the TX is still committed (quorum
   passes) and the 1 or 2 servers will be forced to have the same result as
   the others
   3. 3 servers or more have different results/errors, so the tx is
   rollbacked on all the servers to the initial state

I hope now it's more clear ;-)


Best Regards,

Luca Garulli
Founder & CEO
OrientDB <http://orientdb.com/>


On 7 May 2016 at 17:31, Eric24 <[email protected]> wrote:

> +1
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to