GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Redis Server Events Redis Server Events
Demis Bellot edited this page
This page has moved to docs.servicestack.netOne limitation the default
As a drop-in replacement it can easily be configured with just a few lines of code, as seen in the updated Chat App which can run on either Memory or Redis ServerEvents providers: var redisHost = AppSettings.GetString("RedisHost"); if (redisHost != null) { container.Register<IRedisClientsManager>( new RedisManagerPool(redisHost)); container.Register<IServerEvents>(c => new RedisServerEvents(c.Resolve<IRedisClientsManager>())); container.Resolve<IServerEvents>().Start(); } The above configuration will use Redis ServerEvents if there's a <add key="RedisHost" value="localhost:6379" />
To showcase Redis ServerEvents in action, we've prepared a stand-alone ServiceStack.Gap version of Chat compiled down into a single Chat.exe that can run on either Windows and OSX with Mono which can be downloaded from: Chat.zip (1.2MB)
Running Chat.exe without any arguments will run Chat using the default Memory ServerEvents. This can be changed to use Redis ServerEvents by un-commenting this line in appsettings.txt: This will require a redis-server running on Alternatively you can specify which port to run Chat on and change it to use Redis ServerEvents by specifying the redis instance it should connect to on the command-line with: Also included in This script was used to create the animated gif above to launch 3 self-hosting instances of Chat.exe running on different ports, all connected to each other via Redis. This enables some interesting peer-to-peer scenarios where users are able to run a network of (CPU/resource isolated) decentralized stand-alone HTTP Servers on their local machines, but can still communicate with each other via redis.
Clone this wiki locally |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |