File as temporary data storage
Hi all,
If my application can not establish connection with the server it is storing 8000 records in files.After connection with the server resumes it sends those records to server one by one and simultaneously deletes those records from the file.
So if i use ObjectSerialization then I will not be able to delete a record from the file. Should I go with XML(can I delete a record from a xml?) or is there any other suggestion?
With regards, Ajse
Nothing complicated works...
Serailzation you say..., then I assume that you are handling these files
of records as serializable objects (I think I have answered this before). I
also assume that you are in control of the code on the server side and that
it is vitally important that you don't delete a local record that hasn't been
transferred properly and that you cannot update a record that is
scheduled for transfer.
My suggestion:
(there may well be obstacles in your scenario that prohibits this method)
Don't delete while transferring, let the server respond to the transfer with a
list of references for all the transferred records after the load has completed.
This response could be a short one if all was transferred and loaded ok.
Then do the local deletion.