booksleeve

StackExchange TimeoutException when trying to insert 750 items in 2 sets in redis

随声附和 提交于 2019-12-05 20:03:39
Initially I'm trying to insert some collection of items into 2 redis sets (maybe this is not good idea at all, but ...). amount of entries that I'm trying to add at once: 750+ For now I do receive timeout exception when trying to perform this action using StackExchange.redis client, the interesting thing that I'm able to complete similar action using "legacy" booksleeve client I've investigated previously. So, I definitely wrong in something (even maybe in my intial bookSleeve implementation), just trying to figure out what exactly is wrong. Below is sample of the code that I use with redis

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

孤者浪人 提交于 2019-12-04 07:48:38
问题 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 then failed one server, but was unable to successfully get any messages through on the second Redis server without recycling the SignalR app pool. Presumably this is because it needs to issue the setup commands to the new Redis message bus. As of

Redis connection errors when using Booksleeve Redis client in Azure VM

空扰寡人 提交于 2019-12-04 05:46:09
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 coming out of Booksleeve. When the app first fires up everything works fine. However, after about 5-10 minutes of inactivity the next request to the app experiences a network exception (I'm at work right now and don't have the exact error messages on me, so I will post them when I get home if people think they're germane to the discussion) This causes

How often should I open/close my Booksleeve connection?

偶尔善良 提交于 2019-12-03 11:16:38
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 (as I'm doing now)? Just slightly confused. Here's how I'm using it, as of now: public static MonoLink CreateMonolink(string URL) { redis.Open(); var transaction = redis.CreateTransaction(); string Key = null; try { var IncrementTask = transaction.Strings.Increment(0, "nextmonolink"); if (!IncrementTask.Wait(5000)) { transaction.Discard(); throw new

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

和自甴很熟 提交于 2019-12-02 16:54:07
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 then failed one server, but was unable to successfully get any messages through on the second Redis server without recycling the SignalR app pool. Presumably this is because it needs to issue the setup commands to the new Redis message bus. As of SignalR RC1, Microsoft.AspNet.SignalR.Redis.RedisMessageBus uses Booksleeve's RedisConnection() to connect

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

孤人 提交于 2019-11-30 04:04:42
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 (in-process) for the reads of the table. Now I would like to make an out-of-process cache, that should be updated from when writes are made, meaning inserts or updates (because after a value is updated or added, the in-memory cache will be no longer valid). I was recommended on Redis, and specifically Book Sleeve, my question is where I can find some

How should i be using Booksleeve with protobuf-net?

自作多情 提交于 2019-11-28 09:31:48
I use the RedisConnection Set method to set the byte array but how do i get the data? The get returns a wrapped byte array? Links: http://code.google.com/p/booksleeve/ http://code.google.com/p/protobuf-net/ This works but it doesn't feel right: using System; using System.Collections.Generic; using System.Linq; using System.Text; using BookSleeve; using ProtoBuf; using System.IO; namespace RedisTest001 { [ProtoContract, Serializable] public class Price { private string _ticker; private double _value; public Price() { } public Price(string ticker, double value) { _ticker = ticker; _value = value

Maintaining an open Redis connection using BookSleeve

非 Y 不嫁゛ 提交于 2019-11-27 07:16:38
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 network breaks? i.e. the connection might be opened successfully in the first place, but when some code tries to read/write to Redis, there is the possibility that the connection has dropped and you must reopen it (and fail gracefully if it won't open - but that is up to your design needs.) I seek for code snippet(s) that cover general Redis

How should i be using Booksleeve with protobuf-net?

流过昼夜 提交于 2019-11-27 02:58:48
问题 I use the RedisConnection Set method to set the byte array but how do i get the data? The get returns a wrapped byte array? Links: http://code.google.com/p/booksleeve/ http://code.google.com/p/protobuf-net/ This works but it doesn't feel right: using System; using System.Collections.Generic; using System.Linq; using System.Text; using BookSleeve; using ProtoBuf; using System.IO; namespace RedisTest001 { [ProtoContract, Serializable] public class Price { private string _ticker; private double

Maintaining an open Redis connection using BookSleeve

烈酒焚心 提交于 2019-11-26 13:09:04
问题 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 network breaks? i.e. the connection might be opened successfully in the first place, but when some code tries to read/write to Redis, there is the possibility that the connection has dropped and you must reopen it (and fail gracefully if it won\'t