Size: 2605
Comment:
|
Size: 3704
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
'''[http://29kj.com >>>> 香港六合彩曾道人白小姐提供六合彩资料和六合彩开奖结果]''' | ## page was renamed from WireProtocolNG == Proposed new wire protocol == |
Line 3: | Line 4: |
'''[http://29kj.com >>>> 香港六合彩专业网站,香港赛马会连结,提供香港六合彩特]''' | The wire protocol has several flaws: * it uses the roots of the new branches, this is susceptible to a race (see issue1320) . * if the client is missing a lot of nodes but doesn't have any local changes, it will still have to do a lot of roundtrips to discover the base nodes. |
Line 5: | Line 8: |
'''[http://29kj.com >>>> 香港六合彩官方网站曾道人内幕玄香港六合 彩大公开]''' | See WireProtocol for the current protocol. |
Line 7: | Line 10: |
'''[http://1878.cc >>>> 香港六合彩天线宝宝公开内幕玄香港六合 彩]''' | === Overview === |
Line 9: | Line 12: |
'''[http://29kj.com >>>> 香港六合彩曾道人特码主论坛六合彩图库白小姐liuhecai]''' | The basic algorithm is still the same, we first discover a set of nodes. Then we get all the changes from those nodes. |
Line 11: | Line 15: |
'''[http://1878.cc >>>> 香港六合彩内幕玄香港六合 彩大公开]''' | === The Protocol === |
Line 13: | Line 17: |
'''[http://29kj.com >>>> 香港六合彩开奖结果预测、特码、图库、单双、大小、头数、尾数、平码、特围等开奖综合信息]''' | The discovery protocol is based on the [[http://en.wikipedia.org/wiki/Dominator_(node)|dominance property]] |
Line 15: | Line 19: |
'''[http://1878.cc >>>> 香港六合彩特码白小姐网站:六合彩开奖结果最快现场直播网站]''' | {{{heads()}}} {{{ return a list of heads (everything new must be an ancestor of one of these heads, so start here) }}} |
Line 17: | Line 25: |
'''[http://1878.cc >>>> 香港六合彩开奖现场 香港六合彩官方网 香港六合彩开奖记录 香港六合彩开奖结果 香港六合彩图库]''' | Basically dominators() is like between() except it is more coarse-grained |
Line 19: | Line 27: |
'''[http://1878.cc >>>> 香港六合彩公司 香港六合彩开奖 香港六合彩网站 香港六合彩总公司 香港六合彩特码 ]''' | {{{dominators(list of couple)}}} * list = a list of couple (tip, dom) where dom dominates tip * tip = the last revision in a branch that we're interested in (often a head). * base = the first revision going backwards from a node that has two parents (the product of a merge). * p1 = the first parent of the base. * p2 = the second parent of the base. {{{ let s be the sequence of dominators from tip (we only aggregate linear history, so it's a list of (t, b, p1, p2)) return elements 1, 2, 4, ... (maybe bounded ?) }}} |
Line 21: | Line 38: |
'''[http://29kj.com >>>> 香港六合彩开奖现场 香港六合彩官方网 香港六合彩开奖记录 香港六合彩 六合彩开奖结果]''' | {{{between(list)}}} * branch = Basically a linear set of changes. More formally, a list of changes such that no change in the set (except possibly the last) has two parents, and all changes in the list are related to eachother by parent->child relationships. * list = a list of (tip, base) tuples for branches we'd like to know the history of. Presumably the client knows about the base of the branch, but not the tip, and wants to find out where in the branch its knowledge ends. * tip = the latest revision in a branch the client is interested in (may not be the actual tip of the branch on the server side) * base = the earliest revision in a branch the client is interested in. Always a revision the client knows about. {{{ for tip, base in list: walk back a linear branch, return elements 1, 2, 4, 8.. (and this lets us do bisection search if we diverge in the middle of one of these long branches) }}} |
Line 23: | Line 49: |
'''[http://29kj.com >>>> 香港六合彩-六合彩图库/六合彩网站/偷偷暗示每期内幕特码资料]''' | Now it would be better if the processus was symetrical, at the same time as we descend from remote tips, we could do the same locally. For that we would need the following call: {{{has(list)}}} * list = a list of nodes {{{ return a list of boolean indicating if the node was found on the server. }}} |
Line 25: | Line 58: |
'''[http://29kj.com >>>> 香港六合彩开奖结果:香港六合彩图库-六合彩曾道人特码-六合彩开奖结果]''' | To minimize roundtrips, it would be nice to combine the has() call with dominators(). |
Line 27: | Line 60: |
'''[http://29kj.com >>>> 香港六合彩曾道人公开内幕资料— 香港六合彩-特码搜索]''' | The current changegroup() uses base nodes, it should instead use common nodes. {{{changegroup(roots)}}} * roots = a list of the latest nodes on every service side changeset branch that both the client and server know about. {{{ find all changesets descended from roots and return them as a single changegroup }}} A changegroup is a single stream containing: * a changelog group * a manifest group * a list of * filename length * filename * file group (terminated by a zero length filename) |
Line 29: | Line 74: |
'''[http://29kj.com >>>> 六合彩|香港六合彩|六合彩公司|曾道人六合彩|六合彩最快开奖结果]''' | A group is a list of chunks: * chunk length * self hash, p1 hash, p2 hash, link hash * uncompressed delta to p1 * (terminated by a zero length chunk) |
Line 31: | Line 80: |
'''[http://29kj.com >>>> 香港六合彩/曾道人特码主论坛/六合彩特码主论坛/黄大仙老牌主论坛..]''' | |
Line 33: | Line 81: |
'''[http://29kj.com >>>> 香港六合彩图库,特码,平码,六合彩开奖结果,六合彩开奖历史记录]''' | === Wishlist === |
Line 35: | Line 83: |
'''[http://29kj.com >>>> 香港六合彩资料|香港六合彩:香港六合彩曾道人特码|香港六合彩开奖结果...]''' | * Estimate early how much data or items have to be transfered and communicate this to the other side, so a progress indicator could be more useful. -- ThomasArendsenHein <<DateTime(2008-10-24T14:23:01Z)>> |
Line 37: | Line 87: |
'''[http://29kj.com >>>> 六合彩香港六合彩香港六合彩总公司六合彩官方网六合彩图库美香港六合 彩六肖图]''' '''[http://29kj.com >>>> 香港六合彩公司|六合彩网|香港六合彩网|一字解特码|六合彩518222总公司]''' '''[http://29kj.com >>>> 香港六合彩网站,香港赛马会资料,香港六合彩玄香港六合 彩at 今天最新资料]''' |
---- CategoryInternals |
Proposed new wire protocol
The wire protocol has several flaws:
- it uses the roots of the new branches, this is susceptible to a race (see issue1320) .
- if the client is missing a lot of nodes but doesn't have any local changes, it will still have to do a lot of roundtrips to discover the base nodes.
See WireProtocol for the current protocol.
Overview
The basic algorithm is still the same, we first discover a set of nodes. Then we get all the changes from those nodes.
The Protocol
The discovery protocol is based on the dominance property
heads()
return a list of heads (everything new must be an ancestor of one of these heads, so start here)
Basically dominators() is like between() except it is more coarse-grained
dominators(list of couple)
- list = a list of couple (tip, dom) where dom dominates tip
- tip = the last revision in a branch that we're interested in (often a head).
- base = the first revision going backwards from a node that has two parents (the product of a merge).
- p1 = the first parent of the base.
- p2 = the second parent of the base.
let s be the sequence of dominators from tip (we only aggregate linear history, so it's a list of (t, b, p1, p2)) return elements 1, 2, 4, ... (maybe bounded ?)
between(list)
branch = Basically a linear set of changes. More formally, a list of changes such that no change in the set (except possibly the last) has two parents, and all changes in the list are related to eachother by parent->child relationships.
- list = a list of (tip, base) tuples for branches we'd like to know the history of. Presumably the client knows about the base of the branch, but not the tip, and wants to find out where in the branch its knowledge ends.
- tip = the latest revision in a branch the client is interested in (may not be the actual tip of the branch on the server side)
- base = the earliest revision in a branch the client is interested in. Always a revision the client knows about.
for tip, base in list: walk back a linear branch, return elements 1, 2, 4, 8.. (and this lets us do bisection search if we diverge in the middle of one of these long branches)
Now it would be better if the processus was symetrical, at the same time as we descend from remote tips, we could do the same locally. For that we would need the following call: has(list)
- list = a list of nodes
return a list of boolean indicating if the node was found on the server.
To minimize roundtrips, it would be nice to combine the has() call with dominators().
The current changegroup() uses base nodes, it should instead use common nodes. changegroup(roots)
- roots = a list of the latest nodes on every service side changeset branch that both the client and server know about.
find all changesets descended from roots and return them as a single changegroup
A changegroup is a single stream containing:
- a changelog group
- a manifest group
- a list of
- filename length
- filename
- file group (terminated by a zero length filename)
A group is a list of chunks:
- chunk length
- self hash, p1 hash, p2 hash, link hash
- uncompressed delta to p1
- (terminated by a zero length chunk)
Wishlist
- Estimate early how much data or items have to be transfered and communicate this to the other side, so a progress indicator could be more useful.
-- ThomasArendsenHein 2008-10-24 14:23:01