Process Connection State Information
The idea is to provide a single line description of the internal status of each process including connectivity information which can then be queried and displayed. The process's connectivity information refers to it's connections to various other servers and components. Each process updates a global connection info map implemented in base/connection
The connection info map is keyed by a tuple <ConnectionType, std::string> where the ConnectionType is DISCOVERY, COLLECTOR, XMPP, etc. and the std::string is user specified.
For example, for discovery client code, the string can be the published or subscribed service name, for XMPP it can be the CN IP, etc.
The connection info map value consists of the ConnectionInfo of the particular entry, an optional string message describing relevant information about the status of the connection info, and an endpoint object representing the server.
A sample connection info map might be:
Key: <DISCOVERY:
Key:<DISCOVERY:
Key:<COLLECTOR:""> Info: UP, 10.84.13.23. ""
Key:<XMPP, 10.84.13.23> Info: UP, 10.84.13.23 "CN1"
Following are the .sandesh definitions:
struct ConnectionInfo {
1: string type
2: string name
3: optional list<string> server_addrs
4: string status
5: optional string description
}
// Sent by the process
struct ProcessStatus {
1: string module_id
2: string instance_id
3: string state
4: optional list<Connection
5: optional string description
}
The library will periodically provide the existing connection info map to the process via a register callback function and the daemon code will update the overall process state, and an optional description. The library with then send both the connection info list and the state as part of the node UVE.
For vizd/collector, following is the sandesh IDL definition to send the connection info and status as part of the ObjectCollector
struct NodeStatus {
1: string name (key="ObjectCol
2: optional bool deleted
3: optional string status
// Sent by process
4: optional list<process_
// Sent by node manager
5: optional list<process_
6: optional string description
}
uve sandesh NodeStatusUVE {
1: NodeStatus data
}
Blueprint information
- Status:
- Complete
- Approver:
- Raj Reddy
- Priority:
- Undefined
- Drafter:
- Megh Bhatt
- Direction:
- Approved
- Assignee:
- Megh Bhatt
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- Megh Bhatt
- Completed by
- Megh Bhatt