1 / 26

Mastering Redis A Primer

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!

joben
Download Presentation

Mastering Redis A Primer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mastering RedisA Primer Data Masters

  2. Special Thanks To… Planet Linux Caffe http://planetlinuxcaffe.com

  3. 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

  4. DBTekPro www.dbtekpro.com andrew@dbtekpro.com @asimkovsky

  5. Redis - Concept • What it is • “NoSQL” • Key-value store • In-memory • What it’s not • Definitely not “relational” • Denormalization is your friend

  6. Redis - Uses • Caching session data • Processing data at high speeds • Real-time data feeds

  7. Where Do I Get It? www.redis.io

  8. Types of Data

  9. Types of Data • Keys • Strings • Hashes • Lists • Sets • Sorted Sets • Queue

  10. Types of Data - Keys • Identifier – to find your data • Converted to physical address in memory • Key can be any string of characters you want 123456 document:789456

  11. Types of Data • Strings person:12345 Joe • Hashes user:1000 username smith password p4ssw0rd9 age 34 • Lists friends:1000 123 897 567 891

  12. 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:1000 123 / 500 567 / 600 891 / 700 897 / 800

  13. Types of Data • Queue • Publisher  queue Subscriber • First-in, first-out (FIFO)

  14. Interacting With Redis • Command-line tool redis-cli • Redis Commands http://redis.io/commands • Transactions • Server-side scripting via Lua

  15. 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

  16. Replication • Redis can support Master->Slave replication • Write to one master, keeps one or more slaves up to date Master Slave Slave Slave

  17. Where’s the Bad and the Ugly?

  18. 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

  19. Interactive Tutorial http://try.redis.io

  20. Live Demo!

  21. Installation • Red Hat / RPM-based systems (Red Hat, CentOS, Fedora) • Yum install, exists in most of the basic yum repositories yum install redis • Debian-based systems (Ubuntu) • Aptitude install, exists in most apt repositories apt-get install redis • Zip file download from redis.io

  22. Configure And Start • Configfile: /etc/redis.conf • Start/stop uses service command: • service redis [ start | stop | restart | status]

  23. 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.rpm yum install redis

  24. Welcome To The Machine!! You are not supposed to be here… Go watch the live demo!!

  25. Questions?

  26. 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.com After Party!! Miller’s Ale House Miracle Mile

More Related