Questions tagged [booksleeve]

Booksleeve is a Redis client written in C# offering pipelined, asynchronous, multiplexed and thread-safe operations.

Booksleeve is a Redis client written in C# offering pipelined, asynchronous, multiplexed and thread-safe operations even for the busiest applications.

In March 2014, Stack Exchange switched from BookSleeve to the new StackExchange.Redis for multiple reasons listed here

Both BookSleeve and StackExchange.Redis were created by Marc Gravell - one of the members of the Stack Exchange team - to address specific performance goals by creating an asynchronous API to interface with Redis in .NET.

Further information about the inception and purpose of this project is available in this post from Marc's blog.

82 questions
2
votes
1 answer

Redis Booksleeve, HGETALL and converting byte array to long

I'm using Booksleeve to communicate with Redis from a C# code. The code first retrieves all the fields and values from a hash: var vals = await Redis.Hashes.GetAll(0, redisKey); The hash contains fields which have values of type long. The call to…
Mikael Koskinen
  • 12,306
  • 5
  • 48
  • 63
2
votes
0 answers

Booksleeve (1.3.39) + Redis 2.6.16 + Sentinel: The connection has been closed (Error)

I am getting some random disconnects from Booksleeve when deployed in the production environment. I have run tests on my machine and I can not seem to reproduce the errors. I am not sure what to check so I decided to post here. My set-up: 2 x Redis…
John
  • 634
  • 8
  • 17
2
votes
2 answers

Exception on Hash.Remove with string[]

When trying to delete hash's fields by calling RedisConnection.Hashes.Remove(int db, string key, string[] fields, bool queueJump = false) I get an exception saying: "ERR wrong number of arguments for 'hdel' command". Here is a code that produces…
2
votes
1 answer

Task cancelled error when using redis cache in c#

I build an out-of-process cache for my webpage's database. Though when I try to do something with it (Set, Get), I get the following error: A task was canceled Here's my redis cache code. any help would be great. thanks public class RedisCache :…
DanielY
  • 1,141
  • 30
  • 58
2
votes
1 answer

Best way to serialize a byte array key to Redis with Booksleeve

I need to find the best implementation to send a byte array to the key space of a Redis Server with Booksleeve. I tried different implementation like UTF8 Encoding but i don't know what is the most optimized one in memory of redis server (i will…
baz
  • 151
  • 1
  • 9
2
votes
2 answers

Is there a C# implementation of Redis-rdb-tools?

Taking a look at Redis-RDB-Tools, it looks like there are some useful functions for monitoring the health of your Redis server. ServiceStack.Redis seems to have a good set of client functions (but I'm using BookSleeve). Are there any C#…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
2
votes
1 answer

How to save and retrieve channel data from Redis (pub/sub) with date ranges?

Initially I asked about querying .rdb files which is not what I want to do - I will be querying an active server. I am about to start a project where we will use Redis in a pub/sub scenario, using RDB snapshotting. A .Net WCF client will configure…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
2
votes
1 answer

Redis Booksleeve - How to use Hash API properly

i am using the Booksleeve hash api for Redis. I am doing the following: CurrentConnection.Hashes.Set(0, "item:1", "priority", task.priority.ToString()); var taskResult = CurrentConnection.Hashes.GetString(0, "item:1", "priority"); …
Faris Zacina
  • 14,056
  • 7
  • 62
  • 75
1
vote
1 answer

BookSleeve Wait() timeout in Razor page while benchmarking

I'm just beginning to mess around with BookSleeve (and redis) on Windows and just wanted to see if I could get some direction on what I may be doing wrong here. Using the following code, and then running ab against it, I can serve ~500 requests…
swasheck
  • 4,644
  • 2
  • 29
  • 56
1
vote
1 answer

Effect of BookSleev.Redis asynchronous set without await

Putting await for async method call is mandatory in .net ?? For example, I have a redis set command that I don't want to wait for. .....statements.... await redis.Hashes.Set(db, mainKey, value); .....statements after set command...... I don't want…
Manu Mohan
  • 1,694
  • 2
  • 20
  • 31
1
vote
1 answer

BookSleve Del redis key by wildcard

I saw this example on removing Key from redis usign wildcard You can delete multiple keys with just one DEL command DEL key1 key2 key3...... You can also delete all keys matching an expression this way redis-cli KEYS "temp_cart:user*" | xargs…
Justin Homes
  • 3,739
  • 9
  • 49
  • 78
1
vote
1 answer

Migrating from BookSleeve to StackExchange.Redis - Mapping Events

There doesn’t seem to be a ‘closed’ event in Stackexchange.Redis, only a ‘connection failed’ event which indicates a temporary failure based on my understanding (and that is why there is also a ‘connection restored’ event?). Is this because…
Abhishek Nanda
  • 1,007
  • 1
  • 8
  • 14
1
vote
1 answer

Stackexchange.Redis ConnectionMultiplexer.Connect() does does nothing on failed connect?

I attempt to connect to my Redis Serverinstance through ConnectionMultiplexer.Connect("127.0.0.1"); but despite no server being up and running the connect does not throw an error nor raise any ConnectionFailed event. I double checked I do not have…
Matt
  • 7,004
  • 11
  • 71
  • 117
1
vote
1 answer

Redis Booksleeve client, ResultCompletionMode.PreserveOrder not working

When I print out received messages on the Console the displayed messages are all messed up, each message containing 5 string sub-messages that are printed on the Console before control reverts back to the incoming message callback. I strongly…
Matt
  • 7,004
  • 11
  • 71
  • 117
1
vote
1 answer

Add multiple member - score values not supported in Redis Booksleeve

I'm trying to store multiple member-score values using Redis Booksleeve but the Booksleeve api doesn't seem to support this functionality. conn.SortedSets.Add overload supports only single pairs of value - scores. Do i miss something or this is on…
PanKak
  • 133
  • 12