Skip to content

Commit 2d7358f

Browse files
author
Dusty Kline
committed
Adding a new project, DistributedLockingPerMethod, to demonstrate distributed, automatic, per-method locking via AOP and Redis.
1 parent 9da7bff commit 2d7358f

36 files changed

+34077
-3
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
src/RedisWithTaggingAndLocking/obj/
2+
src/RedisWithTaggingAndLockingTests/bin/
3+
src/RedisWithTaggingAndLockingTests/obj/
4+
src/RedisWithTaggingAndLocking/bin/
5+
src/DistributedLockingPerMethod/bin/
6+
src/DistributedLockingPerMethod/obj/

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ Sample code to use Redis as a tagging cache and Distributed Lock Manager.
55

66
## Usage
77

8+
Run multiple instances of the *DistributedLockingPerMethod* console app to see a simulation of Redis as a distributed lock manager.
89
Examine the tests in *RedisWithTaggingAndLockingTests* and run them using your favorite test runner for examples of how to consume the Tagging and Locking extensions.
910

1011
## Notes
1112

1213
This project is intended to give a general idea of how tagging and DLM can be accomplished with Redis and .NET. Many specific functions (Removing cache entries by tag) have not been included in this sample, but could be easily accomplished with modified versions of the included C# code and Lua scripts.
14+
If you do not wish to install the PostSharp extension in Visual Studio, you can find a pre-compiled version of DistributedLockingPerMethod.exe in the top level "bin" folder.
15+
Be sure to update the connection info for your Redis server!
1316

1417
## Dependencies
1518

16-
ServiceStack.Redis 4.0.33, NUnit 2.6.3
19+
ServiceStack.Redis 4.0.33, NUnit 2.6.3, PostSharp 4.0.39, PostSharp Visual Studio Extension*
1720

1821
## License
1922

Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<appSettings>
4+
<add key="redisConnStr" value="localhost" />
5+
</appSettings>
6+
<runtime>
7+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
8+
<!-- BEGIN: Added by PostSharp -->
9+
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
10+
<assemblyIdentity name="PostSharp" publicKeyToken="b13fd38b8f9c99d7" culture="neutral" />
11+
<bindingRedirect oldVersion="3.0.0.0-4.0.39.0" newVersion="4.0.39.0" />
12+
</dependentAssembly>
13+
<!-- END: Added by PostSharp -->
14+
</assemblyBinding>
15+
</runtime>
16+
</configuration>
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Symbols xmlns="http://schemas.postsharp.org/2.0/symbols">
3+
<Class Class="#1=T:[DistributedLockingPerMethod]DistributedLockingPerMethod.MethodMutex">
4+
<Instance Declaration="#2=M:[DistributedLockingPerMethod]DistributedLockingPerMethod.WorkerInstance::DoWork()" Id="a997b684802cbf80">
5+
<Target>
6+
<JoinPoint Description="#3=Intercepted by OnInvoke" />
7+
</Target>
8+
</Instance>
9+
</Class>
10+
</Symbols>
212 KB
Binary file not shown.

bin/DistributedLockingPerMethod/PostSharp.xml

Lines changed: 10186 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.
Binary file not shown.

bin/DistributedLockingPerMethod/ServiceStack.Common.xml

Lines changed: 231 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)