Object Prevalence
   HOME

TheInfoList



OR:

System prevalence is a simple software
architectural pattern An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. The architectural patterns address various issues in software engineering, such as computer hardware perform ...
that combines
system image In computing, a system image is a serialized copy of the entire state of a computer system stored in some non-volatile form such as a file. A system is said to be capable of using system images if it can be shut down and later restored to exactly ...
s (snapshots) and
transaction Transaction or transactional may refer to: Commerce * Financial transaction, an agreement, communication, or movement carried out between a buyer and a seller to exchange an asset for payment *Debits and credits in a Double-entry bookkeeping sys ...
journaling to provide speed, performance scalability, transparent persistence and transparent live mirroring of computer system state. In a prevalent system, state is kept in
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered, ...
in native format, all transactions are journaled and
System image In computing, a system image is a serialized copy of the entire state of a computer system stored in some non-volatile form such as a file. A system is said to be capable of using system images if it can be shut down and later restored to exactly ...
s are regularly saved to disk. System images and transaction journals can be stored in language-specific
serialization In computing, serialization (or serialisation) is the process of translating a data structure or object state into a format that can be stored (e.g. files in secondary storage devices, data buffers in primary storage devices) or transmitted (e ...
format for speed or in
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
format for cross-language portability. The first usage of the term and generic, publicly available implementation of a system prevalence
layer Layer or layered may refer to: Arts, entertainment, and media *Layers (Kungs album), ''Layers'' (Kungs album) *Layers (Les McCann album), ''Layers'' (Les McCann album) *Layers (Royce da 5'9" album), ''Layers'' (Royce da 5'9" album) *"Layers", the ...
was
Prevayler Prevayler is an open-source (BSD) system-prevalence layer for Java: it transparently persists plain old Java objects. It is an in-RAM database backed by snapshots of the system via object serialization, which are loaded after a system crash t ...
, written for Java by Klaus Wuestefeld in 2001.


Advantages

Simply keeping system state in RAM in its normal, natural, language-specific format is orders of magnitude faster and more programmer-friendly than the multiple conversions that are needed when it is stored and retrieved from a
DBMS 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 ...
. As an example, Martin Fowler describes "The LMAX Architecture" with a transaction-journal and system-image (snapshot) based business system at its core, which can process 6 million transactions per second on a single thread.


Requirement

A prevalent system needs enough
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered, ...
to hold its entire state in RAM (the "prevalent hypothesis"). Prevalence advocates claim this is continuously alleviated by decreasing RAM prices, and the fact that many business databases are small enough already to fit in memory. Programmers need skill in working with business state natively in RAM, rather than using explicit
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
calls for storage and queries for retrieval. The system's events must be capturable for journaling.


See also

* Object-relational mapping


References

{{reflist


External links

* "An Introduction to Object Prevalence", by Carlos Villela for IBM Developerworks

* "Prevalence: Transparent, Fault-Tolerant Object Persistence", by Jim Paterson for O'Reilly's OnJava.co

* "Object Prevalence": Original Article by Klaus Wuestefeld published in 2001 on Advogato

* Madeleine: a Ruby implementatio

Persistence