msharee9 commented on issue #734: MINIFICPP-1157 Implement lightweight C2 
heartbeat.
URL: https://github.com/apache/nifi-minifi-cpp/pull/734#issuecomment-585365334
 
 
   > This seems to be a bit complicated and introduce some code duplication.
   > 
   > Why can't we simply extend agentinformation (for eg. with a ctor 
parameter) to include/exclude manifest?
   
   To give some background first:
   The existing minifi property nifi.c2.root.classes has "AgentInformation" as 
one of the root classes. And this class has all the information including 
(agent status, agent id, class and the manifest).
   For backward compatibility we want to keep that class as it is.
   
   Going forward, you have a choice to specify if you need a heartbeat with or 
without manifest.
   AgentInformation = (With manifest as it was before this change)
   AgentInformationWithoutManifest = (Everything as before except manifest)
   
   Because of the above reason (configurable class name), we cannot introduce a 
parameter to include/exclude manifest unless we modify the class loader code 
   ```
   template <class T>
   std::shared_ptr<T> ClassLoader::instantiate(const std::string &class_name, 
const std::string &name);
   ```
   with some if/else and I don't think that is a good choice.
   
   I agree that there is some code duplication and I will make some improvement 
there.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to