Left Up Right RACE - Modifications and Extensions to ACE from Ravensburg

RACE-Replacements and Extensions for ACE

This Classes are for logging from so called Dumpables in a Logfile.

RACE_Message_Blocks

The main reason for the RACE_Messageblocks is Subclassing

Chaining

RACE_Data_Blocks can be chained like in ACE.
Since the unit to be handled atomarly by the OS is a memory page (i.e. 4096 bytes), it makes little sence to have greater blocks. Here is an other idea.

RACE_Message_Queue

The Queue is controlled via a strategy class.
Thus, there a strategies thinkable: Caution: I found the length() in an ACE_Message_Block misleading. Thus, a RACE_Message_Block has the operations:
length()
which is the actual length from begin to the Write-pointer in the current fragment Datablock
remaining()
it is the difference of the read- and writepointer in the current fragment RACE_Datablock
total_length()
The sum of all length of all RACE_Data_Blocks in the RACE_Message_Block

The Accumulator

This accumulates the content of Dumpables to the Blocksize of a Filesystem, for example 4096 byte-Blocks.
The Coping is avoided with the use of the writev(2)-Systemcall.
After the Writing, a callback method InformOffset is called.
A Subclass of the Dumpable can overwrite this and thus the Sender of the Dumpable can do the bookkeeping.
Computerscience and Networkassocation Ravensburg e.V Rudolf Weber and friends