Closed jhaack closed 8 years ago
@jhaack @mikeroup @kmonson please review and let me know if I have scoped this out well enough. Please look again!
Why is the topic 'heartbeat/agentid/uuid'? The uuid is added automatically by pubsub.
Ummmm...are you talking about the sender as grabbing the uuid? That is not the uuid that is the vip.identity. The uuid I am talking about is the actual agent installation directory .volttron/agents/uuid/listeneragent-0.1. The vip.identity (depending on which agent is started) isn't unique.
If I am incorrect then I am not sure what you mean about it being added automatically by pubsub.
Okay but what about service-y agents that are started in main? They aren't explicitly installed like other agents.
For the service agenta there will only be one on a specific instance so it will be unique. For any agent that is "installed" i.e. via volttron-ctl there will be a uuid folder name. There may or may not be a unique vip.identity specified in the agent configuration file.
The ultimate goal is to be able to state that at this point in time this agent known as foo is running. If there are multiple foo agents installed there need to be a way to distinguish between each of the installed agents.
Note you can get the agents uuid directly from the environment using os.environ['AGENT_UUID']
What is interesting is I keep waffling about where this should be put. Now I think it should hang off the pubsub system since it will use pubsub as it's mechanism for the heartbeat.
It would use pubsub but is not directly related to its implementation. It also needs to know about rpc and core.
This task should be able to accomplish the following:
See #394 services and core agents that should utilize this by default.