SlideShare a Scribd company logo
1 of 16
Seattle Data Science And Data Engineering Meetup
Abhishek Goswami.
11/29/2016
abgoswam@gmail.com
https://www.linkedin.com/in/abgoswam
Table Of Content
Introduction
What is Redis
Redis Features
Demos.
Internals
HyperLogLog
Pub / Sub
Persistence
Replication
Transactions
Source Code
Summary, Q&A
2
● Introduction
○ What is Redis?
○ Redis Features
○ Demos
● Internals
● Summary, Q&A
3
Introduction: What is Redis?
4
Data Structures Server
Redis provides access to mutable data structures via a set of commands
Sent using a server-client model with TCP sockets and a simple protocol
Introduction: Redis Features
5 Data Types :
Strings
Hashes
Lists
Sets
Sorted Sets
5
Additional Functionality :
HyperLogLog
Pub / Sub
Persistence
Replication
Transactions
Scripting
Security
Special Properties
● Data Structures are served and modified into the server
memory. Redis also persists it on disk
○ This means that Redis is fast, but that is also non-
volatile.
● Data structures stress on memory efficiency
○ So data structures inside Redis will likely use less
memory compared to the same data structure modeled
using an high level programming language
● Replication, tunable levels of durability, cluster, high
availability
Introduction: Demos
6
● Introduction
● Internals
○ HyperLogLog
○ Pub / Sub
○ Persistence
○ Replication
○ Transactions
○ Source Code
● Summary, Q&A
7
Introduction: HyperLogLog
An approximation algorithm.
Provides an approximation of the number of unique elements in a set
Features
Uses a very small amount of memory
Standard error of 0.81%
No limit to the number of items you can count, unless you approach 264 items
Trick : Uses randomization
References:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.142.9475
https://www.linkedin.com/pulse/20141023230346-21057249-a-must-know-for-data-scientists-
hyperloglog-algorithm
http://blog.notdot.net/2012/09/Dam-Cool-Algorithms-Cardinality-Estimation
8
Introduction: Publish / Subscribe
Messaging System
Senders (in redis terminology called publishers) sends the messages while receivers
(subscribers) receive them
The link by which messages are transferred is called channel.
Couple of limitations
System Reliability (older versions)
Data Transmission Reliability
9
Internals: Persistence
10
In-memory data persisted to disk
Two different ways of persisting data to disk:
Snapshotting:
Take data as it exists at one moment and write it to disk
AOF (Append Only File)
Copy incoming write commands to disk as they happen
These methods can be used together, separately, or not at all in some circumstances.
Internals: Replication
11
Keep up-to-date copies of your data on additional machines
Other servers receive a continuously updated copy of the data as it’s being written
Two primary purposes of replication :
Availability
Replacement for Failed Master
Performance
Scalability of Reads
By combining replication and append-only files, we can configure Redis to be resilient against
system failures.
Internals: Transactions
12
Redis transactions allow the execution of a group of commands in a single step.
Two properties of Redis Transactions:
Sequential Execution
All commands in a transaction are sequentially executed as a single isolated operation. It is
not possible that a request issued by another client is served in the middle of the
execution of a Redis transaction
Atomic
Either all of the commands or none are processed.
Internals: Source Code
Github Repo
https://github.com/antirez/redis
Important Directories:
src: contains the Redis implementation, written in C.
tests: contains the unit tests, implemented in Tcl.
deps: contains libraries Redis uses.
Important Files:
server.h
server.c
networking.c
13
server.c
int main(int argc, char **argv) {
struct timeval tv;
int j;
...
initServer();
...
aeSetBeforeSleepProc(server.el,beforeSleep);
aeMain(server.el);
aeDeleteEventLoop(server.el);
return 0;
}
● Introduction
● Internals
● Summary, Q&A
14
Summary
15
A tool to solve problems.
Thinking about data-driven problems moves from “How can I bend my idea to fit into the world of
tables and rows?” to “Which structures in Redis will result in an easier-to-maintain solution?”
Has some unique structures and functionality that no other database offers
Redis is in-memory (making it fast), remote (making it accessible to multiple clients/servers),
persistent (giving you the opportunity to keep data between reboots), and scalable (via slaving
and sharding).
Scaling any system can be a challenge.
Q&A
16
References:
1. https://redislabs.com/ebook/redis-in-action
2. https://redis.io/documentation
3. https://pauladamsmith.com/articles/redis-under-the-hood.html
4. https://github.com/antirez/redis
5. https://www.tutorialspoint.com/redis/index.htm
abgoswam@gmail.com
https://www.linkedin.com/in/abgoswam

More Related Content

What's hot

Gluster intro-tdose
Gluster intro-tdoseGluster intro-tdose
Gluster intro-tdoseGluster.org
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster.org
 
Version Control - Hem Shrestha
Version Control - Hem ShresthaVersion Control - Hem Shrestha
Version Control - Hem ShresthaHem Shrestha
 
GlusterFS Presentation FOSSCOMM2013 HUA, Athens, GR
GlusterFS Presentation FOSSCOMM2013 HUA, Athens, GRGlusterFS Presentation FOSSCOMM2013 HUA, Athens, GR
GlusterFS Presentation FOSSCOMM2013 HUA, Athens, GRTheophanis Kontogiannis
 
State of the_gluster_-_lceu
State of the_gluster_-_lceuState of the_gluster_-_lceu
State of the_gluster_-_lceuGluster.org
 
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vosOSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vosNETWAYS
 
20160401 Gluster-roadmap
20160401 Gluster-roadmap20160401 Gluster-roadmap
20160401 Gluster-roadmapGluster.org
 
Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Gluster.org
 
Solution Manager in Denodo Platform 7.0: Admin Made Simple
Solution Manager in Denodo Platform 7.0: Admin Made SimpleSolution Manager in Denodo Platform 7.0: Admin Made Simple
Solution Manager in Denodo Platform 7.0: Admin Made SimpleDenodo
 
Developing apps and_integrating_with_gluster_fs_-_libgfapi
Developing apps and_integrating_with_gluster_fs_-_libgfapiDeveloping apps and_integrating_with_gluster_fs_-_libgfapi
Developing apps and_integrating_with_gluster_fs_-_libgfapiGluster.org
 
Disperse xlator ramon_datalab
Disperse xlator ramon_datalabDisperse xlator ramon_datalab
Disperse xlator ramon_datalabGluster.org
 
On demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandOn demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandGluster.org
 
Leases and-caching final
Leases and-caching finalLeases and-caching final
Leases and-caching finalGluster.org
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Giuseppe Paterno'
 
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized StoreGlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized StoreAtin Mukherjee
 

What's hot (19)

Gluster intro-tdose
Gluster intro-tdoseGluster intro-tdose
Gluster intro-tdose
 
Google File System
Google File SystemGoogle File System
Google File System
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmap
 
Version Control - Hem Shrestha
Version Control - Hem ShresthaVersion Control - Hem Shrestha
Version Control - Hem Shrestha
 
GlusterFS Presentation FOSSCOMM2013 HUA, Athens, GR
GlusterFS Presentation FOSSCOMM2013 HUA, Athens, GRGlusterFS Presentation FOSSCOMM2013 HUA, Athens, GR
GlusterFS Presentation FOSSCOMM2013 HUA, Athens, GR
 
State of the_gluster_-_lceu
State of the_gluster_-_lceuState of the_gluster_-_lceu
State of the_gluster_-_lceu
 
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vosOSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
OSBConf 2015 | Scale out backups with bareos and gluster by niels de vos
 
20160401 Gluster-roadmap
20160401 Gluster-roadmap20160401 Gluster-roadmap
20160401 Gluster-roadmap
 
Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Join the super_colony_-_feb2013
Join the super_colony_-_feb2013
 
YDAL Barcelona
YDAL BarcelonaYDAL Barcelona
YDAL Barcelona
 
Solution Manager in Denodo Platform 7.0: Admin Made Simple
Solution Manager in Denodo Platform 7.0: Admin Made SimpleSolution Manager in Denodo Platform 7.0: Admin Made Simple
Solution Manager in Denodo Platform 7.0: Admin Made Simple
 
Developing apps and_integrating_with_gluster_fs_-_libgfapi
Developing apps and_integrating_with_gluster_fs_-_libgfapiDeveloping apps and_integrating_with_gluster_fs_-_libgfapi
Developing apps and_integrating_with_gluster_fs_-_libgfapi
 
Disperse xlator ramon_datalab
Disperse xlator ramon_datalabDisperse xlator ramon_datalab
Disperse xlator ramon_datalab
 
Gluster d2
Gluster d2Gluster d2
Gluster d2
 
On demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandOn demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brand
 
Leases and-caching final
Leases and-caching finalLeases and-caching final
Leases and-caching final
 
Main Groups of Microservices
Main Groups of MicroservicesMain Groups of Microservices
Main Groups of Microservices
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2
 
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized StoreGlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
 

Similar to Redis. Seattle Data Science and Data Engineering Meetup

Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to RedisArnab Mitra
 
RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...
RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...
RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...Redis Labs
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsRedis Labs
 
An Introduction to Redis for .NET Developers.pdf
An Introduction to Redis for .NET Developers.pdfAn Introduction to Redis for .NET Developers.pdf
An Introduction to Redis for .NET Developers.pdfStephen Lorello
 
Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016
Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016
Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016MLconf
 
The Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud FoundryThe Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud FoundryVMware Tanzu
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance OptimizationKnoldus Inc.
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Redis Labs
 
S3 l5 db2 - process model
S3 l5   db2 - process modelS3 l5   db2 - process model
S3 l5 db2 - process modelMohammad Khan
 
Scaling Redis: Dmitry Polyakovsky
Scaling Redis: Dmitry PolyakovskyScaling Redis: Dmitry Polyakovsky
Scaling Redis: Dmitry PolyakovskyRedis Labs
 
Redis and its Scaling and Obersvability
Redis and its Scaling and ObersvabilityRedis and its Scaling and Obersvability
Redis and its Scaling and ObersvabilityAbhishekDubey902839
 
EN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdfEN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdfArnaudMorvillier1
 
Redis as a Cache Boosting Performance and Scalability
Redis as a Cache Boosting Performance and ScalabilityRedis as a Cache Boosting Performance and Scalability
Redis as a Cache Boosting Performance and ScalabilityInexture Solutions
 
Hadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologiesHadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologiesKelly Technologies
 

Similar to Redis. Seattle Data Science and Data Engineering Meetup (20)

Redis meetup
Redis meetupRedis meetup
Redis meetup
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
Redis by-hari
Redis by-hariRedis by-hari
Redis by-hari
 
RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...
RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...
RedisConf17 - Redis Enterprise: Continuous Availability, Unlimited Scaling, S...
 
What's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis LabsWhat's new with enterprise Redis - Leena Joshi, Redis Labs
What's new with enterprise Redis - Leena Joshi, Redis Labs
 
An Introduction to Redis for .NET Developers.pdf
An Introduction to Redis for .NET Developers.pdfAn Introduction to Redis for .NET Developers.pdf
An Introduction to Redis for .NET Developers.pdf
 
Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016
Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016
Arun Rathinasabapathy, Senior Software Engineer, LexisNexis at MLconf ATL 2016
 
The Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud FoundryThe Fastest Way to Redis on Pivotal Cloud Foundry
The Fastest Way to Redis on Pivotal Cloud Foundry
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance Optimization
 
Redis overview
Redis overviewRedis overview
Redis overview
 
Redis vs Memcached
Redis vs MemcachedRedis vs Memcached
Redis vs Memcached
 
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
Moving Beyond Cache by Yiftach Shoolman Redis Labs - Redis Day Seattle 2020
 
S3 l5 db2 - process model
S3 l5   db2 - process modelS3 l5   db2 - process model
S3 l5 db2 - process model
 
Scaling Redis: Dmitry Polyakovsky
Scaling Redis: Dmitry PolyakovskyScaling Redis: Dmitry Polyakovsky
Scaling Redis: Dmitry Polyakovsky
 
EQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdfEQUNIX - PPT 11DB-Postgres™.pdf
EQUNIX - PPT 11DB-Postgres™.pdf
 
Redis and its Scaling and Obersvability
Redis and its Scaling and ObersvabilityRedis and its Scaling and Obersvability
Redis and its Scaling and Obersvability
 
EN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdfEN - Azure - Cache for Redis.pdf
EN - Azure - Cache for Redis.pdf
 
paper
paperpaper
paper
 
Redis as a Cache Boosting Performance and Scalability
Redis as a Cache Boosting Performance and ScalabilityRedis as a Cache Boosting Performance and Scalability
Redis as a Cache Boosting Performance and Scalability
 
Hadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologiesHadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologies
 

Recently uploaded

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]📊 Markus Baersch
 

Recently uploaded (20)

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]GA4 Without Cookies [Measure Camp AMS]
GA4 Without Cookies [Measure Camp AMS]
 

Redis. Seattle Data Science and Data Engineering Meetup

  • 1. Seattle Data Science And Data Engineering Meetup Abhishek Goswami. 11/29/2016 abgoswam@gmail.com https://www.linkedin.com/in/abgoswam
  • 2. Table Of Content Introduction What is Redis Redis Features Demos. Internals HyperLogLog Pub / Sub Persistence Replication Transactions Source Code Summary, Q&A 2
  • 3. ● Introduction ○ What is Redis? ○ Redis Features ○ Demos ● Internals ● Summary, Q&A 3
  • 4. Introduction: What is Redis? 4 Data Structures Server Redis provides access to mutable data structures via a set of commands Sent using a server-client model with TCP sockets and a simple protocol
  • 5. Introduction: Redis Features 5 Data Types : Strings Hashes Lists Sets Sorted Sets 5 Additional Functionality : HyperLogLog Pub / Sub Persistence Replication Transactions Scripting Security Special Properties ● Data Structures are served and modified into the server memory. Redis also persists it on disk ○ This means that Redis is fast, but that is also non- volatile. ● Data structures stress on memory efficiency ○ So data structures inside Redis will likely use less memory compared to the same data structure modeled using an high level programming language ● Replication, tunable levels of durability, cluster, high availability
  • 7. ● Introduction ● Internals ○ HyperLogLog ○ Pub / Sub ○ Persistence ○ Replication ○ Transactions ○ Source Code ● Summary, Q&A 7
  • 8. Introduction: HyperLogLog An approximation algorithm. Provides an approximation of the number of unique elements in a set Features Uses a very small amount of memory Standard error of 0.81% No limit to the number of items you can count, unless you approach 264 items Trick : Uses randomization References: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.142.9475 https://www.linkedin.com/pulse/20141023230346-21057249-a-must-know-for-data-scientists- hyperloglog-algorithm http://blog.notdot.net/2012/09/Dam-Cool-Algorithms-Cardinality-Estimation 8
  • 9. Introduction: Publish / Subscribe Messaging System Senders (in redis terminology called publishers) sends the messages while receivers (subscribers) receive them The link by which messages are transferred is called channel. Couple of limitations System Reliability (older versions) Data Transmission Reliability 9
  • 10. Internals: Persistence 10 In-memory data persisted to disk Two different ways of persisting data to disk: Snapshotting: Take data as it exists at one moment and write it to disk AOF (Append Only File) Copy incoming write commands to disk as they happen These methods can be used together, separately, or not at all in some circumstances.
  • 11. Internals: Replication 11 Keep up-to-date copies of your data on additional machines Other servers receive a continuously updated copy of the data as it’s being written Two primary purposes of replication : Availability Replacement for Failed Master Performance Scalability of Reads By combining replication and append-only files, we can configure Redis to be resilient against system failures.
  • 12. Internals: Transactions 12 Redis transactions allow the execution of a group of commands in a single step. Two properties of Redis Transactions: Sequential Execution All commands in a transaction are sequentially executed as a single isolated operation. It is not possible that a request issued by another client is served in the middle of the execution of a Redis transaction Atomic Either all of the commands or none are processed.
  • 13. Internals: Source Code Github Repo https://github.com/antirez/redis Important Directories: src: contains the Redis implementation, written in C. tests: contains the unit tests, implemented in Tcl. deps: contains libraries Redis uses. Important Files: server.h server.c networking.c 13 server.c int main(int argc, char **argv) { struct timeval tv; int j; ... initServer(); ... aeSetBeforeSleepProc(server.el,beforeSleep); aeMain(server.el); aeDeleteEventLoop(server.el); return 0; }
  • 15. Summary 15 A tool to solve problems. Thinking about data-driven problems moves from “How can I bend my idea to fit into the world of tables and rows?” to “Which structures in Redis will result in an easier-to-maintain solution?” Has some unique structures and functionality that no other database offers Redis is in-memory (making it fast), remote (making it accessible to multiple clients/servers), persistent (giving you the opportunity to keep data between reboots), and scalable (via slaving and sharding). Scaling any system can be a challenge.
  • 16. Q&A 16 References: 1. https://redislabs.com/ebook/redis-in-action 2. https://redis.io/documentation 3. https://pauladamsmith.com/articles/redis-under-the-hood.html 4. https://github.com/antirez/redis 5. https://www.tutorialspoint.com/redis/index.htm abgoswam@gmail.com https://www.linkedin.com/in/abgoswam