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
113
votes
1 answer

Using SignalR with Redis messagebus failover using BookSleeve's ConnectionUtils.Connect()

I am trying to create a Redis message bus failover scenario with a SignalR app. At first, we tried a simple hardware load-balancer failover, that simply monitored two Redis servers. The SignalR application pointed to the singular HLB endpoint. I…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
42
votes
2 answers

Redis backed ASP.NET SessionState provider

I'm currently developing an ASP.NET SessionState custom provider that is backed by Redis using Booksleeve. Redis seemed like a perfect fit for SessionState (if you must use it) because: Redis can store durably like an RDBMS, however it is much…
NathanD
  • 8,061
  • 7
  • 30
  • 26
37
votes
4 answers

this command is not available unless the connection is created with admin-commands enabled

When trying to run the following in Redis using booksleeve. using (var conn = new RedisConnection(server, port, -1, password)) { var result = conn.Server.FlushDb(0); result.Wait(); } I get an error saying: This command is not available…
Justin Homes
  • 3,739
  • 9
  • 49
  • 78
26
votes
3 answers

Maintaining an open Redis connection using BookSleeve

Does anyone have a solid pattern fetching Redis via BookSleeve library? I mean: BookSleeve's author @MarcGravell recommends not to open & close the connection every time, but rather maintain one connection throughout the app. But how can you handle…
Ofer Zelig
  • 17,068
  • 9
  • 59
  • 93
18
votes
4 answers

StackExchange.Redis ConnectionMultiplexer.Connect() Intermittently Works

I am using StackExchange.Redis to talk to 3 different Redis instances: 1 on the same subnet and 2 remotely. Here's my configuration code: var configurationOptions = new ConfigurationOptions { EndPoints = { { host, port } }, …
Haney
  • 32,775
  • 8
  • 59
  • 68
16
votes
3 answers

How often should I open/close my Booksleeve connection?

I'm using the Booksleeve library in a C#/ASP.NET 4 application. Currently the RedisConnection object is a static object across my MonoLink class. Should I be keeping this connection open, or should I be open/closing it after each query/transaction…
Paul Zaczkowski
  • 2,848
  • 1
  • 25
  • 26
7
votes
2 answers

how to have Web Api send Json.net Serialized string object back to client Correctly?

I am serializing an IEnumerbale object using JsonConvert.SerializeObject( ); it produces string with quotes and escape character with spaces from web Api controller i return that string using code below [HttpGet] public string GetDegreeCodes(int…
Justin Homes
  • 3,739
  • 9
  • 49
  • 78
7
votes
1 answer

Maintaining an open Redis PubSub subscription with Booksleeve

I am using a Redis pubsub channel to send messages from a pool of worker processes to my ASP.NET application. When a message is received, my application forwards the message to a client's browser with SignalR. I found this solution to maintaining an…
Justin Rusbatch
  • 3,992
  • 2
  • 25
  • 43
6
votes
3 answers

How do I implement Redis pipelined requests with Booksleeve?

I'm a bit mixed up about the difference between a Redis transaction and pipeline and ultimately how to use pipelines with Booksleeve. I see that Booksleeve has support for the Redis transaction feature (MULTI/EXEC), but there is no mention in its…
bosgood
  • 1,984
  • 18
  • 21
6
votes
2 answers

How to use Redis with ElasticSearch

I found NEST for ElasticSearch. But I did not realize how the relation between Redis and ElasticSearch. I'll build a social network and would like to know whether you have some parts Redis and some parts of ElasticSearch should be used or a…
Amir Movahedi
  • 1,802
  • 3
  • 29
  • 52
6
votes
1 answer

implementing out-of-process cache using Redis in windows azure

I've been working on a webpage that displays a table from a database I have in my azure cloud. In order to reduce calls to the DB directly for performance improvement I would like to build a cache for the page. Currently, I hold an in-memory cache…
DanielY
  • 1,141
  • 30
  • 58
6
votes
2 answers

Redis connection errors when using Booksleeve Redis client in Azure VM

I've recently started hosting a side project of mine on the new Azure VMs. The app uses Redis as an in-memory cache. Everything was working fine in my local environment but now that I've moved the code to Azure I'm seeing some weird exceptions…
Eric
  • 3,284
  • 1
  • 28
  • 29
5
votes
1 answer

Opening redis connection is too slow

It sometimes takes very long time to open connection to Redis. Looks like it depends on connecting thread's count and, maybe, PC configuration. I run test for 50 threads on two workstations with 4-core CPU's, and it takes 70-100ms to open…
MihaKuz
  • 51
  • 1
  • 3
5
votes
2 answers

Saving a collection of objects with BookSleeve

I am new to both Redis and BookSleeve. I am evaluating whether I should use BookSleeve or ServiceStack.Redis. ServiceStack seems much more staightforward but I like the idea of pipelining provided by BookSleeve. I have Redis and BookSleeve running…
ChrisS
  • 2,595
  • 3
  • 18
  • 19
4
votes
1 answer

BookSleeve BlockingRemoveLeft is only returning some of the items pushed into the list

I'm trying to put together a super simple queuing sample based on BookSleeve. Here's what I have so far for the queue consumer side: using System; using System.Text; using BookSleeve; static class Program { static void Main() { …
rossipedia
  • 56,800
  • 10
  • 90
  • 93
1
2 3 4 5 6