mastering redis a primer
DESCRIPTION
Mastering Redis A Primer. Data Masters. Special Thanks To…. Planet Linux Caffe http :// planetlinuxcaffe.com. Short bio about me… Andrew Simkovsky 15 years working with database technology Worked across many industries Why Data Masters? Used to be a certification instructor – I miss it! - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/1.jpg)
Mastering RedisA Primer
Data Masters
![Page 2: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/2.jpg)
Special Thanks To…
Planet Linux Caffehttp://planetlinuxcaffe.com
![Page 3: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/3.jpg)
Short bio about me… Andrew Simkovsky 15 years working with database technology Worked across many industries
Why Data Masters? Used to be a certification instructor – I miss
it! Sharing knowledge Fostering a community
![Page 5: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/5.jpg)
Redis - Concept
What it is “NoSQL” Key-value store In-memory
What it’s not Definitely not “relational” Denormalization is your friend
![Page 6: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/6.jpg)
Redis - Uses
Caching session data Processing data at high speeds Real-time data feeds
![Page 7: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/7.jpg)
Where Do I Get It?
www.redis.io
![Page 8: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/8.jpg)
Types of Data
![Page 9: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/9.jpg)
Types of Data Keys Strings Hashes Lists Sets Sorted Sets Queue
![Page 10: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/10.jpg)
Types of Data - Keys Identifier – to find your data Converted to physical address in memory Key can be any string of characters you want
123456document:789456
![Page 11: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/11.jpg)
Types of Data
Stringsperson:12345 Joe
Hashesuser:1000 username smith password
p4ssw0rd9 age 34
Listsfriends:1000 123 897 567 891
![Page 12: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/12.jpg)
Types of Data Sets
friends:1000 123 897 567 891 Sorted Sets
scores:1000 123/500 567/600 891/700 897/800 Another view
scores:1000123 / 500567 / 600891 / 700897 / 800
![Page 13: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/13.jpg)
Types of Data
Queue Publisher queue Subscriber First-in, first-out (FIFO)
![Page 14: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/14.jpg)
Interacting With Redis
Command-line toolredis-cli
Redis Commandshttp://redis.io/commands
Transactions Server-side scripting via Lua
![Page 15: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/15.jpg)
Programming Clients ActionScript C, C#, C++,
Obj-C Clojure Common Lisp D Dart
Erlang Go Java Lua Node.js Perl PHP
Pure Data Python Ruby Scala Tcl
Full list at: www.redis.io/clients
![Page 16: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/16.jpg)
Replication Redis can support Master->Slave replication Write to one master, keeps one or more slaves up
to dateMaste
r
Slave Slave Slave
![Page 17: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/17.jpg)
Where’s the Bad and the Ugly?
![Page 18: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/18.jpg)
Persistence
Redis is primarily an in-memory database It is not really a “persistence” engine All your data must fit in memory Can configure persistence, but its not true
long-term storage Persistence is only for crash recovery
![Page 19: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/19.jpg)
Interactive Tutorial
http://try.redis.io
![Page 20: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/20.jpg)
Live Demo!
![Page 21: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/21.jpg)
Installation
Red Hat / RPM-based systems (Red Hat, CentOS, Fedora) Yum install, exists in most of the basic yum repositoriesyum install redis
Debian-based systems (Ubuntu) Aptitude install, exists in most apt repositories
apt-get install redis
Zip file download from redis.io
![Page 22: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/22.jpg)
Configure And Start
Config file: /etc/redis.conf Start/stop uses service command:
service redis [ start | stop | restart | status]
![Page 23: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/23.jpg)
Installing Yum Repository Redis.io: Only source code Get Yum repository from FedoraProject.org – Extra
Packages for Enteprise Linux:http://fedoraproject.org/wiki/EPEL
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmyum install redis
![Page 24: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/24.jpg)
Welcome To The Machine!!
You are not supposed to be here… Go watch the live demo!!
![Page 25: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/25.jpg)
Questions?
![Page 26: Mastering Redis A Primer](https://reader030.vdocument.in/reader030/viewer/2022020717/5681685f550346895ddea3c3/html5/thumbnails/26.jpg)
Thank You For Coming!
Please rate this Meet Up:www.meetup.com/data-masters
(or go there to join!)Check out my blog and forums:
www.dbtekpro.comAfter Party!!
Miller’s Ale HouseMiracle Mile