-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.thrift
More file actions
executable file
·34 lines (22 loc) · 1.18 KB
/
server.thrift
File metadata and controls
executable file
·34 lines (22 loc) · 1.18 KB
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
namespace java project2 // defines the namespace
typedef i32 int //typedefs to get convenient names for your types
service FileService {
//Interface for server from client
bool clientWrite(1:string Filename 2:string Contents), //
string clientRead(1:string Filename), //defines a method
//Interface for Coordinator
//RPC for making a server as coordinator
bool makeCoordinator(1:string serverList),
//update coordinator info to all nodes
bool setCoordinatorInfo(1:string coordinator),
//Server->Coordinator request
//write
bool serverWriteReq(1:string Filename, 2:string Contents),
string serverReadReq(1:string Filename),
//Version numbers:
//Enquire version number(get)
int getVersionNumber(1:string Filename),
//Interface for server from coordinator
bool serverWrite(1:string Filename 2:string Contents 3:int Version), //
string serverRead(1:string Filename), //defines a method
}