SlideShare a Scribd company logo
1 of 6
Download to read offline
Database Cashing in-memory with Redis NoSQL
Databases
Artan Ajredini, Jaumin Ajdari
Contemporary Sciences and Technologies, South East European University, Tetovo, Macedonia
{j.ajdari, aa28294}@seeu.edu.mk
Abstract
Todayā€™s data is distributed by nature, the popularity of NoSQL
databases using Redis has increased due to the need of processing
vast amount of data faster than the relational database management
systems (RDMS) by taking the advantage of highly scalable
architecture. It examines the need of NoSQL and how they have
become an important alternative to relational databases. The
importance of Caching is a common technique that aims to improve
the performance and scalability of a system.
Caching is a technique used to accelerate application response times
and help applications scale by placing frequently needed data very
close to the application. Redis, an open source, in-memory, data
structure server is frequently used as a distributed shared. In this
paper we will present what Redis is and what cashing is methods to
use cashing with NoSQL databases in modern applications,
Moreover we will demonstrate the usage of object cashing in Redis.
Keywords
Key-Value Stores, Redis, Relational database, NoSQL.
1.INTRODUCTION
In recent period, in-memory data processing is becoming more and
more valuable as it is essential to examine a huge amount of
information in shorter duration of time Working with large amount
of data is always the problem in development and daily maintenance.
If SQL is used to store that huge amount of data, it is impossible to
process unpredictable and unstructured information.
But social media network demands for an occurrence-oriented
database that is very flexible and operates on a schema of less data-
model. So SQL can not be fitted for this job. NoSQL, the ability to
support large volume of read-write operations and store generic
objects, such as JSON, simply contributes to data consistency in
distributed system. This shows that NoSQL database is a great
choice for processing big and unstructured data. Given the number of
data, data access pattern and characteristics of social media, NoSQL
has its own indispensable advantages. As a matter of fact, NoSQL
has already been widely used in modern software development web-
based applications and enterprise solutions. In recent period, in-
memory data processing is becoming more and more valuable
as it is essential to examine a huge amount of information in
shorter duration of time.
NoSQL has many benefits including simplicity of design,
scalability of data model, concurrency control, consistency in
storage, etc. Redis is an in-memory data structure store,
remote database that offers high performance, is a flexible and
open source. In this section, we will mainly review and demonstrate
one of the most popular NoSQL databases. Redis is in-memory open
source is used as cashe but is also a Database. and advanced key-
value store database and if you want to store more data you need to
have a large of capacity of ram, It may also be persistence so that the
data you have on the ram is stored in a file.It is often referred as data
structure server. When using an in-memory database like Redis, one
of the first questions thatā€™s asked is ā€œWhat happens when my server
gets turned off?ā€ Redis has two different forms of persistence
available for writing in-memory data to disk in a compact format.
2.RELATED WORK
In-memory data caching can be one of the most effective strategies
for improving your overall application performance and reducing
your database costs.
Caching is a technique used to accelerate application response times
and help applications scale by placing frequently needed data very
close to the application. In modern computing environments,
processes are run at different layers, from low-level processes that
are embedded in the hardware to high-level abstractions, such as
clusters. Redis, an open source, in-memory, data structure server is
frequently used as a distributed shared cache (in addition to being
used as a message broker or database) because it enables true
statelessness for an applicationsā€™ processes, while reducing
duplication of data or requests to external data sources.
Redis have a wide usage in social media applications working on
large amount of data. In present Big data processing, in-memory
enumerate has become popular because to increase capacity and high
throughput of main memory. When youā€™re building distributed
applications that require low latency and scalability, disk-based
databases can pose a number of challenges. A few common ones
include the following:
.
238
However, the data retrieval speed from disk plus the added query
processing times generally put your query response times in double-
digit millisecond speeds, at best. This assumes that you have a steady
load and your database is performing optimally.
Cost to scale:
Whether the data is distributed in a disk-based NoSQL
database or vertically scaled up in a relational database, scaling for
extremely high reads can be costly.
It also can require several database read replicas to match what a
single in-memory cache node can deliver in terms of requests per
second. The need to simplify data access: Although relational
databases provide an excellent means to data model relationships,
they arenā€™t optimal for data access.
There are instances where your applications
may want to access the data in a particular structure or view to
simplify data retrieval and increase application performance.
Before implementing database caching, many architects and
engineers spend great effort trying to extract as much performance as
they can from their databases. However, there is a limit to the
performance that you can achieve with a disk-based database, and
itā€™s counterproductive to try to solve a problem with the wrong tools.
For example, a large portion of the latency of your database query is
dictated by the physics of retrieving data from disk
Solely Redis cannot perform well in a real engineering project, but a
combo of Redis and SQL, such as MySQL, would incredibly
produce a nice teamwork. As previously mentioned, Redis is fast at
IO speed, because of its ā€cachingā€
feature. MySQL is a popular relational SQL, which has a solid
performance and active community. The obvious weakness of Redis
is the limited amount of storage. Memory is not a ideal solution for
storing a large amount of data. Generally speaking, the most
common solution is that MySQL or other SQL database would act as
the main data warehouse, meanwhile, Redis can be dedicated to
areas that need more flexible and efficient performance.
As to a real development project, usually only a small number of
data are unstructured, because most of information of world is kind
of in a certain structure. Additionally, cloud-computing is growing
rapidly, and the local storage would be less essential in the future
development. Maybe only the core program and data are running on
the local server. If so, Redis will have a much larger role to play in
development.
Both relational and NoSQL databases are in-memory databases that
provides different mechanism for data storage and retrieval.
2.1 NoSQL Database
According to NoSQL data model, the data stores are grouped into
four categories are key-value data stores, document stores, column-
family stores and graph databases.
Key-value store: The data are stored as key-value pairs. This data
structure is also known as ā€œhash tableā€ where the data are retrieved
by keys. Most well-known examples of key-value stores are Redis.
Document store: The data are stored in collections that contain key-
value pairs which encapsulate key value pairs in JSON (Javascript
Object Notation) or JSON like documents
Column family: The data are stored as a set of rows and columns
where columns are grouped according to the relationship of data.
Graph databases
The graph databases are category of the NoSQL database, stores data
in the form of a graph. In graph databases, the graph is made up of
two things: nodes act as the entities or objects and edges act as the
relationship between the entities or objects.
2.2 Redis
2.2.1 Key-Value Database
Redis is usually known as a key-value database. Doesnā€™t it sound
like hashmap, one of the most important data structure in computer
science? Redis also has five major data structures, Set, Zset, List,
Hash, String, which grant it a promising flexibility. Compared with
SQL, even with other NoSQL, this group of data structures makes
Redis stand out. Although this cool feature might be the specialty of
Redis, it could also be difficult for developers.
Some basic operations with redis:
2.2.2 Advantages of Redis comparing to Other NoSQL
Unlike MongoDB, the unique data storing of Redis makes itself
good at IO speed. Its data is stored in memory, therefore IO
performance is guaranteed. However, memory is powerful, but
expensive. It seems not realistic to store large amount of data in
memory. Redis gives us its solution of optimization, EXPIRE key.
ā€Set a timeout on key. After the timeout has expired, the key will
automatically be deleted. A key with an associated timeout is often
said to be volatile in Redis terminology.ā€1 As Redis official
document describes, Redis can set a timeout on key, and the key
would be deleted after a certain time. Running in memory is one
largest difference, compared with other NoSQL.Relatively less data
stored and blazing fast speed guarantee
the efficiency of data landing. User could have quite a good
experience by using Redis as back-end. Social media has a high
demand on accessing speed, and the high concurrency becomes one
toughest challenge for any social media website.
Other NoSQL, like MongoDB, have their own suitable working
areas, which perfect the function of relational database, so does
Redis. Redis is great at caching, and working on a small a amount of
data. However Redis is much more than a cache.
239
2.3 What is application cashe
Once an application process uses an external data source, its
performance can be bottlenecked by the throughput and latency of
said data source. When a slower external data source is used,
frequently accessed data is often moved temporarily to a faster
storage that is closer to the application to boost the applicationā€™s
performance. This faster intermediate data storage is
called the applicationā€™s cache, a term originating from the French
verb ā€œcacherā€ which means ā€œto hide.ā€ The following diagram shows
the high-level architecture of an application cache:
The cacheā€™s main purpose is to reduce the time needed to access data
stored outside of the applicationā€™s main memory space. Additionally,
caching is also an extremely powerful tool for scaling up external
data sources and mitigating the effects that usage spikes have on
them. An application-side cache effectively reduces all resource
demands needed to serve data from
external sources, thus freeing these resources for other uses. Without
the use of a cache, the application interacts with the data source for
every request, whereas when a cache is employed
only a single request to the external data source is needed, with
subsequent access served from the cache.
Additionally, a cache also contributes to the applicationā€™s
availability. External data sources may experience failures that result
in degraded or terminated service. During such outages the cache can
still serve data to the application and thus retain its availability.
An applicationā€™s cache is intended for storing data that the
applicationā€™s process requires rapidly during execution. Though each
application is unique and can potentially store any kind of data in its
cache, an application would typically use a cache for:
Configuration settings: Information that the application requires to
make bootstrapping and runtime decisions is often stored in
relatively slow storage (such as text files on disk or a shared
configuration repository). By keeping cached copies of these
settings, the application can access the data with minimal latency.
Localization and internationalization data: User-facing applications
often provide localized variants of their interface to accommodate
international audiences. Internationalization data is usually stored
external to the application so it can be managed separately. Because
this data is needed to serve most requests, caching it yields
improvements in application response times.
Templates and partially rendered responses: Many applications
compose their replies by adding data to templates and pre-prepared
content (such as HTML fragments and JSON snippets).
Reusable results of compute-intensive functions: Sometimes an
applicationā€™s workflow requires the generation of resource-intensive
results. Once these results are obtained, there are cases in which the
results could be later reused, such as when performing partial
aggregates. The cache acts as an ideal intermediate medium for
retaining such results between requests.
Session data: Caching user session data is an integral part of building
responsive applications that can scale. Because every user interaction
requires access to the sessionā€™s data, keeping it in the cache ensures
the fastest response times to the application user. Caching session
data at the application level is superior to alternative methods.
Keeping sessions sticky at the load balancer level, for example,
practically forces all requests in a session to be processed by a single
app server, while caching allows the requests to be processed by any
app server without losing usersā€™ states.
DBMS data: Most traditional databases are designed for providing
robust functionality rather than speed at scale. The application cache
is often used for storing copies of lookup tables and the replies to
expensive queries from the DBMS, both to improve the applicationā€™s
performance as well as to reduce the load of the data source.
API responses: Modern applications are built using loosely coupled
components that communicate via an API. An application
component uses the API to make requests for service from other
components, whether inside (e.g. in a microservices architecture) or
outside (in a SaaS use case, for instance) the application itself. In
cases where an APIā€™s reply can be stored in cache, even if only for a
relatively short duration, the applicationā€™s performance is improved
by avoiding the inter-process communication.
Application objects: Any object that the application generates and
that could be reused at a later time can be stored in the cache. The
method for caching objects varies by application, but most caches
allow storing both serialized as well as raw object data. A typical
example of an often-cached application object is a user profile that is
made up of data from multiple sources.
240
2.3.1 Cashe object with Redis
In this paper, they mainly consider the method which improves the
system performance by reading data more frequently from
applications and also saves time. Implementation of methods is
developed in Nodejs code in the backend provide applications
program interface with the redis-client and redis-server.If we work
with the system that all the time selling books it is a good idea that
those items we get from the database to cashe in Redis in order to
have faster access.
Fig 1: Using Redis in-memory cashe bookstore in real example
We will demonstrate another to get the data from Redis, and to
display to the applications.
Fig 2: Displaying the data in redis
On the firs line of the code we want to add the book by id or
genderId. this is one way how to implement indexing in redis.
In this case if we every time we will change the name of the book it
would be changed also the index.
Fig 3: Working with models and object cashe in redis.
To ose redis indexing it is necessary to define the model, in this case
we have the model book, and to SetDefitions we need to define
which are primary key and unique key.
In our example we need to see how to use cashe in redis to get the
data by genderId.
Fig 4: Get the data by genderid
first of all we need to go in redis to check if we will have store
books, and then we wil e retrive the books. if we don't have we need
to go in mongodb to get the books in this case.
2.3.2 SQL Cooperated With Redis
Redis cannot perform well in a real engineering project, but a
combo of Redis and SQL, such as MySQL, would incredibly
produce a nice teamwork. As previously mentioned, Redis is fast at
IO speed, because of its ā€cachingā€ feature. MySQL is a popular
relational SQL, which has a solid performance and active
community. As to a real development project, usually only a small
number of data are unstructured, because most of information of
world is kind of in a certain structure. Additionally, cloud-computing
is growing rapidly, and the local storage would be less essential in
the future development. Maybe only the core program and data are
running on the local server. If so, Redis will have a much larger role
to play in development. Redis has several popular applications in
social media nowadays. Moreover, Big Data would be the next
breaking point of NoSQL.
3. CONCLUSION
In this paper, they make use of an in-memory key-value data storage
system is Redis which works on a large data. Redis is blazing fast in
speed on reading process as compared to the relational database. The
major problem is a previous Client Server framework gives poor
execution on read and write process regarding throughput and
latency since all servers utilize their own particular memory to deal
with the whole procedure, which is time consuming.
NoSQL will be playing a important role in the future development,
and has got increasing attention from giant companies and startup.
Both academia and industry give a high evaluation of the future of
NoSQL. Undoubtedly, NoSQL is not aimed at replacing SQL totally,
but assisting relational database work better. Other than this, NoSQL
may exploit a definitely new area. Ultimately, we shall always
believe the wheel of technology is moving forward.
242
REFERENCES
[1] Cattell, R., 2011. Scalable SQL and NoSQL data stores.
Acm Sigmod Record, 39(4), pp. 12-27.
.
[2] DeZyre ā€NoSQL vs SQL- 4 Reasons Why NoSQL is
better for Big Data applicationsā€
https://www.dezyre.com/article/nosql-vs-sql-4-
reasonswhy-nosql-is-better-for-big-data-applications/86
19 Mar 2015
[3] Zachary Parker,Scott Poe,Susan V. Vrbsky ā€Comparing
NoSQL MongoDB to an SQL DB ā€ C3S2E ā€™13
Proceedings of the International C* Conference on
Computer Science and Software Engineering Pages 14-
22 Porto, Portugal July 10 - 12, 2013
[4] A. Oussous, F. Z. Benjelloun, A. A. Lahcen, S. Belfkih,
ā€œComparison and Classification of NoSQL Databases
for Big Dataā€
[5] Aaron Schram, and Kenneth M. Anderson. ā€MySQL to
NoSQL: data modeling challenges in supporting
calability.ā€ In Proceedings of the 3rd annual conference
on Systems, programming, and applications: software
for humanity, pp. 191-202. ACM, 2012.
[6] R. Elmasri and S. Navathe, Fundamentals of Database
Systems. 7th ed., Chap. 23-24, Pearson Education,
2015.
[7] Josiah L. Carlson, Salvator Sanfilippo ā€œRedis in Actionā€
[8] Stonebreaker, M. 2010. SQL Databases v. NoSQL
Databases. Communications of the ACM, Vol. 25, No.
4, pp. 10-11.
[9] Itamar Haber ā€“ Redis as in-memory applications
cashe
243

More Related Content

What's hot

A STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQLA STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQLijscai
Ā 
the rising no sql technology
the rising no sql technologythe rising no sql technology
the rising no sql technologyINFOGAIN PUBLICATION
Ā 
The Rise of Nosql Databases
The Rise of Nosql DatabasesThe Rise of Nosql Databases
The Rise of Nosql DatabasesJAMES NGONDO
Ā 
Brief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehBrief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehFas (Feisal) Mosleh
Ā 
Key aspects of big data storage and its architecture
Key aspects of big data storage and its architectureKey aspects of big data storage and its architecture
Key aspects of big data storage and its architectureRahul Chaturvedi
Ā 
Infrastructure Considerations for Analytical Workloads
Infrastructure Considerations for Analytical WorkloadsInfrastructure Considerations for Analytical Workloads
Infrastructure Considerations for Analytical WorkloadsCognizant
Ā 
SSDs Deliver More at the Point-of-Processing
SSDs Deliver More at the Point-of-ProcessingSSDs Deliver More at the Point-of-Processing
SSDs Deliver More at the Point-of-ProcessingSamsung Business USA
Ā 
CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...
CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...
CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...ijcsit
Ā 
What is difference between dbms and rdbms
What is difference between dbms and rdbmsWhat is difference between dbms and rdbms
What is difference between dbms and rdbmsAfrasiyab Haider
Ā 
Ijaprr vol1-2-6-9naseer
Ijaprr vol1-2-6-9naseerIjaprr vol1-2-6-9naseer
Ijaprr vol1-2-6-9naseerijaprr_editor
Ā 
Data warehouse 2.0 and sql server architecture and vision
Data warehouse 2.0 and sql server architecture and visionData warehouse 2.0 and sql server architecture and vision
Data warehouse 2.0 and sql server architecture and visionKlaudiia Jacome
Ā 
Why no sql_ibm_cloudant
Why no sql_ibm_cloudantWhy no sql_ibm_cloudant
Why no sql_ibm_cloudantPeter Tutty
Ā 
A Brief Introduction: MongoDB
A Brief Introduction: MongoDBA Brief Introduction: MongoDB
A Brief Introduction: MongoDBDATAVERSITY
Ā 
Building a data warehouse of call data records
Building a data warehouse of call data recordsBuilding a data warehouse of call data records
Building a data warehouse of call data recordsDavid Walker
Ā 

What's hot (18)

A STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQLA STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQL
Ā 
the rising no sql technology
the rising no sql technologythe rising no sql technology
the rising no sql technology
Ā 
NoSQL Basics and MongDB
NoSQL Basics and  MongDBNoSQL Basics and  MongDB
NoSQL Basics and MongDB
Ā 
The Rise of Nosql Databases
The Rise of Nosql DatabasesThe Rise of Nosql Databases
The Rise of Nosql Databases
Ā 
NoSQL Basics - a quick tour
NoSQL Basics - a quick tourNoSQL Basics - a quick tour
NoSQL Basics - a quick tour
Ā 
Brief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas moslehBrief introduction to NoSQL by fas mosleh
Brief introduction to NoSQL by fas mosleh
Ā 
Key aspects of big data storage and its architecture
Key aspects of big data storage and its architectureKey aspects of big data storage and its architecture
Key aspects of big data storage and its architecture
Ā 
No sql3 rmoug
No sql3 rmougNo sql3 rmoug
No sql3 rmoug
Ā 
Infrastructure Considerations for Analytical Workloads
Infrastructure Considerations for Analytical WorkloadsInfrastructure Considerations for Analytical Workloads
Infrastructure Considerations for Analytical Workloads
Ā 
SSDs Deliver More at the Point-of-Processing
SSDs Deliver More at the Point-of-ProcessingSSDs Deliver More at the Point-of-Processing
SSDs Deliver More at the Point-of-Processing
Ā 
CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...
CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...
CYBER INFRASTRUCTURE AS A SERVICE TO EMPOWER MULTIDISCIPLINARY, DATA-DRIVEN S...
Ā 
Big data rmoug
Big data rmougBig data rmoug
Big data rmoug
Ā 
What is difference between dbms and rdbms
What is difference between dbms and rdbmsWhat is difference between dbms and rdbms
What is difference between dbms and rdbms
Ā 
Ijaprr vol1-2-6-9naseer
Ijaprr vol1-2-6-9naseerIjaprr vol1-2-6-9naseer
Ijaprr vol1-2-6-9naseer
Ā 
Data warehouse 2.0 and sql server architecture and vision
Data warehouse 2.0 and sql server architecture and visionData warehouse 2.0 and sql server architecture and vision
Data warehouse 2.0 and sql server architecture and vision
Ā 
Why no sql_ibm_cloudant
Why no sql_ibm_cloudantWhy no sql_ibm_cloudant
Why no sql_ibm_cloudant
Ā 
A Brief Introduction: MongoDB
A Brief Introduction: MongoDBA Brief Introduction: MongoDB
A Brief Introduction: MongoDB
Ā 
Building a data warehouse of call data records
Building a data warehouse of call data recordsBuilding a data warehouse of call data records
Building a data warehouse of call data records
Ā 

Similar to Redis Cashe is an open-source distributed in-memory data store.

Report 1.0.docx
Report 1.0.docxReport 1.0.docx
Report 1.0.docxpinstechwork
Ā 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sqlRam kumar
Ā 
Report 2.0.docx
Report 2.0.docxReport 2.0.docx
Report 2.0.docxpinstechwork
Ā 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxvvpadhu
Ā 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
Ā 
NOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfNOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfajajkhan16
Ā 
CS828 P5 Individual Project v101
CS828 P5 Individual Project v101CS828 P5 Individual Project v101
CS828 P5 Individual Project v101ThienSi Le
Ā 
No sql databases explained
No sql databases explainedNo sql databases explained
No sql databases explainedSalil Mehendale
Ā 
A Comparative Study of NoSQL and Relational Database.pdf
A Comparative Study of NoSQL and Relational Database.pdfA Comparative Study of NoSQL and Relational Database.pdf
A Comparative Study of NoSQL and Relational Database.pdfJennifer Roman
Ā 
1. introduction to no sql
1. introduction to no sql1. introduction to no sql
1. introduction to no sqlAnuja Gunale
Ā 
A Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQLA Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQLIJSCAI Journal
Ā 
A STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQLA STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQLijscai
Ā 
A Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQLA Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQLIJSCAI Journal
Ā 
Assignment_4
Assignment_4Assignment_4
Assignment_4Kirti J
Ā 
2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptxRushikeshChikane2
Ā 
Comparative study of no sql document, column store databases and evaluation o...
Comparative study of no sql document, column store databases and evaluation o...Comparative study of no sql document, column store databases and evaluation o...
Comparative study of no sql document, column store databases and evaluation o...ijdms
Ā 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSatya Pal
Ā 

Similar to Redis Cashe is an open-source distributed in-memory data store. (20)

Report 1.0.docx
Report 1.0.docxReport 1.0.docx
Report 1.0.docx
Ā 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
Ā 
Report 2.0.docx
Report 2.0.docxReport 2.0.docx
Report 2.0.docx
Ā 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
Ā 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
Ā 
Unit-10.pptx
Unit-10.pptxUnit-10.pptx
Unit-10.pptx
Ā 
Unit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docxUnit II -BIG DATA ANALYTICS.docx
Unit II -BIG DATA ANALYTICS.docx
Ā 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
Ā 
NOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfNOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdf
Ā 
CS828 P5 Individual Project v101
CS828 P5 Individual Project v101CS828 P5 Individual Project v101
CS828 P5 Individual Project v101
Ā 
No sql databases explained
No sql databases explainedNo sql databases explained
No sql databases explained
Ā 
A Comparative Study of NoSQL and Relational Database.pdf
A Comparative Study of NoSQL and Relational Database.pdfA Comparative Study of NoSQL and Relational Database.pdf
A Comparative Study of NoSQL and Relational Database.pdf
Ā 
1. introduction to no sql
1. introduction to no sql1. introduction to no sql
1. introduction to no sql
Ā 
A Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQLA Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQL
Ā 
A STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQLA STUDY ON GRAPH STORAGE DATABASE OF NOSQL
A STUDY ON GRAPH STORAGE DATABASE OF NOSQL
Ā 
A Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQLA Study on Graph Storage Database of NOSQL
A Study on Graph Storage Database of NOSQL
Ā 
Assignment_4
Assignment_4Assignment_4
Assignment_4
Ā 
2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx2.Introduction to NOSQL (Core concepts).pptx
2.Introduction to NOSQL (Core concepts).pptx
Ā 
Comparative study of no sql document, column store databases and evaluation o...
Comparative study of no sql document, column store databases and evaluation o...Comparative study of no sql document, column store databases and evaluation o...
Comparative study of no sql document, column store databases and evaluation o...
Ā 
Sql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explainedSql vs NO-SQL database differences explained
Sql vs NO-SQL database differences explained
Ā 

Recently uploaded

Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”soniya singh
Ā 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
Ā 
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...gurkirankumar98700
Ā 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
Ā 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
Ā 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
Ā 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
Ā 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
Ā 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
Ā 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
Ā 
办ē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·
办ē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·åŠžē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·
办ē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·umasea
Ā 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
Ā 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
Ā 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
Ā 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
Ā 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
Ā 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
Ā 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
Ā 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
Ā 
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...soniya singh
Ā 

Recently uploaded (20)

Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Naraina Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Ā 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
Ā 
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
Ā 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
Ā 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Ā 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
Ā 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
Ā 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
Ā 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
Ā 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
Ā 
办ē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·
办ē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·åŠžē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·
办ē†å­¦ä½čƁ(UQę–‡å‡­čƁ书)ę˜†å£«å…°å¤§å­¦ęƕäøščÆęˆē»©å•åŽŸē‰ˆäø€ęØ”äø€ę ·
Ā 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
Ā 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
Ā 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
Ā 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
Ā 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
Ā 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Ā 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Ā 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
Ā 
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Ā 

Redis Cashe is an open-source distributed in-memory data store.

  • 1. Database Cashing in-memory with Redis NoSQL Databases Artan Ajredini, Jaumin Ajdari Contemporary Sciences and Technologies, South East European University, Tetovo, Macedonia {j.ajdari, aa28294}@seeu.edu.mk Abstract Todayā€™s data is distributed by nature, the popularity of NoSQL databases using Redis has increased due to the need of processing vast amount of data faster than the relational database management systems (RDMS) by taking the advantage of highly scalable architecture. It examines the need of NoSQL and how they have become an important alternative to relational databases. The importance of Caching is a common technique that aims to improve the performance and scalability of a system. Caching is a technique used to accelerate application response times and help applications scale by placing frequently needed data very close to the application. Redis, an open source, in-memory, data structure server is frequently used as a distributed shared. In this paper we will present what Redis is and what cashing is methods to use cashing with NoSQL databases in modern applications, Moreover we will demonstrate the usage of object cashing in Redis. Keywords Key-Value Stores, Redis, Relational database, NoSQL. 1.INTRODUCTION In recent period, in-memory data processing is becoming more and more valuable as it is essential to examine a huge amount of information in shorter duration of time Working with large amount of data is always the problem in development and daily maintenance. If SQL is used to store that huge amount of data, it is impossible to process unpredictable and unstructured information. But social media network demands for an occurrence-oriented database that is very flexible and operates on a schema of less data- model. So SQL can not be fitted for this job. NoSQL, the ability to support large volume of read-write operations and store generic objects, such as JSON, simply contributes to data consistency in distributed system. This shows that NoSQL database is a great choice for processing big and unstructured data. Given the number of data, data access pattern and characteristics of social media, NoSQL has its own indispensable advantages. As a matter of fact, NoSQL has already been widely used in modern software development web- based applications and enterprise solutions. In recent period, in- memory data processing is becoming more and more valuable as it is essential to examine a huge amount of information in shorter duration of time. NoSQL has many benefits including simplicity of design, scalability of data model, concurrency control, consistency in storage, etc. Redis is an in-memory data structure store, remote database that offers high performance, is a flexible and open source. In this section, we will mainly review and demonstrate one of the most popular NoSQL databases. Redis is in-memory open source is used as cashe but is also a Database. and advanced key- value store database and if you want to store more data you need to have a large of capacity of ram, It may also be persistence so that the data you have on the ram is stored in a file.It is often referred as data structure server. When using an in-memory database like Redis, one of the first questions thatā€™s asked is ā€œWhat happens when my server gets turned off?ā€ Redis has two different forms of persistence available for writing in-memory data to disk in a compact format. 2.RELATED WORK In-memory data caching can be one of the most effective strategies for improving your overall application performance and reducing your database costs. Caching is a technique used to accelerate application response times and help applications scale by placing frequently needed data very close to the application. In modern computing environments, processes are run at different layers, from low-level processes that are embedded in the hardware to high-level abstractions, such as clusters. Redis, an open source, in-memory, data structure server is frequently used as a distributed shared cache (in addition to being used as a message broker or database) because it enables true statelessness for an applicationsā€™ processes, while reducing duplication of data or requests to external data sources. Redis have a wide usage in social media applications working on large amount of data. In present Big data processing, in-memory enumerate has become popular because to increase capacity and high throughput of main memory. When youā€™re building distributed applications that require low latency and scalability, disk-based databases can pose a number of challenges. A few common ones include the following: . 238
  • 2. However, the data retrieval speed from disk plus the added query processing times generally put your query response times in double- digit millisecond speeds, at best. This assumes that you have a steady load and your database is performing optimally. Cost to scale: Whether the data is distributed in a disk-based NoSQL database or vertically scaled up in a relational database, scaling for extremely high reads can be costly. It also can require several database read replicas to match what a single in-memory cache node can deliver in terms of requests per second. The need to simplify data access: Although relational databases provide an excellent means to data model relationships, they arenā€™t optimal for data access. There are instances where your applications may want to access the data in a particular structure or view to simplify data retrieval and increase application performance. Before implementing database caching, many architects and engineers spend great effort trying to extract as much performance as they can from their databases. However, there is a limit to the performance that you can achieve with a disk-based database, and itā€™s counterproductive to try to solve a problem with the wrong tools. For example, a large portion of the latency of your database query is dictated by the physics of retrieving data from disk Solely Redis cannot perform well in a real engineering project, but a combo of Redis and SQL, such as MySQL, would incredibly produce a nice teamwork. As previously mentioned, Redis is fast at IO speed, because of its ā€cachingā€ feature. MySQL is a popular relational SQL, which has a solid performance and active community. The obvious weakness of Redis is the limited amount of storage. Memory is not a ideal solution for storing a large amount of data. Generally speaking, the most common solution is that MySQL or other SQL database would act as the main data warehouse, meanwhile, Redis can be dedicated to areas that need more flexible and efficient performance. As to a real development project, usually only a small number of data are unstructured, because most of information of world is kind of in a certain structure. Additionally, cloud-computing is growing rapidly, and the local storage would be less essential in the future development. Maybe only the core program and data are running on the local server. If so, Redis will have a much larger role to play in development. Both relational and NoSQL databases are in-memory databases that provides different mechanism for data storage and retrieval. 2.1 NoSQL Database According to NoSQL data model, the data stores are grouped into four categories are key-value data stores, document stores, column- family stores and graph databases. Key-value store: The data are stored as key-value pairs. This data structure is also known as ā€œhash tableā€ where the data are retrieved by keys. Most well-known examples of key-value stores are Redis. Document store: The data are stored in collections that contain key- value pairs which encapsulate key value pairs in JSON (Javascript Object Notation) or JSON like documents Column family: The data are stored as a set of rows and columns where columns are grouped according to the relationship of data. Graph databases The graph databases are category of the NoSQL database, stores data in the form of a graph. In graph databases, the graph is made up of two things: nodes act as the entities or objects and edges act as the relationship between the entities or objects. 2.2 Redis 2.2.1 Key-Value Database Redis is usually known as a key-value database. Doesnā€™t it sound like hashmap, one of the most important data structure in computer science? Redis also has five major data structures, Set, Zset, List, Hash, String, which grant it a promising flexibility. Compared with SQL, even with other NoSQL, this group of data structures makes Redis stand out. Although this cool feature might be the specialty of Redis, it could also be difficult for developers. Some basic operations with redis: 2.2.2 Advantages of Redis comparing to Other NoSQL Unlike MongoDB, the unique data storing of Redis makes itself good at IO speed. Its data is stored in memory, therefore IO performance is guaranteed. However, memory is powerful, but expensive. It seems not realistic to store large amount of data in memory. Redis gives us its solution of optimization, EXPIRE key. ā€Set a timeout on key. After the timeout has expired, the key will automatically be deleted. A key with an associated timeout is often said to be volatile in Redis terminology.ā€1 As Redis official document describes, Redis can set a timeout on key, and the key would be deleted after a certain time. Running in memory is one largest difference, compared with other NoSQL.Relatively less data stored and blazing fast speed guarantee the efficiency of data landing. User could have quite a good experience by using Redis as back-end. Social media has a high demand on accessing speed, and the high concurrency becomes one toughest challenge for any social media website. Other NoSQL, like MongoDB, have their own suitable working areas, which perfect the function of relational database, so does Redis. Redis is great at caching, and working on a small a amount of data. However Redis is much more than a cache. 239
  • 3. 2.3 What is application cashe Once an application process uses an external data source, its performance can be bottlenecked by the throughput and latency of said data source. When a slower external data source is used, frequently accessed data is often moved temporarily to a faster storage that is closer to the application to boost the applicationā€™s performance. This faster intermediate data storage is called the applicationā€™s cache, a term originating from the French verb ā€œcacherā€ which means ā€œto hide.ā€ The following diagram shows the high-level architecture of an application cache: The cacheā€™s main purpose is to reduce the time needed to access data stored outside of the applicationā€™s main memory space. Additionally, caching is also an extremely powerful tool for scaling up external data sources and mitigating the effects that usage spikes have on them. An application-side cache effectively reduces all resource demands needed to serve data from external sources, thus freeing these resources for other uses. Without the use of a cache, the application interacts with the data source for every request, whereas when a cache is employed only a single request to the external data source is needed, with subsequent access served from the cache. Additionally, a cache also contributes to the applicationā€™s availability. External data sources may experience failures that result in degraded or terminated service. During such outages the cache can still serve data to the application and thus retain its availability. An applicationā€™s cache is intended for storing data that the applicationā€™s process requires rapidly during execution. Though each application is unique and can potentially store any kind of data in its cache, an application would typically use a cache for: Configuration settings: Information that the application requires to make bootstrapping and runtime decisions is often stored in relatively slow storage (such as text files on disk or a shared configuration repository). By keeping cached copies of these settings, the application can access the data with minimal latency. Localization and internationalization data: User-facing applications often provide localized variants of their interface to accommodate international audiences. Internationalization data is usually stored external to the application so it can be managed separately. Because this data is needed to serve most requests, caching it yields improvements in application response times. Templates and partially rendered responses: Many applications compose their replies by adding data to templates and pre-prepared content (such as HTML fragments and JSON snippets). Reusable results of compute-intensive functions: Sometimes an applicationā€™s workflow requires the generation of resource-intensive results. Once these results are obtained, there are cases in which the results could be later reused, such as when performing partial aggregates. The cache acts as an ideal intermediate medium for retaining such results between requests. Session data: Caching user session data is an integral part of building responsive applications that can scale. Because every user interaction requires access to the sessionā€™s data, keeping it in the cache ensures the fastest response times to the application user. Caching session data at the application level is superior to alternative methods. Keeping sessions sticky at the load balancer level, for example, practically forces all requests in a session to be processed by a single app server, while caching allows the requests to be processed by any app server without losing usersā€™ states. DBMS data: Most traditional databases are designed for providing robust functionality rather than speed at scale. The application cache is often used for storing copies of lookup tables and the replies to expensive queries from the DBMS, both to improve the applicationā€™s performance as well as to reduce the load of the data source. API responses: Modern applications are built using loosely coupled components that communicate via an API. An application component uses the API to make requests for service from other components, whether inside (e.g. in a microservices architecture) or outside (in a SaaS use case, for instance) the application itself. In cases where an APIā€™s reply can be stored in cache, even if only for a relatively short duration, the applicationā€™s performance is improved by avoiding the inter-process communication. Application objects: Any object that the application generates and that could be reused at a later time can be stored in the cache. The method for caching objects varies by application, but most caches allow storing both serialized as well as raw object data. A typical example of an often-cached application object is a user profile that is made up of data from multiple sources. 240
  • 4. 2.3.1 Cashe object with Redis In this paper, they mainly consider the method which improves the system performance by reading data more frequently from applications and also saves time. Implementation of methods is developed in Nodejs code in the backend provide applications program interface with the redis-client and redis-server.If we work with the system that all the time selling books it is a good idea that those items we get from the database to cashe in Redis in order to have faster access. Fig 1: Using Redis in-memory cashe bookstore in real example We will demonstrate another to get the data from Redis, and to display to the applications. Fig 2: Displaying the data in redis On the firs line of the code we want to add the book by id or genderId. this is one way how to implement indexing in redis. In this case if we every time we will change the name of the book it would be changed also the index. Fig 3: Working with models and object cashe in redis. To ose redis indexing it is necessary to define the model, in this case we have the model book, and to SetDefitions we need to define which are primary key and unique key. In our example we need to see how to use cashe in redis to get the data by genderId. Fig 4: Get the data by genderid first of all we need to go in redis to check if we will have store books, and then we wil e retrive the books. if we don't have we need to go in mongodb to get the books in this case. 2.3.2 SQL Cooperated With Redis Redis cannot perform well in a real engineering project, but a combo of Redis and SQL, such as MySQL, would incredibly produce a nice teamwork. As previously mentioned, Redis is fast at IO speed, because of its ā€cachingā€ feature. MySQL is a popular relational SQL, which has a solid performance and active community. As to a real development project, usually only a small number of data are unstructured, because most of information of world is kind of in a certain structure. Additionally, cloud-computing is growing rapidly, and the local storage would be less essential in the future development. Maybe only the core program and data are running on the local server. If so, Redis will have a much larger role to play in development. Redis has several popular applications in social media nowadays. Moreover, Big Data would be the next breaking point of NoSQL.
  • 5. 3. CONCLUSION In this paper, they make use of an in-memory key-value data storage system is Redis which works on a large data. Redis is blazing fast in speed on reading process as compared to the relational database. The major problem is a previous Client Server framework gives poor execution on read and write process regarding throughput and latency since all servers utilize their own particular memory to deal with the whole procedure, which is time consuming. NoSQL will be playing a important role in the future development, and has got increasing attention from giant companies and startup. Both academia and industry give a high evaluation of the future of NoSQL. Undoubtedly, NoSQL is not aimed at replacing SQL totally, but assisting relational database work better. Other than this, NoSQL may exploit a definitely new area. Ultimately, we shall always believe the wheel of technology is moving forward. 242
  • 6. REFERENCES [1] Cattell, R., 2011. Scalable SQL and NoSQL data stores. Acm Sigmod Record, 39(4), pp. 12-27. . [2] DeZyre ā€NoSQL vs SQL- 4 Reasons Why NoSQL is better for Big Data applicationsā€ https://www.dezyre.com/article/nosql-vs-sql-4- reasonswhy-nosql-is-better-for-big-data-applications/86 19 Mar 2015 [3] Zachary Parker,Scott Poe,Susan V. Vrbsky ā€Comparing NoSQL MongoDB to an SQL DB ā€ C3S2E ā€™13 Proceedings of the International C* Conference on Computer Science and Software Engineering Pages 14- 22 Porto, Portugal July 10 - 12, 2013 [4] A. Oussous, F. Z. Benjelloun, A. A. Lahcen, S. Belfkih, ā€œComparison and Classification of NoSQL Databases for Big Dataā€ [5] Aaron Schram, and Kenneth M. Anderson. ā€MySQL to NoSQL: data modeling challenges in supporting calability.ā€ In Proceedings of the 3rd annual conference on Systems, programming, and applications: software for humanity, pp. 191-202. ACM, 2012. [6] R. Elmasri and S. Navathe, Fundamentals of Database Systems. 7th ed., Chap. 23-24, Pearson Education, 2015. [7] Josiah L. Carlson, Salvator Sanfilippo ā€œRedis in Actionā€ [8] Stonebreaker, M. 2010. SQL Databases v. NoSQL Databases. Communications of the ACM, Vol. 25, No. 4, pp. 10-11. [9] Itamar Haber ā€“ Redis as in-memory applications cashe 243