图5 学术界对于“事务一致性和分布式一致性的结合点”的研究(2) 另外,业界经常提及“强一致性”,但概念混乱不清晰。文献《Consistency in Non-Transactional Distributed Storage Systems》指出如下内容,澄清了强一致性的含义: In a hybrid consistent system, strong operations are guaranteed to be seen in some sequential order by all processes (as in sequential consistency), while weak operations are designed to be fast, and they eventually become visible by all processes (much like in eventual consistency). Weak operations are only guaranteed to be ordered according to their interleaving with strong operations: if two operations belong to the same session and one of them is strong, then their relative order of invocation is respected and visible by all processes. 所以,是否被“所有进程”可见,是判断强一致性的标准,而在分布式一致性中,只有线性一致性和顺序一致性满足强一致性的含义。而结合事务一致性,需要再满足可串行化才能称为分布式事务的强一致性。 综上所述,TDSQL所研究的问题,正是ACID的C、CAP的C,以及强一致之间的内在联系,他们有两个维度的表现:一是考虑这些因素时如何保证正确性,二是在有这些因素存在影响下如何保证所实现的系统有好的性能。如果没有好的性能,提供再强的一致性也难以实用,因此强一致性背景下实现高性能成为挑战。 三 产业界的实现与存在的问题 在产业界,目前只有Google的Spanner系统,实现了“严格可串行化”,Spanner称之为“外部一致性”(《Spanner:Googles globally distributed database》)。该项技术在2012年发表,使得数据库界的研究和实践从NoSQL时代买入NewSQL时代,具有划时代的意义。其实现的技术本质,是把分布式中的线性一致性和事务一致性的可串行化相结合,从而实现了“严格可串行化”。