forked from dmlc/ps-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeta.proto
60 lines (57 loc) · 1.63 KB
/
meta.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
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* Copyright (c) 2015 by Contributors
*/
syntax = "proto2";
package ps;
option optimize_for = LITE_RUNTIME;
message PBNode {
// the node role
required int32 role = 1;
// node id
optional int32 id = 2;
// hostname or ip
optional string hostname = 3;
// the port this node is binding
optional int32 port = 4;
// whether this node is created by failover
optional bool is_recovery = 5;
// the locally unique id of an customer
optional int32 customer_id = 10;
}
// system control info
message PBControl {
required int32 cmd = 1;
repeated PBNode node = 2;
optional int32 barrier_group = 3;
optional uint64 msg_sig = 4;
}
// mete information about a message
message PBMeta {
// message.head
optional int32 head = 1;
// message.body
optional bytes body = 2;
// if set, then it is system control task. otherwise, it is for app
optional PBControl control = 3;
// true: a request task
// false: the response task to the request task with the same *time*
optional bool request = 4 [default = false];
// the unique id of an application
optional int32 app_id = 7;
// the timestamp of this message
optional int32 timestamp = 8;
// data type of message.data[i]
repeated int32 data_type = 9 [packed=true];
// the locally unique id of an customer
optional int32 customer_id = 10;
// whether or not a push message
optional bool push = 5;
// whether or not a pull message
optional bool pull = 12;
// whether or not it's for SimpleApp
optional bool simple_app = 6 [default = false];
// message.data_size
optional int32 data_size = 11;
// priority
optional int32 priority = 13 [default = 0];
}