I currently have a program (winform) that both pulls in data (held in a list) and records/flushes to drive in a batch process(csv or hdf), and also performs analytics on the data in real time, the values of which are stored in memory.
I want to separate these (data handling and analytics) into two operations. My idea is to create one program that handles the real time data and records it but also has events that can then be subscribed to and unsubcribed at will so that the first system always remains on but the second analytical program can be turned on and off (upgraded more regularly).
Problem is the way I understand it, events would need to be declared and subscribed to within the same program so not sure that it would be appropriate. Is there another pattern or design feature that I should be looking at or is there a way to do this using events?
Also making copies/reading from the recorded data set on disk would not work since I need the data in real time without too much lag that would be associated with reading from a the file.
So in summary what I am specifically asking is: Is there a way for one program to access the in memory data structure of another program in real time?