Code Monkey home page Code Monkey logo

tinykv's Introduction

Hi there 👋

第一性原理:完成一个目标只有少数几个必要条件。只需要专注他们,不要总是有奇奇怪怪的无效假设。不要被乌合之众的观点/做法绑架。1

所以,Zookeeper这里声明,自己最开始就不支持线性一致性,来解决这里的技术问题。如果不提供这个能力,那么(为读请求返回旧数据)就不是一个bug。这实际上是一种经典的解决性能和强一致之间矛盾的方法,也就是不提供强一致。2

有些方案,纯粹就是糟糕的方案。3

同时,论文也提出了一个当时非常异类的观点:存储系统具有弱一致性也是可以的。当时,学术界的观念认为,存储系统就应该有良好的行为,如果构建了一个会返回错误数据的系统,就像前面(详见3.2)介绍的糟糕的多副本系统一样,那还有什么意义?4

因此CAP要理解为,当网络分区发生时(P),A和P只能二选一。5

正因为每个Java对象都有Mark Word,而Mark Word能标记锁状态(把自己当做锁),所以Java中任意对象都可以作为synchronized的锁。6

Footnotes

  1. https://github.com/apachecn/home

  2. 8.4 Zookeeper。“我玩完不给钱,就不算嫖喽”🤣。

  3.  WEB开发中,使用JSON-RPC好,还是RESTful API好? 这篇文章diss了Restful的无脑拥护者,并提出其实JSON-RPC就能很好地替代Restful的工作

  4. GFS的设计目标。这和Zookeeper很相似�

  5. CAP理论并不遵循“三选二定律”,实际上是二选一。

  6. 来自《漫画:从JVM锁扯到Redis分布式锁

tinykv's People

Contributors

0xff-96 avatar binacs avatar clark1013 avatar connor1996 avatar fengzixu avatar fk2469 avatar huahang avatar imaffe avatar jychen7 avatar kana112233 avatar liyiheng avatar loxp avatar miamia0 avatar minghuaw avatar mmyj avatar ninglin-p avatar nrc avatar onesizefitsquorum avatar palash25 avatar poorpool avatar rapiz1 avatar swildgold avatar t0ugh avatar trafalgarricardolu avatar wangnengjie avatar xiongjiwei avatar yangkeao avatar yangkian avatar yxa2111 avatar zhuo1angt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.