Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f1c630a
Add READMEs to core packages
Copilot May 21, 2025
bc2dc2b
Add READMEs to more packages
Copilot May 21, 2025
b0c998f
Add READMEs for Azure storage and streaming providers
Copilot May 21, 2025
7761ea3
Add READMEs for AdoNet providers and EventSourcing
Copilot May 21, 2025
304df3c
Revert global.json changes
Copilot May 21, 2025
99171f4
Add READMEs for all Azure packages
Copilot May 21, 2025
c8eb0e1
Add READMEs for all AWS packages
Copilot May 21, 2025
730de8c
Add READMEs for all Redis packages
Copilot May 21, 2025
b6dba18
Add READMEs for remaining AdoNet packages
Copilot May 21, 2025
bc083c0
Add READMEs for all serialization packages
Copilot May 21, 2025
ccd80be
Update READMEs based on PR review feedback
Copilot May 21, 2025
635e9f5
Update READMEs to include complete samples with grain references, cal…
Copilot May 21, 2025
a2ae730
Remove ConfigureApplicationParts and ClusterOptions calls from READMEs
Copilot May 21, 2025
d882ddd
Add grain interface and implementation definitions to READMEs
Copilot May 21, 2025
0d20445
Move using directives before type definitions in README files
Copilot May 21, 2025
aef4678
Update reminder TimeSpans to be greater than 1 minute
Copilot May 21, 2025
e787282
Remove commented out grain implementation and Serializable attribute
Copilot May 21, 2025
4e16ea2
Remove commented out grain implementation from Azure Storage Clusteri…
Copilot May 21, 2025
8635d15
Remove commented-out code from Orleans.Client README
Copilot May 21, 2025
05d52ae
Update READMEs to use file-scoped namespaces, Host.CreateApplicationB…
Copilot May 21, 2025
0da1485
Update all READMEs with file-scoped namespaces, Host.CreateApplicatio…
Copilot May 21, 2025
4208d4f
Remove duplicate PackageReadmeFile directives from csproj files
Copilot May 21, 2025
4dcd1e8
Remove timer field and improve DynamoDB Reminders README example
Copilot May 21, 2025
2294638
Remove timer field and improve example in Orleans.Reminders.AdoNet RE…
Copilot May 21, 2025
71656f1
Update Orleans.Journaling.AzureStorage README with improved ShoppingC…
Copilot May 21, 2025
9ba5e3e
Remove unnecessary timer field and add missing grain interface defini…
Copilot May 21, 2025
ccae5b5
Update Orleans.Serialization.TestKit README with better examples
Copilot May 21, 2025
31c00b7
Update READMEs with correct method usage
Copilot May 21, 2025
3eb79b3
Updated grain directory method names and removed timer field
Copilot May 21, 2025
adc3e22
Update READMEs to address review comments
Copilot May 21, 2025
9068824
Fix Orleans.Clustering.Cosmos and Orleans.Streaming.AzureStorage READMEs
Copilot May 22, 2025
03edc48
Add [<Id(xu)>] attributes to F# record and DU examples
Copilot May 22, 2025
5df2b52
Remove SerializerTester example from Orleans.Serialization.TestKit RE…
Copilot May 22, 2025
6a1eb9c
Update Orleans.Serialization.Protobuf README to use correct serialize…
Copilot May 22, 2025
43172bb
Updated MessagePack serializer configuration example
Copilot May 22, 2025
853f6be
Updated NewtonsoftJson serializer configuration example
Copilot May 22, 2025
618fc26
Updated SystemTextJson serializer configuration example
Copilot May 22, 2025
5d48fab
Fix csproj files to properly enclose all ItemGroup elements within Pr…
Copilot May 22, 2025
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>Microsoft.Orleans.Clustering.DynamoDB</PackageId>
<Title>Microsoft Orleans AWS DynamoDB Clustering Provider</Title>
<Description>Microsoft Orleans clustering provider backed by AWS DynamoDB</Description>
Expand All @@ -24,4 +25,8 @@
<PackageReference Include="AWSSDK.DynamoDBv2" />
</ItemGroup>


<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
80 changes: 80 additions & 0 deletions src/AWS/Orleans.Clustering.DynamoDB/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Microsoft Orleans Clustering for DynamoDB

## Introduction
Microsoft Orleans Clustering for DynamoDB provides cluster membership functionality for Microsoft Orleans using Amazon's DynamoDB. This allows Orleans silos to coordinate and form a cluster using DynamoDB as the backing store.

## Getting Started
To use this package, install it via NuGet:

```shell
dotnet add package Microsoft.Orleans.Clustering.DynamoDB
```

## Example - Configuring DynamoDB Membership
```csharp
using Microsoft.Extensions.Hosting;
using Orleans.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;

namespace ExampleGrains;

// Define a grain interface
public interface IHelloGrain : IGrainWithStringKey
{
Task<string> SayHello(string greeting);
}

// Implement the grain interface
public class HelloGrain : Grain, IHelloGrain
{
public Task<string> SayHello(string greeting)
{
return Task.FromResult($"Hello, {greeting}!");
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that 'using' directives and namespace declarations come before any type definitions or other code... update this for all files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved all using directives and namespace declarations to come before any type definitions in all README files. The changes are in commit 1ed1905.

var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
// Configure DynamoDB clustering
.UseDynamoDBClustering(options =>
{
options.AccessKey = "YOUR_AWS_ACCESS_KEY";
options.SecretKey = "YOUR_AWS_SECRET_KEY";
options.Region = "us-east-1";
options.TableName = "OrleansClusteringTable";
options.CreateIfNotExists = true;
});
});

var host = builder.Build();
await host.StartAsync();

// Get a reference to a grain and call it
var client = host.Services.GetRequiredService<IClusterClient>();
var grain = client.GetGrain<IHelloGrain>("user123");
var response = await grain.SayHello("DynamoDB");

// Print the result
Console.WriteLine($"Grain response: {response}");

// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();
```

## Documentation
For more comprehensive documentation, please refer to:
- [Microsoft Orleans Documentation](https://learn.microsoft.com/dotnet/orleans/)
- [Configuration Guide](https://learn.microsoft.com/en-us/dotnet/orleans/host/configuration-guide/)
- [Orleans Clustering](https://learn.microsoft.com/en-us/dotnet/orleans/implementation/cluster-management)
- [AWS SDK for .NET Documentation](https://docs.aws.amazon.com/sdk-for-net/index.html)

## Feedback & Contributing
- If you have any issues or would like to provide feedback, please [open an issue on GitHub](https://github.com/dotnet/orleans/issues)
- Join our community on [Discord](https://aka.ms/orleans-discord)
- Follow the [@msftorleans](https://twitter.com/msftorleans) Twitter account for Orleans announcements
- Contributions are welcome! Please review our [contribution guidelines](https://github.com/dotnet/orleans/blob/main/CONTRIBUTING.md)
- This project is licensed under the [MIT license](https://github.com/dotnet/orleans/blob/main/LICENSE)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>Microsoft.Orleans.Persistence.DynamoDB</PackageId>
<Title>Microsoft Orleans AWS DynamoDB Persistence Provider</Title>
<Description>Microsoft Orleans persistence providers backed by AWS DynamoDB</Description>
Expand All @@ -23,4 +24,8 @@
<ProjectReference Include="$(SourceRoot)src\Orleans.Runtime\Orleans.Runtime.csproj" />
<PackageReference Include="AWSSDK.DynamoDBv2" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
86 changes: 86 additions & 0 deletions src/AWS/Orleans.Persistence.DynamoDB/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Microsoft Orleans Persistence for DynamoDB

## Introduction
Microsoft Orleans Persistence for DynamoDB provides grain persistence for Microsoft Orleans using Amazon's DynamoDB. This allows your grains to persist their state in DynamoDB and reload it when they are reactivated.

## Getting Started
To use this package, install it via NuGet:

```shell
dotnet add package Microsoft.Orleans.Persistence.DynamoDB
```

## Example - Configuring DynamoDB Persistence
```csharp
using Microsoft.Extensions.Hosting;
using Orleans.Configuration;
using Orleans.Hosting;

var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure DynamoDB as grain storage
.AddDynamoDBGrainStorage(
name: "dynamoStore",
configureOptions: options =>
{
options.AccessKey = "YOUR_AWS_ACCESS_KEY";
options.SecretKey = "YOUR_AWS_SECRET_KEY";
options.Region = "us-east-1";
options.TableName = "OrleansGrainState";
options.CreateIfNotExists = true;
});
});

// Run the host
await builder.RunAsync();
```

## Example - Using Grain Storage in a Grain
```csharp
// Define grain state class

public class MyGrainState
{
public string Data { get; set; }
public int Version { get; set; }
}

// Grain implementation that uses the DynamoDB storage
public class MyGrain : Grain, IMyGrain, IGrainWithStringKey
{
private readonly IPersistentState<MyGrainState> _state;

public MyGrain([PersistentState("state", "dynamoStore")] IPersistentState<MyGrainState> state)
{
_state = state;
}

public async Task SetData(string data)
{
_state.State.Data = data;
_state.State.Version++;
await _state.WriteStateAsync();
}

public Task<string> GetData()
{
return Task.FromResult(_state.State.Data);
}
}
```

## Documentation
For more comprehensive documentation, please refer to:
- [Microsoft Orleans Documentation](https://learn.microsoft.com/dotnet/orleans/)
- [Grain Persistence](https://learn.microsoft.com/en-us/dotnet/orleans/grains/grain-persistence)
- [AWS SDK for .NET Documentation](https://docs.aws.amazon.com/sdk-for-net/index.html)

## Feedback & Contributing
- If you have any issues or would like to provide feedback, please [open an issue on GitHub](https://github.com/dotnet/orleans/issues)
- Join our community on [Discord](https://aka.ms/orleans-discord)
- Follow the [@msftorleans](https://twitter.com/msftorleans) Twitter account for Orleans announcements
- Contributions are welcome! Please review our [contribution guidelines](https://github.com/dotnet/orleans/blob/main/CONTRIBUTING.md)
- This project is licensed under the [MIT license](https://github.com/dotnet/orleans/blob/main/LICENSE)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>Microsoft.Orleans.Reminders.DynamoDB</PackageId>
<Title>Microsoft Orleans AWS DynamoDB Reminders Provider</Title>
<Description>Microsoft Orleans reminders provider backed by AWS DynamoDB</Description>
Expand All @@ -26,4 +27,8 @@
<PackageReference Include="AWSSDK.DynamoDBv2" />
</ItemGroup>


<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
113 changes: 113 additions & 0 deletions src/AWS/Orleans.Reminders.DynamoDB/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Microsoft Orleans Reminders for DynamoDB

## Introduction
Microsoft Orleans Reminders for DynamoDB provides persistence for Orleans reminders using Amazon's DynamoDB. This allows your Orleans applications to schedule persistent reminders that will be triggered even after silo restarts or grain deactivation.

## Getting Started
To use this package, install it via NuGet:

```shell
dotnet add package Microsoft.Orleans.Reminders.DynamoDB
```

## Example - Configuring DynamoDB Reminders
```csharp
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Orleans.Configuration;
using Orleans.Hosting;

var builder = Host.CreateApplicationBuilder(args)
.UseOrleans(siloBuilder =>
{
siloBuilder
.UseLocalhostClustering()
// Configure DynamoDB as reminder storage
.UseDynamoDBReminderService(options =>
{
options.AccessKey = "YOUR_AWS_ACCESS_KEY";
options.SecretKey = "YOUR_AWS_SECRET_KEY";
options.Region = "us-east-1";
options.TableName = "OrleansReminders";
options.CreateIfNotExists = true;
});
});

// Run the host
var host = builder.Build();
await host.StartAsync();

// Get a reference to the grain
var reminderGrain = host.Services.GetRequiredService<IGrainFactory>()
.GetGrain<IReminderGrain>("my-reminder-grain");

// Start the reminder
await reminderGrain.StartReminder("ExampleReminder");
Console.WriteLine("Reminder started!");

// Keep the host running until the application is shut down
await host.WaitForShutdownAsync();
```

## Example - Using Reminders in a Grain
```csharp
using System;
using System.Threading.Tasks;
using Orleans;
using Orleans.Runtime;

namespace ReminderExample;

public interface IReminderGrain : IGrainWithStringKey
{
Task StartReminder(string reminderName);
Task StopReminder();
}

public class ReminderGrain : Grain, IReminderGrain, IRemindable
{
private string _reminderName = "MyReminder";

public async Task StartReminder(string reminderName)
{
_reminderName = reminderName;

// Register a persistent reminder
await RegisterOrUpdateReminder(
reminderName,
TimeSpan.FromMinutes(2), // Time to delay before the first tick (must be > 1 minute)
TimeSpan.FromMinutes(5)); // Period of the reminder (must be > 1 minute)
}

public async Task StopReminder()
{
// Find and unregister the reminder
var reminder = await GetReminder(_reminderName);
if (reminder != null)
{
await UnregisterReminder(reminder);
}
}

public Task ReceiveReminder(string reminderName, TickStatus status)
{
// This method is called when the reminder ticks
Console.WriteLine($"Reminder {reminderName} triggered at {DateTime.UtcNow}. Status: {status}");
return Task.CompletedTask;
}
}
```

## Documentation
For more comprehensive documentation, please refer to:
- [Microsoft Orleans Documentation](https://learn.microsoft.com/dotnet/orleans/)
- [Reminders and Timers](https://learn.microsoft.com/en-us/dotnet/orleans/grains/timers-and-reminders)
- [Reminder Services](https://learn.microsoft.com/en-us/dotnet/orleans/implementation/reminder-services)
- [AWS SDK for .NET Documentation](https://docs.aws.amazon.com/sdk-for-net/index.html)

## Feedback & Contributing
- If you have any issues or would like to provide feedback, please [open an issue on GitHub](https://github.com/dotnet/orleans/issues)
- Join our community on [Discord](https://aka.ms/orleans-discord)
- Follow the [@msftorleans](https://twitter.com/msftorleans) Twitter account for Orleans announcements
- Contributions are welcome! Please review our [contribution guidelines](https://github.com/dotnet/orleans/blob/main/CONTRIBUTING.md)
- This project is licensed under the [MIT license](https://github.com/dotnet/orleans/blob/main/LICENSE)
5 changes: 5 additions & 0 deletions src/AWS/Orleans.Streaming.SQS/Orleans.Streaming.SQS.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>Microsoft.Orleans.Streaming.SQS</PackageId>
<Title>Microsoft Orleans AWS SQS Streaming Provider</Title>
<Description>Microsoft Orleans streaming provider backed by AWS SQS</Description>
Expand All @@ -18,4 +19,8 @@
<PackageReference Include="AWSSDK.SQS" />
</ItemGroup>


<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
Loading