Giter Site home page Giter Site logo

redis-doc's Introduction

Redis documentation

Important: This repository got replaced by the new Redis docs repository and will be archived soon.

License vs Trademarks

OPEN SOURCE LICENSE VS. TRADEMARKS. The three-clause BSD license gives you the right to redistribute and use the software in source and binary forms, with or without modification, under certain conditions. However, open source licenses like the three-clause BSD license do not address trademarks. For further details please read the Redis Trademark Policy."

Clients

All clients are listed under language specific sub-folders of clients

The path follows the pattern: clients/{language}/github.com/{owner}/{repository}.json. The {language} component of the path is the path-safe representation of the full language name which is mapped in languages.json.

Each client's JSON object represents the details displayed on the clients documentation page.

For example clients/python/github.com/redis:

{
    "name": "redis-py",
    "description": "Mature and supported. Currently the way to go for Python.",
    "recommended": true
}

Commands

Redis commands are described in the commands.json file that is auto generated from the Redis repo based on the JSON files in the commands folder. See: https://github.com/redis/redis/tree/unstable/src/commands See: https://github.com/redis/redis/tree/unstable/utils/generate-commands-json.py

For each command there's a Markdown file with a complete, human-readable description. We process this Markdown to provide a better experience, so some things to take into account:

  • Inside text, all commands should be written in all caps, in between backticks. For example: INCR.

  • You can use some magic keywords to name common elements in Redis. For example: @multi-bulk-reply. These keywords will get expanded and auto-linked to relevant parts of the documentation.

Each command will have a description and both RESP2 and RESP3 return values. Regarding the return values, these are contained in the files:

  • resp2_replies.json
  • resp3_replies.json

Each file is a dictionary with a matching set of keys. Each key is an array of strings that, when processed, produce Markdown content. Here's an example:

{
  ...
  "ACL CAT": [
    "One of the following:",
    "* [Array reply](/docs/reference/protocol-spec#arrays): an array of [Bulk string reply](/docs/reference/protocol-spec#bulk-strings) elements representing ACL categories or commands in a given category.",
    "* [Simple error reply](/docs/reference/protocol-spec#simple-errors): the command returns an error if an invalid category name is given."
  ],
  ...
}

Important: when adding or editing return values, be sure to edit both files. Use the following links for the reply type. Note: do not use @reply-type specifiers; use only the Markdown link.

@simple-string-reply: [Simple string reply](https://redis.io/docs/reference/protocol-spec#simple-strings)
@simple-error-reply: [Simple error reply](https://redis.io/docs/reference/protocol-spec#simple-errors)
@integer-reply: [Integer reply](https://redis.io/docs/reference/protocol-spec#integers)
@bulk-string-reply: [Bulk string reply](https://redis.io/docs/reference/protocol-spec#bulk-strings)
@array-reply: [Array reply](https://redis.io/docs/reference/protocol-spec#arrays)
@nil-reply: [Nil reply](https://redis.io/docs/reference/protocol-spec#bulk-strings)
@null-reply: [Null reply](https://redis.io/docs/reference/protocol-spec#nulls)
@boolean-reply: [Boolean reply](https://redis.io/docs/reference/protocol-spec#booleans)
@double-reply: [Double reply](https://redis.io/docs/reference/protocol-spec#doubles)
@big-number-reply: [Big number reply](https://redis.io/docs/reference/protocol-spec#big-numbers)
@bulk-error-reply: [Bulk error reply](https://redis.io/docs/reference/protocol-spec#bulk-errors)
@verbatim-string-reply: [Verbatim string reply](https://redis.io/docs/reference/protocol-spec#verbatim-strings)
@map-reply: [Map reply](https://redis.io/docs/reference/protocol-spec#maps)
@set-reply: [Set reply](https://redis.io/docs/reference/protocol-spec#sets)
@push-reply: [Push reply](https://redis.io/docs/reference/protocol-spec#pushes)

Note: RESP3 return schemas are not currently included in the resp2/resp3_replies.json files for Redis Stack modules.

Styling guidelines

Please use the following formatting rules (aiming for smaller diffs that are easier to review):

  • No need for manual lines wrapping at any specific length, doing so usually means that adding a word creates a cascade effect and changes other lines.
  • Please avoid writing lines that are too long, this makes the diff harder to review when only one word is changed.
  • Start every sentence on a new line.

Checking your work

After making changes to the documentation, you can use the spellchecker-cli package to validate your spelling as well as some minor grammatical errors. You can install the spellchecker locally by running:

npm install --global spellchecker-cli

You can than validate your spelling by running the following

spellchecker --no-suggestions -f '**/*.md' -l en-US -q -d wordlist

Any exceptions you need for spelling can be added to the wordlist file.

redis-doc's People

Contributors

antirez avatar badboy avatar banker avatar charleschen888 avatar charsyam avatar cheprasov avatar djanowski avatar dmaier-redislabs avatar dspezia avatar dwdougherty avatar enjoy-binbin avatar gkorland avatar guybe7 avatar hpatro avatar huangzhw avatar hwware avatar itamarhaber avatar justincastilla avatar kaitlynmichael avatar madolson avatar nermiller avatar oranagra avatar pietern avatar sav-norem avatar seamusabshere avatar shawnmilo avatar soveran avatar uglide avatar yoav-steinberg avatar zuiderkwast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redis-doc's Issues

Reconsider preferred scala client

Not to be a jerk, but I'm curious why scala-redis is considered the preferred client for Scala. It seems like a decent client, but I really think that redis-client-scala-netty has much better features: async io, typing, binary safe values, protocol pipelining, connection multiplexing, implicit conversions...

localshow.tv is using redis

...and it is a lifesaver. Previously, we were storing JSON in memcached, but the availability of lists and hashes as native objects is faster, uses less memory, and is cleaner to code. Redis 2.2 fixes the issue with expiring volatile objects, so now lists can be popped while expiring in 24 hours.

At the moment, I don't know of any missing features... Redis nails it all. Insane. Excellent work, and thanks!

EXPIRE on existing key does not work as described

http://www.redis.io/topics/expire

"Trying to call EXPIRE against a key that already has an associated timeout will not change the timeout of the key, but will just return 0."

Unfortunately, it turns out that this statement is incorrect--EXPIRE on an existing key replaces the prior TTL with the TTL argument from the EXPIRE command.

Redis 2.4.8:

redis db2:6381[2]> setex test 20 asdf
OK
redis db2:6381[2]> ttl test
(integer) 19
redis db2:6381[2]> expire test 60
(integer) 1
redis db2:6381[2]> ttl test
(integer) 59

Redis common patterns section

Hi,

I use a lot Redis and I think that it's for DBs what RISC it's of CPUs. A set of simple functions that you can use to build your own, to extend it and have a database that matches your needs.

So using redis I noticed common patterns like implementing message queues using an array with blocking pop and a "working" set. Or using a sorted set to implement a scheduler using timestamp as score.

What do you think about adding on documentation/website a section with these patterns? I think that can be useful for people to understand better how to use redis or to extend them avoiding common mistakes.

Minor correction to "transactions" docs

In the "Usage" section of http://redis.io/topics/transactions, the statement reads:

As it is possible to see from the session above, MULTI returns an array of replies, where every element is the reply of a single command in the transaction, in the same order the commands were issued.

I'm pretty sure this statement means "...EXEC returns an array of replies...", because EXEC does return an array of replies, whereas MULTI always returns "OK", even as that is stated in the same page, just above:

A Redis transaction is entered using the MULTI command. The command always replies with OK.

List more topics

I'd like http://redis.io/documentation to link to the "introduction" and "transactions" pages. They're accessible from elsewhere, but a comprehensive index would make them harder for new users to miss.

Also, the introduction contains a broken link to /topics/cache.

ZREVRANGEBYLEX not in documentation

While writing an automated processor which combines information from the redis C table with the documentation, it noticed that zrevrangebylex is in the command table but not in the commands.json file:

https://github.com/antirez/redis/blob/78a012d81a0f487b92b2b79a91de1f28697100e8/src/redis.c#L185

Just thought I'd let you know. :-)

I'm assuming its performance profile is the same as ZRANGEBYLEX:

"O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N))."

I mention that one in particular because it is user facing and I'd say it's fairly certain it should be documented. Though here's the others that don't have documentation, and some may be omitted on purpose:

  • latency
  • pfdebug
  • pfselftest
  • psync
  • replconf
  • restore-asking
  • readonly
  • readwrite

www.thematchfixer.com uses redis

http://www.thematchfixer.com is a general purpose betting engine which I have developed using Sinatra / Redis /Thin / nginx. The main idea was to develop a game which would be very real-time, and Redis was the obvious choice given the speed !! You can take the engine for a spin starting the 19th of feb (when the cricket world cup starts) and if things go great I plan to generalize the engine so that it could be compatible for most of the popular sports.

Cheers!
Sanjay

C# ServiceStack.Redis is non-free

Can somebody please edit clients list to mention ServiceStack.Redis is open source but requires license to use. Should this library be recommended?

License

I'm implementing JavaScript library that wraps the IndexedDB interface of modern browsers with an interface that was inspired by redis.

Is there any license information for the redis documentation? I'd like to use the short description of some redis commands for my project, as the behaviour is nearly identical.

Command Reference pages need reorganizing

Each command reference page starts with the Time Complexity header. Then it has the time complexity information. Then in the same section with no header is a description of what the command does.

That order hides the most important information which is what the command does.

A good solution would be to move the description above the Time Complexity header.

In addition the Availability information would be better as a section and put somewhere after what the command does.

TweetDeck uses Redis

Hi, just wanted to let you know that TweetDeck uses Redis internally for analytics, and to store certain bits of synced data.

Fee free to use our logo - I can provide specific sizes, if required.

nk.pl is uses redis

Hi!

Nasza Klasa (http://nk.pl) - the largest social network in Poland - uses Redis as a cache and database. Currently we have more than 500 Redis instances.

Document SENTINEL sentinels <name> command

Moving this here from the command request on Redis' issue list. I'll be adding this in the next several days, but want to have it here to track it and refer to it in a pull request.

AuthorityLabs

We use redis to manage our keyword and domain processing.

rpush slow when list-max-ziplist-entries is big

Very simple code:

require 'redis'
redis = Redis.new(:timeout => 60)
a = Array.new(ARGV[0].to_i, 1)
redis.flushall
t = Time.now
10.times{|i| redis.rpush i, a}
t1 = Time.now
memory = redis.info['used_memory_human']
print "Tooked #{t1 - t} seconds to serialize #{a.size} values and spent #{memory} of memory\n"

Results:

root@pesta:# ruby test.rb 10000
Tooked 0.202587693 seconds to serialize 10000 values and spent 1.12M of memory
root@pesta:
# ruby test.rb 20000
Tooked 0.385018421 seconds to serialize 20000 values and spent 1.51M of memory
root@pesta:# ruby test.rb 40000
Tooked 0.776276837 seconds to serialize 40000 values and spent 2.33M of memory
root@pesta:
# ruby test.rb 60000
Tooked 1.161096079 seconds to serialize 60000 values and spent 3.30M of memory
root@pesta:# ruby test.rb 80000
Tooked 58.732304464 seconds to serialize 80000 values and spent 4.24M of memory
root@pesta:
# ruby test.rb 65536
Tooked 1.265133161 seconds to serialize 65536 values and spent 3.54M of memory
root@pesta:~# ruby test.rb 70000
Tooked 18.679042551 seconds to serialize 70000 values and spent 3.77M of memory

redis.conf is very basic:

loglevel verbose
list-max-ziplist-entries 1048576
list-max-ziplist-value 256

redis version:
Redis server v=2.5.11 sha=00000000:0 malloc=jemalloc-3.0.0 bits=32

Suggestions ? Maybe I'm missing something here, but I think the performance should't degrade like this.

Locating/Formatting SENTINEL commands

I'm willing to write the docs on the SENTINEL commands, but want to make sure I have the correct place to put them.

I'll be adding some text to the topics/sentinel.md file to document the undocumented commands. I can also write the commands/sentinel.md file to document the command, but am unsure about where additional text should go. For example, SENTINEL is a command which only works if the server is invoked with sentinel mode. Does it need it's own section or just an entry in commands.json which looks like the rest? It is this latter question which is forefront of my mind on this at the moment.

pennyace.com is using redis...

...and it is awesome! The realtime component of pennyace.com fits nicely with Redis. It seriously just works. Not sure we could have launched without it. Cheers!

Fotolog uses redis

Fotolog, a photo-sharing social network with over 30 million members, has recently begun using redis extensively. Because of this, we actually wrote our own redis client in scala as well, using the netty framework. It's an extremely lightweight, high-performance client that scales very well but, at the same time, takes care of a lot of the work for you, such as type conversions, clustering, etc... It also features binary safe values, asynchronous calls, protocol pipelining and connection multiplexing.

https://github.com/andreyk0/redis-client-scala-netty

site using redis

The redis homepage "if you are using redis, let us know" link sent me here. graphbug.com uses redis for all of its data.

thanks,
Ian

Document commands that can't be run in a script

The following commands can't be run inside a script

  • brpop
  • blpop
  • brpoplpush
  • spop
  • auth
  • save
  • multi
  • exec
  • discard
  • sync
  • psync
  • replconf
  • slaveof
  • unsubscribe
  • psubscribe
  • punsubscribe
  • watch
  • unwatch
  • eval
  • evalsha
  • script

We use Redis (Moodstocks)

I have followed the "let us know" link at http://www.redis.io/topics/whos-using-redis. I just wanted to tell you that we use Redis (through Ohm) as our main datastore in our applications Moodstocks Notes and Moodstocks Contacts, and to store some data (mainly statistics and credentials) in Moodstocks API.

References:
http://www.moodstocks.com/discover-our-products/
http://www.moodstocks.com/2010/11/26/the-tech-behind-moodstocks-notes/
http://www.moodstocks.com/2010/12/20/the-tech-behind-moodstocks-api/
http://mashable.com/2010/12/18/moodstocks/
http://techcrunch.com/2010/12/10/moodstocks-notes-is-stickybits-without-the-barcodes/

Feel free to add us to the users page if you like :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.