Misplaced Pages

Redis

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

This is an old revision of this page, as edited by Sorenriise (talk | contribs) at 05:11, 14 November 2010 (External links). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Revision as of 05:11, 14 November 2010 by Sorenriise (talk | contribs) (External links)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Redis
Developer(s)Salvatore Sanfilippo
Initial release2009
Stable release2.0.3 / October 15, 2010 (2010-10-15)
Repository
Written inANSI C
Operating systemCross-platform
Available inEnglish
TypeDocument-oriented database
LicenseBSD
Websitehttp://code.google.com/p/redis/

Redis is an open-source, networked, in-memory, persistent, journaled, key-value data store. It is written in ANSI C. Supported languages or language bindings include C, C++, C#, Clojure, Common Lisp, Erlang, Java, JavaScript, Lua, Perl, PHP, Python, Ruby, Scala, Go, and Tcl. As of 15 March 2010, development of Redis is funded by VMware.

Data model

Redis data model is in its outer layer, similarly to other structured storage systems, a dictionary where keys are mapped to values. One of the main differences between Redis and other structured storage systems is that values are not limited to strings. In addition to strings, the following abstract data types are supported:

  • Lists of strings
  • Sets of strings (collections of non-repeating unsorted elements)
  • Sorted sets of strings (collections of non-repeating elements ordered by a floating-point number called score)
  • Hashes where keys are strings and values are either strings or integers

The type of a value determines what operations (called commands) are available for the value itself. Redis supports high level atomic server side operations like intersection, union, and difference between sets and sorting of lists, sets and sorted sets.

Persistence

Redis holds the whole dataset in RAM. Persistence is reached in two different ways: One is called snapshotting, and is a semi-persistent durability mode where the dataset is asynchronously transferred from memory to disk from time to time. Since version 1.1 the safer alternative is an append-only file (a journal) that is written as operations modifying the dataset in memory are processed. Redis is able to rewrite the append-only file in the background in order to avoid an indefinite growth of the journal.

Replication

Redis supports master-slave replication. Data from any redis server can replicate to any number of slaves. Replication is useful for read (but not write) scalability or data redundancy.

Performance

The in-memory nature of Redis allows it to perform extremely well compared to database systems that write every change to disk before considering a transaction committed. There is no notable speed difference between write and read operations.

See also

References

  1. VMware: the new Redis home
  2. VMWare: The Console: VMware hires key developer for Redis
  3. http://code.google.com/p/redis/ReplicationHowto
  4. A. Charnock: "Redis Benchmarking on Amazon EC2, Flexiscale, and Slicehost"

External links

Categories: