de-labtory / swim Goto Github PK
View Code? Open in Web Editor NEWScalabe Weakly-consistent Infection-style Process Group Membership Protocol
License: Apache License 2.0
Scalabe Weakly-consistent Infection-style Process Group Membership Protocol
License: Apache License 2.0
implements MessageHandler handle, more specifically Indirect-Ping message handler
Subject
all members who work on this project
Proposal Detail
You may get hint about implementation details from this youtube links
Branch, Merge, Commit, PR, etc
We need some contribution guide docs.
Detail
Implement awareness functions
implementation reset function in member_map
I'm interested in suspicion mechanism so I'm now investigating more about this, so before move on to "writing codes", I think it is better to write down docs more about suspicion mech.
SyncSend
returns k response (if all request successfully returned). so the client of MessageEndpoint.SyncSend
should ignore k-1
response. because we only interested in whether final target of indirect-ping successfully responsed.Detail
Initially Implement the highest abstraction object of swim protocol according to docs
Reference
https://github.com/DE-labtory/swim/edit/develop/docs/Docs.md
SWIM added this suspicion mechanism to solve flapping problem and to make protocol more robust to slow processes
However, although suspicion mechanism was shown to address slow nodes, still vulnerable to slow nodes because:
Absence of expecting message can be a signal that the local member(self) may be slow node (slow processing messages, slow network): "No messages... maybe I'm in trouble?!"
Lifeguard plays in three situations
Dynamically adjust the fault detector timeouts. Starts timeouts low. and increase in response to absence of replies. If the acks are not sent back from probe or indirect probe, it judges it is local problem
So local node (node itself) vary two things:
Higher the value the worse we think we're doing.
ProbeTimeout = BaseTimeout * (NSA+1)
ProbeInterval = BaseInterval * (NSA+1)
Nack is not part of SWIM protocol but since we are now interested in discovering information about absence of messages, hashicorp thought that it was good idea to add nack messages. Then what is for nack?:
Without the nack if sender doesn't hear back from an indirect ping of target, it doesn't know the cause of problem is with A, B, C or D. But for the nack we can get hint with this problem. For example, if A receive Nack from B, C we can tell that A, B, C can talk each other and probabily D isolated. On the other hand if A don't receive nack back, A maybe isolated
Its principle is similar with L1
The motivation for L3 is the fact that only the suspected node can refute suspicion, in other words, only suspicion node can increment incarnation number.
For example, in the network there are many "suspect" message, but to refute those suspicion, only suspect node can refute its own suspicion by increment incarnation number(because higher incarnation number message can override other messages). So if node knows about suspect, then give probe priority to suspect: "Let him(suspect) know that he is suspicion"
Detail
Implement Infection-style dissemination mechanism (ref https://github.com/DE-labtory/swim/blob/develop/docs/Docs.md)
각 그룹의 멤버 M_i
는 버퍼를 가지고 있는데
M_i
)이 주위 멤버들에게 piggyback한 횟수를 담고 있는 local count
의 정보를 담는다. 그리고 이 local count
로 자신이 다음에 누구에게 piggyback 할지를 결정할 수 있다.ping
(또는 ack
)을 piggyback 할 수 있는 최대 횟수보다 크다면(충분히 크다면) 다음으로 piggyback 할 멤버는 local count
가 작은 멤버로 한다.그리고 두 개의 그룹 멤버 리스트를 가지고 있다.
going to work with @hea9549
Subject
udp
Detail
Implement packet transport for UDPTransport interface.
Reference
https://github.com/hashicorp/memberlist/blob/master/net_transport.go
Detail
implement handle ack function
Subject
conf using viper
Reference
https://github.com/it-chain/engine/tree/develop/conf
Introduce Node Self-Awareness(NSA) counter
self-awareness를 정량적으로 나타내고 그에 따라서 timeout, prove interval을 증가시키기 위해 NSA counter를 사용한다. NSA counter가 높을 수록 자기 자신 노드가 느리다고 생각하는 것이다.
ProbeTimeout = BaseTimeout * (NSA+1) ProbeInterval = BaseInterval * (NSA+1)
위와 같이 timeout과 interval을 조정한다. 그리고 NSA counter를 바꾸는 경우는 다음과 같다.
- Failed probe (no Ack): +1
- Probe with missed Nack: +1
- Refute suspicion about self: +1
- Successful probe (get Ack): -1
그리고 최대 NSA counter 값은 hashicorp에서는 8을 사용하고 있다.
Awareness should be updated whenever there's probe or refute. So Awareness is not relevant to MessageEndpoint but to SWIM
define suspicion model. This struct manages suspect timer
Where
member_map.go
Bug detail
SelectKRandomMemberID needs to return []Member
instead of []MemberID
.
Because we need to know address of the member to send msg.
Fix plan
Change return type to []Member
Subject
member_map
Proposal Detail
We tried to pick a K member in a round robin fashion, but we decide to modify it by simply selecting a K member from a memberMap.
Subject
write here
Detail
implement swim join function
assignee
@ChaeByunghoon
Global option
swim --config <config> or -c <config> [subcommand]
swim --debug or -d [subcommand]
Subcommand will be
swim start [--address <ip:port>]
swim add member [--address <ip:port>]
Detail
Implement func confirm
in member_map.go
Detail
Implement function handling piggyback messages about me.
Subject
Anybody
Proposal Detail
I think travis goimports scope should restricted to source files not vendor
I think we need awareness model which is related with L1 (self-awareness).
awareness model is metric for tracking health of the local-node (myself)
reference
https://github.com/hashicorp/memberlist/blob/master/awareness.go
Detail
implement Len, Push, Get, IsEmpty function
Reference
#33
implements selectKRandomMember
reference
https://github.com/DE-labtory/swim/blob/develop/member_map.go
Where
CLA hub
Bug detail
When a PR is generated, CLA hub doesn't work although signed to CLA hub.
Fix plan
fix it plz
Reference
.
Subject
All members who code udp part
Proposal Detail
How about writing udp test using tesseract. udp transport test may needs docker test.
message_endpoint
name is referenced from: https://english.stackexchange.com/questions/369828/what-is-the-generic-term-for-sender-and-receiver
select endpoint to represent both sender and receiver.
MessageEndpoint
basically do receiving packet and determine which logic executed based on the packet. Additionally MessageEndpoint
call MemberDelgator
to update member status, and encrypt data
Subject
udp
Detail
net_transport config
Reference
Subject
pbkstore, pb-message
Detail
We need to pass multiple piggyback messages in a single message.
The swim paper needs to be documented.
Subject
All of members
Proposal Detail
I think in hashicorp's memberlist struct Memberlist
do too much things, so I think it is better to separate responsibility. My suggestion is.. I want to separate receiving message part and sending message part. So the structure is
related #22
I've summarized hashicorp's memberlist. I've skipped a lot but this is basic logic and abstracted logic flow of probing node in failure detection
probeNode handles a single round of failure checking on a node
implements MessageHandler handle, more specifically Ack
message handler
implements MessageHandler handle, more specifically Ping
message handler
aliveNode is invoked by the network layer when we get a message about a live node
suspectNode is invoke by the network layer when we get a message about a suspect node
deadNode is invoked by the network layer when we get a message about a dead node
MemberState is used to manage our state view of another member.
I think MemberState should include:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.