rstefan1 / bimodal-multicast Goto Github PK
View Code? Open in Web Editor NEWAn implementation of the Bimodal Multicast Protocol written in GO
License: Apache License 2.0
An implementation of the Bimodal Multicast Protocol written in GO
License: Apache License 2.0
In tests:
HTTP Server
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/pkg/internal/server/server_test.go:57
at solicitation request
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/pkg/internal/server/server_test.go:186
responds with synchronization message [It]
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/pkg/internal/server/server_test.go:217
Expected success, but got an error:
<*url.Error | 0xc0000b5e90>: {
Op: "Post",
URL: "http://localhost:35619/solicitation",
Err: {
Op: "dial",
Net: "tcp",
Source: nil,
Addr: {
IP: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 127, 0, 0, 1],
Port: 35619,
Zone: "",
},
Err: {Syscall: "connect", Err: 0x6f},
},
}
Post http://localhost:35619/solicitation: dial tcp 127.0.0.1:35619: connect: connection refused
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/pkg/internal/server/server_test.go:244
Full Stack Trace
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/vendor/github.com/onsi/gomega/internal/assertion/assertion.go:75 +0x305
github.com/rstefan1/bimodal-multicast/vendor/github.com/onsi/gomega/internal/assertion.(*Assertion).To(0xc0000c5700, 0xae0240, 0xef3228, 0x0, 0x0, 0x0, 0x0)
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/vendor/github.com/onsi/gomega/internal/assertion/assertion.go:38 +0x11f
github.com/rstefan1/bimodal-multicast/pkg/internal/server.glob..func1.4.3()
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/pkg/internal/server/server_test.go:244 +0x921
github.com/rstefan1/bimodal-multicast/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0xc0000c3020, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/runner/workspace/src/github.com/rstefan1/bimodal-multicast/pkg/internal/server/server_suite_test.go:28 +0xf7
testing.tRunner(0xc00018a200, 0xa68ac8)
/usr/local/golang/1.11/go/src/testing/testing.go:827 +0x163
created by testing.(*T).Run
/usr/local/golang/1.11/go/src/testing/testing.go:878 +0x651
```
if roundNumber - msgBuffer[slot].gossipCount > G {
discard(msgBuffer[slot])
}
It may be more efficient.
GossipRound
goroutineProtocol
/GossipRound
must be an object with the method Start
and peers
and buffers
private fieldsOptimization: Limit the maximum amount of data (bytes) that a process/node will retransmit in a round.
For more information, check: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwjr5IX4vMPhAhUOlosKHSG6Cg0QFjAAegQIABAC&url=http%3A%2F%2Fwww.csl.mtu.edu%2Fcs6461%2Fwww%2FReading%2FBirman99.pdf&usg=AOvVaw2fZsGjb7hFGcQu1d4_pBSh
type Message struct{
Command: string,
Args: []string,
}
Add test for the following case: receive synchronization message with a message that already exists in the buffer message
if g.peerBuffer.Length() == 0 || g.msgBuffer.Length() == 0{
gossipLen = 0
} else {
// ...
}
Nodes should subscribe to certain events. Each message has an event type. When a node receives a message of the type of event it subscribes to, it will call the associated callback.
Describe the bug
When I restart the protocol, I get the following error:
Gossiper from localhost:34241 can not marshal the gossip message: Post http://localhost:38133/gossip: dial tcp [::1]:38133: connect: connection refused
The protocol from [::1]:38133
was restarted.
How To Reproduce
p.Stop()
p.Start()
bimodal-multicast/pkg/bmmc/bmmc.go
Line 142 in 3723796
p.peerBuffer.AddPeer(
peer.NewPeer(addr, port),
)
b.msgBuffer.AddMessage(...)
Two request messages may appear at the same time. The callbacks will be called twice, once for each message, but the message will be added once in the buffer.
2019/05/01 21:27:53 http: Accept error: accept tcp 127.0.0.1:44821: accept4: too many open files; retrying in 5ms
Check: https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
Gossip Message
Solicitation Message
Synchronization Message
Eventually
in tests, etc.)Fields (unexported):
Functions (exported):
internal
packageAlso, rename gossip
package to gossipserver
What happens if the user gives a peers list that contains peers which don't exist in the lists of the other nodes?
We must inject the gossip round in gossip message
.
Also, we must inject the gossip round in synchronization message
.
When a node receives a synchronization message
, it must check if the gossip round from the gossip message
and the gossip round from the synchronization message
are matching.
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.