Issue:
Data analyzation, pattern statistics and statistics import process can take hours if we supply enough large input data-set. So, we need a way to show progress percentage to user.
- Main problem is we can't continuously communicate with native module to get progress status
- Right now we get completion status once whole process completes.
Solution
Create a shared file in "Temp" folder. This will be shared by both c++ and node.js code, with this native module can update that file periodically and then node.js can read it periodically.
- JSON object file suits well for this case, it will be well formatted and easy to understand.
- c++ don't have any support for JSON parsing in standard library.
- Alternatively we can use plain text file, native module can write "predefined data keywords" which then will be read by node.js to update progress based on that.
Required Progress variables
1. Process: anlayzing raw data
2. Process: pattern statistics generation
this will read all output files generated by analyzation process and then write all identical pattern data into a unique file belongs to that particular pattern. So, we can measure progress based on how many files has been completed with pattern categorization.
Resources
- Benchmarks for JSON library for c++
- JSON libraries for c++
- cereal JSON library
- Blog on JSON parsing
Issue:
Data analyzation, pattern statistics and statistics import process can take hours if we supply enough large input data-set. So, we need a way to show progress percentage to user.
Solution
Create a shared file in "Temp" folder. This will be shared by both c++ and node.js code, with this native module can update that file periodically and then node.js can read it periodically.
Required Progress variables
1. Process: anlayzing raw data
a) total files before resizing
b) total resized files
a) total files before analyzation
b) total analyzed files
2. Process: pattern statistics generation
this will read all output files generated by analyzation process and then write all identical pattern data into a unique file belongs to that particular pattern. So, we can measure progress based on how many files has been completed with pattern categorization.
a) total files generated by analyzation process
b) total file done with pattern
Resources