c# - Persistant Queue<> or List<> even when program shuts down or restarts -
i'm trying make application restart/crash/endtask persistant queue (or list..). ie: need add things when application runs , remove things @ later times. between these 2 occations application can have restarted multiple times (or crashed, or been end-tasked know).
my first thought create mylist.txt file store data line line , add lines end when need , take , remove first line when i'm done it.
problem there can many thousands of lines in text file after while , there no way remove first line in without reading , rewriting entire file.
so there ways of accomplishing this, given continously reading , writing entire file not option?
edit 1: looking @ sqlite, prefer not add more dependencies or .dll's can't ilmerged if possible.
edit 2: application can't depend on external servers keep track of things it.
edit 3: suggestion of ilmerge compatible local database acceptable solution.
the correct solution persistent queue in software use persistent queue package.
we call these message queue libraries.
microsoft windows has 1 built in called msmq. recommend using rabbitmq, or, alternatively try use ayende's rhino queues if want have in-proc solution.
Comments
Post a Comment