@Aki,
What about using the text file to accomplish the task anyway....
On the premise of ease of using text files, I would simply take a snapshot of the first file A, in the specific period, then on the 24hr history file B, I append it with the changing contents of file.
A way to implement this is to ensure the automatic updater working on file A puts special characters in the last 10mins, so that I can easily use code to decipher the last 10 inputs. Or it shud make use of a time stamp on all event logs, so that text searching can check for an accurate time stamp like
2/29/2012 12:37 PM :
<data>
2/29/2012 12:36 PM
: <data>
2/29/2012 12:35 PM
: <data>
then select all data within time occuring in a 10min inteval.....
My thoughts....
@Aki,
I also would not recommend any flat files for the storage of data in
your system. Consider seriously using relational or even object
oriented dbs (noSQL engines) which are probably ideal for you case. If
you settle on RDBMs, you can use Triggers [
http://db.apache.org/derby/docs/10.1/ref/rrefsqlj43125.html ] for
copying old records to Historical tables for future referrences while
INSERTing new ones. This saves you a lot or time and clever code
trying to determine if things have changed in your data sets, etc.
If you have to use plain text files for storage then you can use
revision control systems like git or svn / mercurial / bitkeeper /
monotone / perforce etc. On top of that, you might employ systems like
SWIG [ http://www.swig.org/ ] that let you hook onto their C / C++
APIs and do things like diffs to do data comparison using your
preffered language(s) which is C-sharp. This may or may not be too
neat.
Martin.
_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke