-
Notifications
You must be signed in to change notification settings - Fork 0
/
synchronizer.proto
49 lines (40 loc) · 1.13 KB
/
synchronizer.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
syntax = "proto3";
package csce438;
import "google/protobuf/timestamp.proto";
import "coordinator.proto";
// ------------------------------------------------------------
// The coordinator service definition
// These are the different functionalities exposed by service
// ------------------------------------------------------------
//Init and Heartbeat potentially redundant
service SynchService{
// rpc Heartbeat (ServerInfo) returns (Confirmation) {}
// rpc GetServer (ID) returns (ServerInfo) {}
rpc SendFollowingList(UserInfo) returns (Confirmation) {}
rpc SendTimeline(TimeInfo) returns (Confirmation) {}
rpc ResynchServer(ServerInfo) returns (Confirmation) {}
// ZooKeeper API here
}
//server info message definition
// message ServerInfo{
// int32 serverID = 1;
// string hostname = 2;
// string port = 3;
// string type = 4;
// int32 cluster = 5;
// }
// //confirmation message definition
// message Confirmation{
// bool status = 1;
// }
// //id message definition
// message ID{
// int32 id = 1;
// }
message UserInfo{
string following = 1;
}
message TimeInfo{
string username = 1;
string timeline = 2;
}