Tracking File and Failures
2 posters
OruxMaps :: ENGLISH :: IMPROVEMENTS
Page 1 of 1
Tracking File and Failures
Note: it is hard to tell exactally what is going on, soo i am just guessing.
When my device fails , or crashes, or I have to reboot it, or hard stop it, for whatever reason that might exists.
when writing to a tracking file at the time, the tracking file can become corrupt, deleting it again fixes that.
is it possible to open a large file to write to, then only write inside of this file, instead of expanding the file as data arrives?
This has been done before with other constant writes, to keep file corruption from occuring, which can mess with other files around it.
the method usually used
01 02
then when new things come in the file itself is expanded
01 02 03 04 05
instead open up a big empty file
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
then filling it by writes to that file, and not ever expanding it.
01 02 03 04 05 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
I donno, but when other programs have done this, it takes a long time to do the First write of the empty file, but after that the file space used never changes, and corruption never occurs, to the file or file system. they use this method before for some audio recording , video files, gps tracking, and database writing. when the machine is stopped or fails or crashes, the file is still there, the rest of the file and file system are still stable.
i am not a programmer. i am just wondering if something like that can be done in android, and if it could keep everything perfect when things dont go as planned.
trying to keep any of these small computers from doing something stupid , in the middle of a write operation, from causing more problems than it needs to.
another possible option is write only to RAM, then block write in big chunks to disk, so writing occurs very fast and only one time in many minutes.
When my device fails , or crashes, or I have to reboot it, or hard stop it, for whatever reason that might exists.
when writing to a tracking file at the time, the tracking file can become corrupt, deleting it again fixes that.
is it possible to open a large file to write to, then only write inside of this file, instead of expanding the file as data arrives?
This has been done before with other constant writes, to keep file corruption from occuring, which can mess with other files around it.
the method usually used
01 02
then when new things come in the file itself is expanded
01 02 03 04 05
instead open up a big empty file
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
then filling it by writes to that file, and not ever expanding it.
01 02 03 04 05 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
I donno, but when other programs have done this, it takes a long time to do the First write of the empty file, but after that the file space used never changes, and corruption never occurs, to the file or file system. they use this method before for some audio recording , video files, gps tracking, and database writing. when the machine is stopped or fails or crashes, the file is still there, the rest of the file and file system are still stable.
i am not a programmer. i am just wondering if something like that can be done in android, and if it could keep everything perfect when things dont go as planned.
trying to keep any of these small computers from doing something stupid , in the middle of a write operation, from causing more problems than it needs to.
another possible option is write only to RAM, then block write in big chunks to disk, so writing occurs very fast and only one time in many minutes.
Psycogeek- Cantidad de envíos : 53
Fecha de inscripción : 2011-04-14
Re: Tracking File and Failures
Psycogeek wrote:
another possible option is write only to RAM, then block write in big chunks to disk, so writing occurs very fast and only one time in many minutes.
That is how normally linux works (android runs on linux).
When disaster strikes, and the data have not been committed to the disc, may result in data corruption.
However, it is not so simple, only databases which guarantee the atomicity of transactions are almost free of such problems.
orux
orux- Cantidad de envíos : 3946
Fecha de inscripción : 2009-07-06
Similar topics
» Live Tracking
» file handler for map file endings
» Livetracking
» Tracking.(gpsgate.com)
» Live tracking
» file handler for map file endings
» Livetracking
» Tracking.(gpsgate.com)
» Live tracking
OruxMaps :: ENGLISH :: IMPROVEMENTS
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum