-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See bytedance/ps-lite#14 for details. Co-authored-by: Yibo Zhu <[email protected]>
- Loading branch information
Showing
19 changed files
with
2,043 additions
and
2,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* Copyright (c) 2018-2019 Bytedance Inc. | ||
* Author: [email protected] (Yibo Zhu) | ||
*/ | ||
#ifndef PS_LITE_META_H_ | ||
#define PS_LITE_META_H_ | ||
|
||
#include<stdint.h> | ||
|
||
namespace ps { | ||
|
||
struct RawNode { | ||
// the node role | ||
int role; | ||
// node id | ||
int id; | ||
// hostname or ip | ||
char hostname[64]; | ||
// the port this node is binding | ||
int port; | ||
// whether this node is created by failover | ||
bool is_recovery; | ||
// the locally unique id of an customer | ||
int customer_id; | ||
}; | ||
|
||
// system control info | ||
struct RawControl { | ||
int cmd; | ||
int node_size; | ||
int barrier_group; | ||
uint64_t msg_sig; | ||
}; | ||
|
||
// mete information about a message | ||
struct RawMeta { | ||
// message.head | ||
int head; | ||
// message.body | ||
int body_size; | ||
// if set, then it is system control task. otherwise, it is for app | ||
RawControl control; | ||
// true: a request task | ||
// false: the response task to the request task with the same *time* | ||
bool request; | ||
// the unique id of an application | ||
int app_id; | ||
// the timestamp of this message | ||
int timestamp; | ||
// data type of message.data[i] | ||
int data_type_size; | ||
// the locally unique id of an customer | ||
int customer_id; | ||
// whether or not a push message | ||
bool push; | ||
// whether or not it's for SimpleApp | ||
bool simple_app; | ||
// message.data_size | ||
int data_size; | ||
// message.key | ||
uint64_t key; | ||
// message.addr | ||
uint64_t addr; | ||
// the length of the message's value | ||
int val_len; | ||
// the option field | ||
int option; | ||
|
||
// body | ||
// data_type | ||
// node | ||
}; | ||
|
||
} // namespace | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.