17
Redis and Redis with .NET How to operate with Redis Databases Telerik Software Academy http://academy.telerik.com Databases

Redis and Redis with .NET

Embed Size (px)

DESCRIPTION

Redis and Redis with .NET. How to operate with Redis Databases. Telerik Software Academy. http://academy.telerik.com. Databases. Redis. Ultra-Fast Data Structures Server. What is Redis?. Redis is Ultra-fast in-memory key-value data store Powerful data structures server - PowerPoint PPT Presentation

Citation preview

Page 1: Redis and Redis with .NET

Redis and Redis with .NET

How to operate with Redis Databases

Telerik Software Academyhttp://academy.telerik.com

Databases

Page 2: Redis and Redis with .NET

RedisUltra-Fast Data Structures Server

Page 3: Redis and Redis with .NET

What is Redis? Redis is

Ultra-fast in-memory key-value data store

Powerful data structures server

Open-source software: http://redis.io

Redis stores data structures: Strings

Lists

Hash tables

Sets / sorted sets

3

Page 4: Redis and Redis with .NET

Installing Redis

To install Redis on Linux/Mac OSX: Download from http://

redis.io/download

Run it

To install Redis on Windows: Download https://

github.com/MSOpenTech/redis

Open the solution in the msvs folder and build it with VS

Or use Package manager s Chocolatey

http://chocolatey.org/

Page 5: Redis and Redis with .NET

Installing and Building a Redis

ServerLive Demo

Page 6: Redis and Redis with .NET

Working with Redis and the .NET API

Page 7: Redis and Redis with .NET

Working with Redis and .NET

Install the Redis Client of ServiceStack.Net Free and intuitive to use

Run in VS console

Then:

Install-Package ServiceStack.Redis

var redis = new RedisClient(host);var redisLogs = redis.As<Log>();redisLogs.Store(newTodo);redisLogs.GetAll() .Print();

Page 8: Redis and Redis with .NET

Using Redis with .NET

Live Demo

Page 9: Redis and Redis with .NET

Redis Clients

Page 10: Redis and Redis with .NET

Redis Clients The ServiceStack Redis API provides three different clients to work with the data: IRedisNativeClient

IRedisClient

IRedisTypedClient

IRedisNativeClient client = new RedisClient()

IRedisClient client = new RedisClient()

RedisClient client = new RedisClient()

Page 11: Redis and Redis with .NET

Redis ClientsLive Demo

Page 12: Redis and Redis with .NET

Database Persistence

Page 13: Redis and Redis with .NET

Redis Persistence Redis runs in the memory

That is the reason to be that fast

Redis saves the data on the disk at a given period By default:

save 900 1 // 1 key for 900 secondssave 300 10 //10 keys for 300 secondssave 60 10000 // 10000 keys for 60 seconds

Page 14: Redis and Redis with .NET

Database Persistence

Live Demo

Page 15: Redis and Redis with .NET

форум програмиране, форум уеб дизайнкурсове и уроци по програмиране, уеб дизайн – безплатно

програмиране за деца – безплатни курсове и уроцибезплатен SEO курс - оптимизация за търсачки

уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop

уроци по програмиране и уеб дизайн за ученициASP.NET MVC курс – HTML, SQL, C#, .NET, ASP.NET MVC

безплатен курс "Разработка на софтуер в cloud среда"

BG Coder - онлайн състезателна система - online judge

курсове и уроци по програмиране, книги – безплатно от Наков

безплатен курс "Качествен програмен код"

алго академия – състезателно програмиране, състезания

ASP.NET курс - уеб програмиране, бази данни, C#, .NET, ASP.NETкурсове и уроци по програмиране – Телерик академия

курс мобилни приложения с iPhone, Android, WP7, PhoneGap

free C# book, безплатна книга C#, книга Java, книга C#Дончо Минков - сайт за програмиранеНиколай Костов - блог за програмиранеC# курс, програмиране, безплатно

?

? ? ??

?? ?

?

?

?

??

?

?

? ?

Questions?

?

Redis and Redis with .NET

http://academy.telerik.com

Page 16: Redis and Redis with .NET

Homework No homework

Page 17: Redis and Redis with .NET

Free Trainings @ Telerik Academy

Telerik School Academy schoolacademy.telerik.com

Telerik Software Academy academy.telerik.com

Telerik Academy @ Facebook facebook.com/TelerikAcademy

Telerik Software Academy Forums forums.academy.telerik.com