Solved

File based FIFO (first in first out)

Posted on 1998-07-15
5
409 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

8 Experts available now in Live!

Get 1:1 Help Now