Commit Graph

13 Commits

Author SHA1 Message Date
Gaius 46deb4fccf
Use dag to represent peer scheduling topology (#1473)
* feat: use dag to represent peer scheduling topology

Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:37 +08:00
Gaius 8cf344992f
feat: if peer back-to-source failed, return source metadata. (#1444)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:34 +08:00
Gaius 64f5e9357b
refactor: scheduler announce task (#1407)
* feat: scheduler announce normal task

Signed-off-by: Gaius <gaius.qi@gmail.com>

* feat: remove cid

Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:30 +08:00
Gaius 3fa7c7be75
feat: scheduler handles seed peer failed (#1325)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:21 +08:00
Gaius 2a0314e45b
refactor: scheduler grpc (#1310)
* refactor: scheduler grpc

Signed-off-by: Gaius <gaius.qi@gmail.com>

* feat: generate protoc

Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:20 +08:00
Gaius 9c1e05983a
feat: scheduler add seed peer (#1298)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:18 +08:00
Gaius ca8961ed09
refactor: scheduler task SizeScope (#1287)
* refactor: scheduler task SizeScope

Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:17 +08:00
Eryu Guan 65fa8a1680
feat: define and implement new dfdaemon APIs to make dragonfly2 work as a distributed cache (#1227)
Introduce a new dfcache command which uses dfcache SDK interface to
interactive with dfdaemon and operate on P2P cache system.

For example:
- add a file into cache system
  dfcache import --cid sha256:xxxxxx --tag testtag /path/to/file

- check if a file exists in cache system
  dfcache stat --cid testid --local  # only check local cache
  dfcache stat --cid testid          # check other peers as well

- export/download a file from cache system
  dfcache export --cid testid -O /path/to/output

- delete a file from cache system, both local cache and P2P network
  dfcache delete -i testid -t testtag

Signed-off-by: Gaius <gaius.qi@gmail.com>
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>

Co-authored-by: Jim Ma <majinjing3@gmail.com>
Co-authored-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:13 +08:00
Gaius f5d372bab4
feat: if the number of failed peers in the task is greater than FailedPeerCountLimit, then scheduler notifies running peers of failure (#1211)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:33:10 +08:00
Gaius 557425249c
feat: optimize peer range (#1095)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:32:59 +08:00
Gaius 65ad608d58
feat: If cdn only updates IP, set cdn peers state to PeerStateLeave (#1038)
* feat: If cdn only updates IP, set cdn peers state to PeerStateLeave

Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:32:54 +08:00
Gaius 61310b55d5
feat: when cdn peer is failed, peer should be back-to-source (#1005)
* feat: schdule peer with cdn failed

Signed-off-by: Gaius <gaius.qi@gmail.com>

* feat: when cdn peer is failed, peer back-to-source

Signed-off-by: Gaius <gaius.qi@gmail.com>

* test: callback

Signed-off-by: Gaius <gaius.qi@gmail.com>

* feat: change scheduler default config

Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:32:53 +08:00
Gaius 97c1eb65e7
Refactor scheduler service (#958)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2023-06-28 17:32:50 +08:00