Excuse the title of this post, but I can't really think of a more creative title.
I am calling a 3rd party web service where the authors are ordering transaction results from most recent. The total transaction count is greater than 100 000. To make matters more interesting the web service sends down complex objects representing each transaction, so if I ask for all 100 000 at once, a timeout will occur. So calls to this web service needs to be batched to return only 1000 records at once. This means 100 individual calls to this web service.
So far all is good, except the transactions need to be processed from oldest to newest, so I need a place to temporarily hold JUST the IDs of these transactions, so that later I can recall the IDs in the correct order (oldest to newest) after I have sorted them.
What I am missing in this solution is an RDBMS, I am thinking of using a text file to store the values.
Excuse the long intro, if you're still awake here are the considerations:
(1)
- If I just store the values in a text file, I'll end up with over 100 000 lines in the text file in the wrong order, meaning I have to implement a way to read the file from bottom to top
- I am not sure, but there might be append to beginning of an existing text file without any performance penalties, in this way once the file is created, I could use built in .net to read the file from top -> down.
- I could hook up a text odbc driver and perhaps use some SQL order by clause, but I've never done this before, and I don't want to add any more deployment steps to my app.
- Perhaps using a text file is not the way to go, maybe there is a better solution out there for this problem I am not aware of.
This is an architecture / logistics question, any assistance would be appreciated, thanks