-
Notifications
You must be signed in to change notification settings - Fork 876
Home
This index hopes to provide a good starting page to find information about the ServiceStack's Open Source C# Redis Client.
The Redis Client runs on Windows with .NET and Linux with Mono. Included as part of ServiceStack is:
- IRedisNativeClient -A low-level API that provides raw byte access to a Redis server. Each method maps to 1:1 to a Redis operation of the same name.
- IRedisClient - A friendly, more descriptive API implemented by the ServiceStack.Redis client that provides access to key values as strings (or collection of strings for Redis lists and sets).
- IRedisTypedClient - A high-level 'strongly-typed' API available on Service Stack's C# Redis Client to make all Redis Value operations to apply against any c# type. Where all complex types are transparently serialized to JSON using ServiceStack JsonSerializer - The fastest JSON Serializer for .NET.
- Thread-safe
BasicRedisClientManager
andPooledRedisClientManager
connection pooling implementations which plugs nicely in your local IOC and is useful when talking to Redis inside an ASP.NET application or Windows Service.
Links the the latest packages are available on the home page. Alternatively view all releases on the projects downloads page.
If you are new to Redis (or NoSQL in general) I recommend the following resources:
- Useful Links about Redis
-
Designing a Simple Blog application with Redis
- To get a flavour of how to use the C# Client view the above example source code as well as the re-factored, Best Practices / Repository approach here.
- Painless data migrations with schema-less NoSQL datastores and Redis - Which demonstrates how flexible and resilient the JsonSerializer is with the Schema-less solution used with Redis.
Spawned from deep within the fires of Unix, for the longest time the only interface access to your Redis DataStore was through the highly-functional but still command-line only redis-cli command line utility.
Also developed in conjunction with the C# Redis Client, to help with visualizing your data in Redis is the Redis Admin UI. It was specifically designed to take advantages of the conventions of the C# Redis Client to provide a fast, functional view into your data. Like all of ServiceStack it runs on .NET and Mono with the public demo hosted on CentOS/Nginx/Mono.
The download and source code for the Redis Admin UI is maintained in the ServiceStack.RedisWebServices project.
The Redis Admin UI is actually a pure Ajax web application (i.e. a pure static JavaScript file). In order to be able to develop an Ajax application that talks to Redis (which is a highly optimized, binary-safe tcp protocol) we must make the Redis operations available via Ajax Web Services. Which happens to be exactly what the ServiceStack.RedisWebServices does. It takes advantage of ServiceStack to provide XML, JSON, JSV, SOAP 1.1/1.2 for all of Redis operations. A list of all the operations available can be seen on the public demo.
Effectively ServiceStack.RedisWebServices gives Redis CouchDB-like powers where the Ajax Web Services layer allows websites to talk directly to Redis without any custom middle-tier just like the Redis Admin UI :)
After you have familiarized yourself with the basics of the Redis Client here are a few useful resources to explore the Advanced features and capabilities of Redis:
- How to create Transactions / Atomic Operations with Redis using the IRedisTransaction and IRedisTypedTransaction APIs
- Fast, efficient distributed locking with Redis
- Pub/Sub Messaging with Redis