Commit Graph

383 Commits

Author SHA1 Message Date
9e6db79860
regenerate all proto (#1440)
* regenerate all proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* regenerate from proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* regenerate from proto

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-30 21:58:32 +01:00
7b385bf163
minimize allocations in logger and tunnel code (#1323)
* logs alloc

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* tunnel allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* try to fix tunnel

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* cache cipher for send

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-11 17:55:39 +00:00
117f56ebf7
prune util/log and user logger (#1237)
* prune util/log and user logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* plaintext logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add newline

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 13:45:20 +00:00
tpam28
449bcb46fe
New backoff (#1153)
* new backoff function

* use backoff from util/backoff

* remove reset atemts

* change comment

* fmt
2020-02-02 20:32:55 +00:00
f23638c036 fix import paths for v2 release
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-01-30 14:44:40 +03:00
Asim Aslam
ae08e9c106 check if event is nil 2020-01-23 12:41:22 +00:00
Asim Aslam
9f7d374691 avoid connecting to self 2020-01-21 12:36:05 +00:00
Asim Aslam
105596a0e5 use mucp server 2020-01-18 20:48:08 +00:00
Milos Gajdos
891af703be
Update route metric when receiving Sync routes 2020-01-17 18:24:36 +00:00
Milos Gajdos
bf9f319cdf
Update route metric before sending the Sync message 2020-01-17 15:38:28 +00:00
Milos Gajdos
624f1c1980
Continue processing Sync if no routes were returned from router Query 2020-01-17 12:58:13 +00:00
Milos Gajdos
607a226e34
Updated debug logs to make them less verbose 2020-01-17 12:14:56 +00:00
Milos Gajdos
7f9b3b5556
Remove Solicitation from the network
Instead, when a new peer is discovered it is sent a sync message i.e. we
do the full sync when discovering peers
2020-01-16 19:43:10 +00:00
Milos Gajdos
8fcfbc0d20
Strip unnecessary continue statement 2020-01-16 17:33:53 +00:00
Milos Gajdos
472186c1be
Code consistency. Small bug fix. 2020-01-16 17:04:04 +00:00
Milos Gajdos
60c05bd899
Find the best routes in the routes we would advertise based on Strategy 2020-01-16 16:53:39 +00:00
Milos Gajdos
793e6013e5
Advertise routes with configured strategy. Simplify Sync apply logic 2020-01-16 16:42:23 +00:00
Milos Gajdos
eda8b00f84
Send only best routes via Sync. Only apply best routes. 2020-01-16 16:08:49 +00:00
Asim Aslam
689ae7cfc7 Storing tunnel.Session rather than transport.Client 2020-01-16 00:28:58 +00:00
Asim Aslam
19dbd77402 fix net masking in listed routes 2020-01-16 00:12:38 +00:00
Asim Aslam
33a9b3bc17 mask the route before sending 2020-01-15 23:06:58 +00:00
Asim Aslam
6562154573 Fix the next panic 2020-01-15 21:38:37 +00:00
Asim Aslam
b3e3dac975 Merge branch 'master' of ssh://github.com/micro/go-micro 2020-01-15 21:02:58 +00:00
Asim Aslam
f20e4daa60 fix rand panic 2020-01-15 21:02:53 +00:00
Milos Gajdos
36928b716c
Fixed bug:m network.proto backwards compatibility unmarshal 2020-01-15 19:45:43 +00:00
Asim Aslam
7c7b0ced5f
Merge pull request #1104 from milosgajdos83/network-hackery
[WIP] Network hackery
2020-01-14 20:28:32 +00:00
Milos Gajdos
c67ef7e017
Bug fix: skip sending sync message if the peer is not in our graph 2020-01-14 19:37:50 +00:00
Milos Gajdos
dcd925f1e5
Code cleanup; Indentation. 2020-01-14 18:48:42 +00:00
Milos Gajdos
0ea56a5ffe
Fixed tests 2020-01-14 18:22:58 +00:00
Milos Gajdos
821fda41ae
Added Status method to network.Node fixed random segfaults. 2020-01-14 18:12:36 +00:00
Asim Aslam
b699d969e4
if the address is produced by a default route don't hash it (#1108) 2020-01-14 11:20:13 +00:00
Milos Gajdos
994d371ff1
Removed redundant comments. Add proper PruneStalePeers test. 2020-01-14 10:49:34 +00:00
Milos Gajdos
a91dad04ee
Increment node error count and prune when Max limit is hit 2020-01-13 22:22:12 +00:00
Milos Gajdos
b4261e8cf9
Updated log and comments 2020-01-13 20:14:30 +00:00
Milos Gajdos
770c7686ba
Fix nasty bug when graph action may not have been executed in some
branches
2020-01-13 20:14:30 +00:00
Milos Gajdos
11904e1137
Regular sync with network every 5 minutes. Apply routes before peering. 2020-01-13 20:14:29 +00:00
Milos Gajdos
1e009e52dd
Avoid having the same log statements in initNodes and resolveNodes 2020-01-13 20:14:29 +00:00
Milos Gajdos
bf42c028fb
Added sync message. Refactored connect flow. Adverts are gossipped.
This commit adds a Sync message which is sent as a reply to Connect
message. This should in theory speed up convergence of a (re)connecting
node.

We respond to Sync message by sending a peer message back to the peer
origin of the Sync message. We consequently update our routing table and
peer graph with the data sent in via Sync message.

We now gossip advertse to up to 3 randomly selected peers instead of
sending a multicast message to the network.

Equally, Solicitation i.e. full table adverts are gossipped to a
randomly selected peer. If that fails we send a multicast message to the
network.
2020-01-13 20:14:29 +00:00
Milos Gajdos
0a4bd02503
Add RefreshSync method for Sync bookkeeping 2020-01-13 20:14:29 +00:00
Milos Gajdos
63edfaa852
Added Sync message
Sync message will be sent between peers when a new node connects/joins
the network
2020-01-13 20:14:29 +00:00
Milos Gajdos
802cc8239a
Send solicit message properly. Updated comments. 2020-01-13 20:14:29 +00:00
Milos Gajdos
59fccb82ec Updated comments. Tiny cleanup changes. (#1093) 2020-01-08 13:18:11 +00:00
Asim Aslam
b0b6b8fce2 final updates 2019-12-13 15:27:47 +00:00
Asim Aslam
f6b4a9da1c strip some code 2019-12-12 23:20:31 +00:00
Asim Aslam
74c5102e41 strip a couple things 2019-12-12 21:49:39 +00:00
Asim Aslam
7bd50cd251 fix more broken cruft 2019-12-12 17:10:32 +00:00
Asim Aslam
df728aaddd remove go routines from tunnel, fire network messages in go routines 2019-12-12 13:34:08 +00:00
Asim Aslam
e260cc4a24 save cruft 2019-12-12 12:27:46 +00:00
Asim Aslam
6e28e7a86f Save current state of the world 2019-12-11 14:37:03 +00:00
Asim Aslam
e966944ae5 sort resolved node list in network by lowest priority 2019-12-10 17:57:04 +00:00