Matthias Radestock
9b9d8a03aa
refactor: make Peer.Connections() return a set instead of a slice
...
This is more flexible since it allows callers to perform efficient
lookups on the result.
2015-04-06 13:57:13 +01:00
Matthias Radestock
95c1e226f0
use routes based on tcp overlay connectivity for gossip
...
i.e. include asymmetric and non-established connections
This is TRTTD since gossip flows over the tcp overlay.
2015-04-04 21:56:30 +01:00
Matthias Radestock
7166d151aa
make route calculcation more efficient and properly async
...
Instead of following the usual actor pattern, we use a 1-place channel
with a non-blocking send. Essentially, if there is already a pending
recalculation request queued up, there is no point enqueuing another
one.
2015-04-03 18:12:03 +01:00
Matthias Radestock
5648f87717
oops
...
broke this in 45740b1419
2015-04-02 13:03:42 +01:00
David Wragg
b00be096f7
Fix returns when iterating over Connections()
...
d5eb76f32 replaced (*Peer)ForEachConnection into (*Peer)Connections(),
and consequently converted some nested functions into for loops. But
the "return" statements in those nested functions were left as-was,
and so exited the outer function rather than moving on to the next
iteration.
Fixes #497
2015-03-29 19:10:44 +01:00
David Wragg
a670272a37
Remove name parameter from (*Peers)ForEach consumer function
...
It's part of the Peer anyway.
2015-03-27 18:05:00 +00:00
Matthias Radestock
45740b1419
refactor: replace buf.WriteString(fmt.S*(...)) with fmt.F*(&buf,...)
...
shorter and more efficient
2015-03-26 14:20:28 +00:00
Matthias Radestock
f0731f5d52
convert Routes actor to use closures for methods
2015-03-25 05:14:17 +00:00
Matthias Radestock
d5eb76f32e
replace Peer.ForEachConnection with Peer.Connections
...
The former is prone to triggering deadlocks since the lock is held on
the peer during the iteration.
2015-03-17 16:24:19 +00:00
Matthias Radestock
1ceb041bc5
exclude non-established connections from broadcast routing
...
We already excluded such connections from unicast routing.
Fixes #452 .
2015-03-11 13:26:40 +00:00
Matthias Radestock
48c8f9ea01
refactor: separate object creation from activation
2015-01-19 13:23:25 +00:00
Matthias Radestock
b3be24248e
refactor: narrow dependencies of Routes
...
it doesn't need to know about the Router, just Ourself and Peers.
2014-12-24 19:40:18 +00:00
Matthias Radestock
e8f836ad85
refactor: rename 'Topology' to 'Routes'
...
Since that is what it is. By contrast, when the docs talk about
topology they actually refer to the peer connectivity graph.
2014-12-24 19:12:01 +00:00