phrocker commented on issue #515: MINIFICPP-646 - Re-evaluate passing 
attributes. Potentially deprecate…
URL: https://github.com/apache/nifi-minifi-cpp/pull/515#issuecomment-505381602
 
 
   @arpadboda Value needn't be null terminated, especially given the sink and 
source where nanofi may exist; however, I don't actually have a strong opinion 
on that for this PR -- especially if @bakaid and @msharee9 agree with that 
approach. NiFi is not the penultimate input/output of NanoFi code -- but as we 
evolve we can live in the confines of that decision for attributes.
   
   Think of the input/output of nanofi edge controller units as being site to 
site, kafka, mqtt, pipe, and file ( and maybe redis eventually ). In any of 
these cases attributes can be of an intermediate form. That means that 
attributes could carry binary data ( hence why they were initially not typed 
and instead a bag of keys and values  -- I think this is how redis stores them 
internally ). I think you can draw a line in the sand that attributes are null 
terminated and require that another mechanism be built. This may alleviate your 
concerns about having non textual data in the attributes -- so then we can 
simply create a follow on to store intermediate data that are attributes of the 
data that are binary. 
   
   The initial API facilitated C strings that were null terminated and 
arbitrary binary data. If you feel separating these concerns is important we 
can make a follow on ticket for the release that references 646. I can 
certainly see the value in isolating those APIs.
   
   I don't have a super strong opinion on how you structure this "struct" -- as 
long as we have a way to ultimately carry attributes that are not null 
terminated. if you think it helps to add API calls for something like 
"add_binary_attribute", then I'm okay with that.
   
   I don't really foresee a great deal of cost with ownership as you present 
it. Since we own that data structure and if it were opaque as @bakaid suggests, 
then we can realloc more safely. 
   
   All code that uses the variants of the API defined in the last release 
should compile in this minor release. How everything is represented internally 
is up to you. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to