Originally wrote an interactive framework based on WCF, where a session queue was customized to hold some information about the client connection.
These days in how to load balance this WCF framework, so the session queue split out, with a shared memory for processing, previously contacted Memcached, and later found that Redis is more advantageous than memcached. He began to study Redis. (Of course, Redis only stores a client session seems to be a big small use, directly with a concurrentdictionary can not solve it?) )
First Redis is cross-platform, here again nonsense, now gradually began to change, think as long as high efficiency, error small, Windows and non-Windows have what relationship?
Or go back to the. NET Windows environment that you're good at ....:)
First install Redis server, in fact, the introduction of the online simple and clear, my goal is very simple, run up on the line, so downloaded a redis-x64-2.8.2400 version of the Windows, Configure the redis.windows.conf file after decompression, increase the number of bytes in the Maxheap 1024000000 Max Heap
Then run:
Redis-server.exe redis.windows.conf
Normal startup, easy to use.
In a typical environment, Redis is typically deployed as a daemon. Then run:
Redis-server--service-install redis.windows.conf--loglevel verbose is deployed and can be manipulated through start-stop in Windows services. Then the need for client connections, mainly for C #: see Two, one is Servicestack, one is stackexchange. The former network support articles more, but 4.0 after commercialization, connection restrictions, as if an hour 6,000 samples, or 3.0 version, after consideration, replaced by Stackexchange. Reference deployment Stackexchange is also simple, in the VS tools, in the NuGet console, Run command:pm> install-package stackexchange.redis-version 1.0.488 (unloaded PM >uninstall-package stackexchange.redis-force) is OK. Preliminary trial is relatively simplestatic Connectionmultiplexer Redis = Connectionmultiplexer.connect ();idatabase redisdb = RedisEx.redis.GetDatabase ();redisdb .... Setadd ... Various functionsRedis here requires a global static variable, which avoids the uncertainty caused by the frequent operation of connections/disconnects with a long connection. Finally, let's talk about Redis management tools. with a redis-desktop-manager, you can view the data in the existing Redis service, add and delete. at the moment, the above Redis knowledge will give me a burst of time. If you encounter any problems, then supplement them. The following are the tools:redis:https://github.com/msopentech/redis/releasesstackexchange: Do not download the VS Direct NuGet installationManagement tools: Https://github.com/uglide/RedisDesktopManager/releases
These days on Redis, write a phase of things