Jump to content

Redis: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Rfl (talk | contribs)
Rfl (talk | contribs)
disambiguation intro - may not be needed, see Talk:Redis (disambiguation)
Line 18: Line 18:
| website = http://redis.io/
| website = http://redis.io/
}}
}}
{{about|Redis software|Redis people|Romani people}}

'''Redis''' is an [[open-source software|open-source]], networked, [[In-memory database|in-memory]], persistent, journaled, key-value data store. It is written in ANSI C. Supported languages or language bindings include [[C (programming language)|C]], [[C++]], [[C Sharp (programming language)|C#]], [[Clojure]], [[Common Lisp]], [[Erlang (programming language)|Erlang]], [[Haskell_(programming_language)|Haskell]], [[Java (programming language)|Java]], [[JavaScript]] (both client and [[NodeJS|server]]side), [[Lua (programming language)|Lua]], [[Objective-C]], [[Perl]], [[PHP]], [[Python (programming language)|Python]], [[R (programming language)|R]], [[Ruby (programming language)|Ruby]], [[Scala (programming language)|Scala]], [[Go (programming language)|Go]], and [[Tcl]]. As of 15 March 2010, development of Redis is sponsored by [[VMware]].<ref>[http://antirez.com/post/vmware-the-new-redis-home.html VMware: the new Redis home]</ref><ref>[http://blogs.vmware.com/console/2010/03/vmware-hires-key-developer-for-redis.html VMWare: The Console: VMware hires key developer for Redis]</ref>
'''Redis''' is an [[open-source software|open-source]], networked, [[In-memory database|in-memory]], persistent, journaled, key-value data store. It is written in ANSI C. Supported languages or language bindings include [[C (programming language)|C]], [[C++]], [[C Sharp (programming language)|C#]], [[Clojure]], [[Common Lisp]], [[Erlang (programming language)|Erlang]], [[Haskell_(programming_language)|Haskell]], [[Java (programming language)|Java]], [[JavaScript]] (both client and [[NodeJS|server]]side), [[Lua (programming language)|Lua]], [[Objective-C]], [[Perl]], [[PHP]], [[Python (programming language)|Python]], [[R (programming language)|R]], [[Ruby (programming language)|Ruby]], [[Scala (programming language)|Scala]], [[Go (programming language)|Go]], and [[Tcl]]. As of 15 March 2010, development of Redis is sponsored by [[VMware]].<ref>[http://antirez.com/post/vmware-the-new-redis-home.html VMware: the new Redis home]</ref><ref>[http://blogs.vmware.com/console/2010/03/vmware-hires-key-developer-for-redis.html VMWare: The Console: VMware hires key developer for Redis]</ref>



Revision as of 08:03, 13 October 2011

Redis
Developer(s)Salvatore Sanfilippo
Initial release2009
Stable release
2.2.14 / September 21, 2011 (2011-09-21)
Repository
Written inANSI C
Operating systemCross-platform
Available inEnglish
TypeDocument-oriented database
LicenseBSD
Websitehttp://redis.io/

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, Haskell, Java, JavaScript (both client and serverside), Lua, Objective-C, Perl, PHP, Python, R, Ruby, Scala, Go, and Tcl. As of 15 March 2010, development of Redis is sponsored by VMware.[1][2]

Data model

In its outer layer, the Redis data model is 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 typically holds the whole dataset in RAM. Versions up to 2.4 could be configured to use virtual memory[3] but this is now deprecated. 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. A slave may be a master to another slave. This allows Redis to implement a single-rooted replication tree. Redis slaves are writable, permitting intentional and unintentional inconsistency between instances. The Publish/Subscribe feature is fully implemented, so a client of a slave may SUBSCRIBE to a channel and receive a full feed of messages PUBLISHed to the master, anywhere up the replication tree. Replication is useful for read (but not write) scalability or data redundancy.[4]

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.[5] There is no notable speed difference between write and read operations.[6]

See also

References

  1. ^ VMware: the new Redis home
  2. ^ VMWare: The Console: VMware hires key developer for Redis
  3. ^ Redis documentation "Virtual Memory", redis.io, accessed January 18, 2011.
  4. ^ http://code.google.com/p/redis/wiki/ReplicationHowto
  5. ^ "FAQ".
  6. ^ A. Charnock: "Redis Benchmarking on Amazon EC2, Flexiscale, and Slicehost"