1 / 17

Redis and Redis with .NET

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

Télécharger la présentation

Redis and Redis with .NET

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. Redis and Redis with .NET How to operate with Redis Databases Telerik Software Academy http://academy.telerik.com Databases

  2. Redis Ultra-Fast Data Structures Server

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

  4. 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 msvsfolder and build it with VS • Or use Package manager s Chocolatey • http://chocolatey.org/

  5. Installing and Building a Redis Server Live Demo

  6. Working with Redis and the .NET API

  7. Working with Redis and .NET • Install the Redis Client of ServiceStack.Net • Free and intuitive to use • Run in VS console • Then: Install-PackageServiceStack.Redis varredis = new RedisClient(host); varredisLogs = redis.As<Log>(); redisLogs.Store(newTodo); redisLogs.GetAll() .Print();

  8. Using Redis with .NET Live Demo

  9. Redis Clients

  10. Redis Clients • The ServiceStack Redis API provides three different clients to work with the data: • IRedisNativeClient • IRedisClient • IRedisTypedClient IRedisNativeClientclient = new RedisClient() IRedisClient client = new RedisClient() RedisClient client = new RedisClient()

  11. Redis Clients Live Demo

  12. Database Persistence

  13. 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 seconds save 300 10 //10 keys for 300 seconds save 60 10000 // 10000 keys for 60 seconds

  14. Database Persistence Live Demo

  15. Redis and Redis with .NET http://academy.telerik.com

  16. Homework • No homework

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

More Related