Implement push support.

Pushing is achieved by inverting the roles on the established
connection, i.e. the client tells the server what data it should pull
from the client (PullMeRequest).

Role inversion is achieved by moving the server loop to the serverLoop
function of ByteStreamRPC, which can be called from both the Listen()
function (server-side) and the PullMeRequest() client-side function.

A donwside of this PullMe approach is that the replication policies
become part of the rpc, because the puller must follow the policy.
This commit is contained in:
Christian Schwarz
2017-05-16 16:57:24 +02:00
parent c7161cf8e6
commit 35dcfc234e
6 changed files with 200 additions and 29 deletions
+4 -3
View File
@@ -9,9 +9,10 @@ pools:
pushs:
- to: offsite_backups
datasets:
- tank/var/db
- tank/usr/home
filter: {
"tank/var/db*":"ok",
"tank/usr/home*":"ok"
}
pulls:
- from: offsite_backups