Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*.user
*.userosscache
*.sln.docstates
*.lock.json
*.txt

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down
1 change: 1 addition & 0 deletions src/HelloWorld.Grains/HelloArchiveGrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

namespace HelloWorld.Grains
{
[Orleans.Providers.StorageProvider(ProviderName = "AzureStore")]
public class HelloArchiveGrain : Grain<GreetingArchive>, IHelloArchive
{
public async Task<string> SayHello(string greeting)
Expand Down
13 changes: 13 additions & 0 deletions src/OrleansClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public class Program
static int Main(string[] args)
{
var config = ClientConfiguration.LocalhostSilo();
config.Gateways.Clear();
config.DataConnectionString = "Your connection string";
config.GatewayProvider = ClientConfiguration.GatewayProviderType.AzureTable;
config.DeploymentId = "DeploymentId";

try
{
InitializeWithRetries(config, initializeAttemptsBeforeFailing: 5);
Expand Down Expand Up @@ -64,6 +69,14 @@ private static async Task DoClientWork()
var friend = GrainClient.GrainFactory.GetGrain<IHello>(0);
var response = await friend.SayHello("Good morning, my friend!");
Console.WriteLine("\n\n{0}\n\n", response);
var archiveGrain = GrainClient.GrainFactory.GetGrain<IHelloArchive>(1);
response = await archiveGrain.SayHello("I'm ArchiveGrain");
var greetings = await archiveGrain.GetGreetings();
foreach(var greeting in greetings)
{
Console.WriteLine("\n\n{0}\n\n", greeting);
}

}

}
Expand Down
9 changes: 7 additions & 2 deletions src/OrleansClient/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"type": "platform",
"version": "1.0.1"
},
"Microsoft.Orleans.Core": "2.0.0-beta*" },
"Microsoft.Orleans.Core": "2.0.0-beta*",
"Microsoft.Orleans.OrleansAzureUtils": "2.0.0-beta*"
},

"frameworks": {
"netcoreapp1.0": {
Expand All @@ -18,7 +20,10 @@
"target": "project"
}
},
"imports": "dnxcore50"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}
7 changes: 5 additions & 2 deletions src/SiloHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using Orleans.Runtime.Configuration;
using Orleans.Runtime.Host;

namespace OrleansSiloHost
{
Expand All @@ -25,8 +26,10 @@ private static int StartSilo(string[] args)
{
// define the cluster configuration
var config = ClusterConfiguration.LocalhostPrimarySilo();
config.AddMemoryStorageProvider();

config.Globals.DataConnectionString = "Your azure connection string";
config.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.AzureTable;
config.Globals.DeploymentId = "DeployemtnId";
config.AddAzureTableStorageProvider("AzureStore");
hostWrapper = new OrleansHostWrapper(config, args);
return hostWrapper.Run();
}
Expand Down
11 changes: 8 additions & 3 deletions src/SiloHost/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
"emitEntryPoint": true,
"preserveCompilationContext": true
},

"dependencies": {
Expand All @@ -10,7 +11,8 @@
"version": "1.0.1"
},
"Microsoft.Orleans.OrleansProviders": "2.0.0-beta*",
"Microsoft.Orleans.OrleansRuntime": "2.0.0-beta*"
"Microsoft.Orleans.OrleansRuntime": "2.0.0-beta*",
"Microsoft.Orleans.OrleansAzureUtils": "2.0.0-beta*"
},

"frameworks": {
Expand All @@ -23,7 +25,10 @@
"target": "project"
}
},
"imports": "dnxcore50"
"imports": [
"dnxcore50",
"portable-net451+win8"
]
}
}
}