Skip to content

Commit

Permalink
minor clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Jones committed Nov 23, 2022
1 parent e9bbbdc commit 60739d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ To run the test application:

1. Open `OrleansShardedStorage.sln` in VS2022 (>=17.4.1).

2. To get up and running, you will need to create a few Storage Accounts in Azure. You can do this in the Azure Portal or using the provide script. `OrleansShardedStorageProvider\create-multiple-storage-accounts.ps1` will create 6 storage accounts and output a list you can put in the sample app config. You will need to update some info at the top of this script to get it to work! If it creates the resource group, the output seems to stick, so wait 5 mins and it should be done.
2. To get up and running, you will need to create a few Storage Accounts in Azure. You can do this in the Azure Portal or using the provided script. `OrleansShardedStorageProvider\create-multiple-storage-accounts.ps1` will create 6 storage accounts and output a list you can put in the sample app config. You will need to update some info at the top of this script to get it to work. If it creates the resource group, the output seems to stick, so wait 5 mins and it should be done.

3. In `TestApplication\Silo`, update `appsettings.json`. Add 3 names/sastoken pairs to `TableStorageAccounts` and 3 to `BlobStorageAccounts`. (Note: You could use appsettings as a template and update `secrets.json`) The final config will look something like:

Expand Down Expand Up @@ -97,9 +97,9 @@ To run the test application:

>The Table storage splits (33,33,34) and Blob Storage splits (34,35,31)
7. Stop the Client/Silo and start again. If you put breakpoints in the grains `OnActivateAsync`, you will see data loaded back into the grain.
7. Stop the Client/Silo and start again. If you put breakpoints in the grains `OnActivateAsync`, you will see data loaded back into the grain. Such 'checking' code should not exist in prod as it'll slow the grain down - it's just here to help demo!

>NOTE: Running in Visual Studio in debug is slow. To run at rull speed you need to be in Release and run the exe's outside VS.
>NOTE: Running in Visual Studio in debug is slow. To run at full speed you need to be in Release and run the exe's outside VS.
8. END

Expand Down
5 changes: 3 additions & 2 deletions TestApplication/Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ static async Task DoClientWorkAsync(IClusterClient client)
{
Console.WriteLine($"NOTE: As with all Orleans stuff. Run Client+Silo in 'Release', outside of Visual Studio for fastest results");

// Calls to SmallDataGrain (which uses table storage)
int iterationsTbl = 100;
int iterationsBlob = 100;
for (int i = 0; i < iterationsTbl; i++)
{
var friend = client.GetGrain<ISmallDataGrain>(i);
var response = await friend.SayHello($"Yo SM {i}!");
Console.WriteLine($"{response}");
}


// Calls to LargeDataGrain (which uses blob storage)
int iterationsBlob = 100;
for (int i = 0; i < iterationsBlob; i++)
{
var friend = client.GetGrain<ILargeDataGrain>(i.ToString());
Expand Down

0 comments on commit 60739d6

Please sign in to comment.