REDIS - build your fastest cache system ever

in #utopian-io6 years ago

Repository:

https://github.com/antirez/redis

1_i1d88Q8NNrRv6kjf7Ssw4g.pngREDIS stands for Remote Dictionary Index Server.

REDIS is an open source NoSQL , in-memory & key-value database system that has supports for different data structures which includes strings, lists, maps, sets, sorted set, bitmaps, streams and spatial indexes.

To better understand what REDIS means, I’ve deemed it fit to explain some key terms that represents what REDIS is all about. These terms are as follows.

  • Dictionary
  • Index
  • No-SQL
  • In-memory
  • Key-Value

DICTIONARY

Data Dictionary could almost stand in as another name for comprehensive data objects.

Dictionaries are at the highest levels of comprehensiveness in comparison with other the unitary data system like arrays and objects. It is almost trying to mock the comprehensiveness of a linguistic dictionary.

To better understand what a dictionary is, here is a proper succinct definition for it.

A Data dictionary is a modeled store of data elements with detailed description of its format, relationships, meaning, source and usage.

Below is an example of what a dictionary should look like structurally:

1a.PNG

INDEXING:

This is pretty simple to explain. Imagine all those big books we read in high school or college that has indices at the back to locate certain positions of words or topics in the book. That is exactly what an index does in a data storage system, it helps you keep track of the particular location of a data item in the whole data body.

If I was looking for the word “pretty” in the last paragraph we just read, I would index each word there by separating them by spaces. If I do that , the word “pretty” will fall in the 3rd position and have an index of 3 provided I start counting from 1, meaning “This” will have an index of 1, “is” will have an index of 2 and “pretty” will have an index of 3 and so on. Although, in most programming languages, data indexing starts from zero by default unless you try to re-manipulate the data , which is not always necessary.

Summarily, Indexing is just a way of tagging data for easily retrieval.

In –Memory:

This is the easiest part to describe, yet the most important. This simply means that, unlike other databases where data is stored on the disk, REDIS data is stored and retrieved on the RAM, although, for the purpose of data persistence, the data gets backed up on disks or a log file.

NoSQL

This is used to refer to databases that are not relational in structure. Most databases like oracle and mysql have a sort of tabular structure to it that makes retrieval and storage of data being tied to a SQL structure.

Unlike this Relational Database Management Systems, NoSQL databases have a flexible modeling structure. NoSql is more about flexibility in retrieval and storage, rather than being tied to a structure.

KEY-VALUE

This further refers to the fact that for every data stored on REDIS ,a key is provided, for such data to be retrieved , the key used in storing it has to be provided. Also, REDIS allows you to store data under a HASH field, meaning you can store more than one key: value data under a string name called a hash field.

Now, that I have made a detailed explanation of what each of this keyword means. You can go back to the introduction I gave and read. Then, you will have a more comprehensive understanding of what REDIS is all about.

Now, let’s get down to why you should or should not use a REDIS database.

Why You Should Use REDIS.

  • FOR BUILDING CACHE SYSTEM:
    REDIS provides you with one of the best cache possibilities in terms of speed, all thanks to the RAM storage system. This allows you to retrieve data as blazing speed making, it the perfect place to store cache data.

  • FOR SPEED-CENTRIC SYSTEMS
    If you want to trade it all for speed, REDIS is the go-to-guy. There are times when you need speed and nothing else. REDIS is the go to guy. Cases like this happen when building chat applications or robots where data needs to be stored and retrieved quickly.

  • FOR SESSION STORAGE SYSTEMS
    In many programming language environment, sessions are stored on disks whereas they are better stored in a position of fast retrieval. This makes REDIS come handy here because it stores them in ram where it can be easily retrieved.

  • FOR BUILDING A FAST COUNTING SYSTEM
    There are times where we need to process some data that needs to have its counts stored and retrieved frequently. REDIS comes in handy here, you don’t want your website speed reduced just because of a count data that would not load fast.

Why you should not use REDIS

  • REDIS has a very slim support for windows. If your application is window based, installing REDIS on windows might not be an easy fit.

  • You have to say bye - bye to all advantages of using an RDMS and the flexibility that SQL offers.

  • REDIS security is not so robust. It only offers some basic security at instance level.

  • REDIS does not favor scalability with one instance as it is single threaded while running only on a single core. You might need to run many instances of it to scale it.

  • REDIS in-memory structure means that all your data must fit into the memory provided. This is a demerit because RAM is usually not as sufficient as a disk storage system.

Conclusion

As you can see, REDIS offers a lot of advantage and demerits as well. In case , you want to make a choice of an alternative. You can look into MongoDb, Memcached and PostGreSQL. All the same, I will save REDIS reigns supreme in terms of SPEED and DATA PERSISTENCE.

Official Links

Homepage: https://redis.io
Download lInk: https://redis.io/downloads
StackOverflow: https://stackoverflow.com/questions/tagged/redis/

Sort:  

Thank you for your contribution.

This post is a bit of a chimera. Had it been significantly more detailed, it could have worked as a tutorial. Had it been significantly more personal or editorial, it could have worked as a blog post. As it is, I am sorry to say this post doesn't contribute anything one could not find elsewhere. The REDIS website has detailed information, and more is available elsewhere, such as this post, from which you took the both the definition you used for data dictionaries and the image you used to illustrate. Both uncredited.

I would strongly recommend that future contributions focus on creating unique content, with your own opinion and experience in the forefront.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Okay. Not crediting those sources was a skip. It was a mistake and highly unintentional. My fault, absolutely.

I can't say all I have said is on the REDIS website, if it was there , there will be no point for this post at all. I made this post so that any tech individual reading this post can understand why anyone will choose to pick REDIS over others.

The link you gave was for the data dictionary which I preceded with this preamble here is a proper succinct definition for it. which shows that I intentionally imported it to the post for the purpose of proper definition.

The strong point of this post was to explain REDIS in a very simple way which I did perfectly.

You may not approve the post,that is alright but it has a unique intent and you can not find this same thing any where else online. If you do find something similar , please drop the link and you will be right with your claim on lack of uniqueness but for now , this is a very unique post.

Maybe i dont have a proper understanding of Utopian Rules as regards uniqueness but this post is not a chimera if that word is synonymous to substandard.

A chimera is a beast that is a combination of other beasts. In this case, a combination of a blog post and a tutorial, and not quite either.

In the Utopian Blog category, we're looking for a point of view. We're looking for strong, unique content that represents your view and your experience in regards to an open source project. There's a bit of that here, but not enough. You concentrated more on the "what" than on the "why."

The post is also highly technical. This is not a flaw, necessarily. However, when writing a highly technical post, you should seek to make it more welcoming to casual readers.

Finally, while I didn't comment on this in the original moderation comment, the post could have been better written. There were multiple issues of style, grammar, and proofreading. Again, this makes the post less welcoming and less fun to read.

Thank you for your review, @didic! Keep up the good work!

Still doesn't teach me how to code. Wishing it did... Just to wake up one day to find that you could code something meaningful from start to finish.

Congratulations @akintunde! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

You can upvote this notification to help all Steem users. Learn how here!

Coin Marketplace

STEEM 0.22
TRX 0.27
JST 0.041
BTC 104893.66
ETH 3859.77
SBD 3.29