Solved

File based FIFO (first in first out)

Posted on 1998-07-15
5
413 Views
Last Modified: 2010-04-04
How can i realize a fast file-based fifo, it means i read the oldest data i wrote in and delete it after reading, new data is written in on the other side of the file structure, new data-- data--data--oldest data
0
Comment
Question by:q064828
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1357930
Look at freeware QDB of

http://home.sprynet.com/sprynet/rrm/index.html

It's purpose is of using db without DBE.

Actually it is just a file of records, but with most capabilities of DB! Look at it! I think you can use this!

Zif.


0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357931
hi q064828,

forgot to mention something. Because it acts like a DB... you can easely add and remove the records fifo. Besides, the beauty of this is that the components are already written. And they are very well written and they are freeware too! What else do you want? Your projects jumps already to the last fase!

Zif.
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1357932
If you don't want to go for a DB solution, you can also use the round-robin method, where you allocate a file with f.ex. 100 records and then has 2 pointers, PointerToNextRecordToRead and PointerToNextRecordToWrite (or perhaps with shorter names :-)
When PTNRTW reaches End-Of-File, you just continue at the beginnign of the file.
Just make sure that there is enough room for all records, so that you are not overwriting records you haven't read yet.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357933
Hi Blackman, the beauty of QDB is that is ISN'T a DB it's in fact just a file with the capabilities of a DB. Zif. Look for yourself.
0
 
LVL 7

Expert Comment

by:BlackMan
ID: 1357934
Ok, Zif, I might take a look at it sometime (I think IU've allready downloaded it..)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now