Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

file as temporary data storage  RSS feed

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any reason that you can't just all the records and then delete them at the end? It would likely speed up your application too since there would be a lower disk I/O overhead.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just curious, how do you delete a record from a file?

Any chance you can use JMS? Most queuing products support persistent queues that will hold the data until somebody pulls it off the queue. IBM calls it "assured delivery" which is quite nice. You're really doing exactly the same kind of "store and forward" the hard way. I've done just what you describe in disconnected situations, like somebody using a lap-top off the network.
[ September 20, 2005: Message edited by: Stan James ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!