Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Not excatly sure what to call what I am asking for :)

 

I have a program that needs to save a set of strings and when asked requested send those strings to another program over a TCP connection. I need to store those strings such that if the computer is turned off it does not loose any of the strings it has collected since the last call to send (ie. it just picks up from where it was and starts collecting more strings). However, I do not want to duplicate a string once it is already successfully sent and received.

 

So - what I need is a way to read and write to a file in the same way I would a cue. Again - the reason for the file is to save the data if the machine is turned or more importantly looses power abruptly.

  • *Experts*
Posted

Is this for a personal computer, or something on a network? Can you take advantage of Microsoft Message Queuing? It's quite handy is made to store things asyncronously and keep track of things even if machines go out.

 

I'm not sure what you're doing with the strings so I'm not sure if this is ideal...

 

If you want to write to a file, why not just append, with some kind of delimiter so that on machine failure, you could read the file to see where you left off (looking at each previous chunk by delimiter) - or a database for that matter?

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...