Append-only
   HOME

TheInfoList



OR:

Append-only is a property of
computer data storage Computer data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processing unit (CPU) of a compute ...
such that new data can be appended to the storage, but where existing data is immutable.


Access control

Many file systems'
Access Control Lists In computer security, an access-control list (ACL) is a list of File-system permissions, permissions associated with a system resource (object). An ACL specifies which User (computing), users or Process (computing), system processes are granted acc ...
implement an "append-only" permission: *
chattr is the command in Linux that allows a user to set certain attributes of a file. is the command that displays the attributes of a file. Most BSD-like systems, including macOS, have always had an analogous command to set the attributes, but no ...
in Linux can be used to set the append-only flag to files and directories. This corresponds to the flag in . *
NTFS New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred fil ...
ACL has a control for "Create Folders / Append Data", but it does not seem to keep data immutable. Many cloud storage providers provide the ability to limit access as append-only. This feature is especially important to mitigate the risk of
data loss Data loss is an error condition in information systems in which information is destroyed by failures (like failed spindle motors or head crashes on hard drives) or neglect (like mishandling, careless handling or storage under unsuitable conditions) ...
for backup policies in the event that the computer being backed-up becomes infected with ransomware capable of deleting or encrypting the computer's backups.


Data structures

Many
data structures In computer science, a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, a ...
and
databases In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
implement immutable objects, effectively making their data structures append-only. Implementing an append-only data structure has many benefits, such as ensuring data
consistency In classical deductive logic, a consistent theory is one that does not lead to a logical contradiction. The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent ...
, improving performance, and permitting rollbacks. The prototypical append-only data structure is the log file. Log-structured data structures found in
Log-structured file system A log-structured filesystem is a file system in which data and metadata are written sequentially to a circular buffer, called a log. The design was first proposed in 1988 by John K. Ousterhout and Fred Douglis and first implemented in 1992 by ...
s and databases work in a similar way: every change (transaction) that happens to the data is logged by the program, and on retrieval the program must combine the pieces of data found in this log file. Blockchains add
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adver ...
to the logs so that every transaction is verifiable. Append-only data structures may also be mandated by the hardware or software environment: * All objects are immutable in
purely functional programming In computer science, purely functional programming usually designates a programming paradigm—a style of building the structure and elements of computer programs—that treats all computation as the evaluation of function (mathematics), mathemati ...
languages, where every function is pure and global states do not exist. *
Flash storage Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both use ...
cells can only be written to once before erasing. Erasing on a flash drive works on the level of pages with cover many cells at once, so each page is treated as an append-only set of cells until it fills up. * Hard drives that use
shingled magnetic recording Shingled magnetic recording (SMR) is a magnetic storage data recording technology used in hard disk drives (HDDs) to increase storage density and overall per-drive storage capacity. Conventional hard disk drives record data by writing non-overl ...
cannot be written to randomly because writing on a track would clobber a neighboring, usually later, track. As a result, each "zone" on the drive is append-only. Append-only data structures grow over time, with more and more space dedicated to "stale" data found only in the history and more time wasted on parsing these data. A number of append-only systems implement ''rewriting'' (copying
garbage collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclabl ...
), so that a new structure is created only containing the current version and optionally a few older ones.


See also

*
Access control list In computer security, an access-control list (ACL) is a list of permissions associated with a system resource (object). An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on gi ...
* Cloud storage *
Comparison of file hosting services This is a comparison of file hosting services which are currently active. File hosting services are a particular kind of online file storage; however, various products that are designed for online file storage may not have features or character ...
* Data structure *
Purely-functional data structure In computer science, a purely functional data structure is a data structure that can be implemented in a purely functional language. The main difference between an arbitrary data structure and a purely functional one is that the latter is (strong ...
*
Log-structured merge-tree In computer science, the log-structured merge-tree (also known as LSM tree, or LSMT) is a data structure with performance characteristics that make it attractive for providing indexed access to files with high insert volume, such as transactio ...
*
Certificate Transparency Certificate Transparency (CT) is an Internet security standard for monitoring and auditing the issuance of digital certificates. The standard creates a system of public logs that seek to eventually record all certificates issued by publicly trus ...


References

{{reflist Computer data storage