Commit Graph

17 Commits

Author SHA1 Message Date
Christian Schwarz
35dcfc234e 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.
2017-05-20 18:17:08 +02:00
Christian Schwarz
48a4e8033a rpc: close outgoing SSH connection on exit. 2017-05-14 14:11:19 +02:00
Christian Schwarz
74719ad846 rpc: chunk JSON parts of communication + refactoring
JSONDecoder was buffering more of connection data than just the JSON.
=> Unchunker didn't bother and just started unchunking.

While chaining JSONDecoder.Buffered() and the connection using
ChainedReader works, it's still not a clean architecture.

=> Every JSON message is now wrapped in a chunked stream
   (chunked and unchunked)
   => no special-cases
=> Keep ChainedReader, might be useful later on...
2017-05-13 15:33:46 +02:00
Christian Schwarz
feabf1abcd rpc: logging for bytestream listener 2017-05-13 15:25:09 +02:00
Christian Schwarz
c71be910f9 rpc: fix incremental transfer request handling 2017-05-07 11:53:47 +02:00
Christian Schwarz
82beea94d5 rpc: missing response header for InitialTransferRequest 2017-05-06 23:43:55 +02:00
Christian Schwarz
9b871fb7c0 rpc: more detailed errors 2017-05-06 10:58:23 +02:00
Christian Schwarz
f005ce318d Purge model package, not really used anyways. 2017-05-03 17:26:45 +02:00
Christian Schwarz
43f67d2b7c rpc: add FilesystemVersionsRequest 2017-05-03 17:12:15 +02:00
Christian Schwarz
b87829817a rpc: bytestream: listen: filesystems request: reply with header 2017-04-30 23:47:12 +02:00
Christian Schwarz
8bdcdd5ec6 rpc: bytestream: listen: consistent error handling 2017-04-30 23:47:12 +02:00
Christian Schwarz
9fdd1ea909 rpc: fix panic when parsing filesystem response 2017-04-30 23:47:12 +02:00
Christian Schwarz
08370689c8 rpc: implement respondWithError 2017-04-30 23:47:11 +02:00
Christian Schwarz
d9ecfc8eb4 Gofmt megacommit. 2017-04-26 20:29:54 +02:00
Christian Schwarz
4494afe47f Finish implementation of RPC. 2017-04-16 21:38:31 +02:00
Christian Schwarz
c1aed10e8b Further drafting of rpc module.
Also: fix typo in model definitions.
2017-04-15 18:31:14 +02:00
Christian Schwarz
123becbd22 Interface wireframe 2017-04-14 19:26:32 +02:00