Giter VIP home page Giter VIP logo

selectmaster's Introduction

SelectMaster

个人实践项目:

1、通过代码实践分布式网络选主的过程

2、若果第一步实现,实现分布式锁工具(中心)

3、若果前两步实现,处理脑裂现象

4、若果前三步实现,处理分布式网络中消息传递的性能问题

假如... 2018-04-20:

1、处理socket连接,单机的网络时延比我想象的要低很多,但是这是一个不断测试的值;

2、下一步要处理【quorum】法定机器数量的问题,quorum的证明暂时还不会,但是能理解它的原理,保 证无论以哪种方式确定quorum,两个quorum之间总有共享机器;

2018-04-21:

1、还是没有完全理解,逻辑时钟漂移依然存在,网络时延到底怎么判断

2、代码在求全后,已经可以在两个机器之间进行选主

明天的工作:

处理quorum的问题,解决网络时延的问题

2018-04-22:

1、处理n(n>=3)台主机选主的问题

想到一个问题,需要先做服务发现,这样就不用写机器ip和端口号了

理论知识:

  • 假设机器CPU的频率是a == 4GHZ=4*10^9
  • 光速c == 3*10^8 光纤传输速度b == 2/3*c=2*0^8
  • 局域网内,理论上机器X在w端口发送的消息到达机器Y的z端口的时间无限趋近于0
  • a/b≈2*10,这个数字再放大,考虑机器X生成消息到机器Y解析消息
  • 机器X差不多可以进行200个时钟周期,当然具体的值可以经过反复测量

selectmaster's People

Watchers

seateforget avatar

Forkers

langjiangit

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.