Skip to content
Merged
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
5 changes: 1 addition & 4 deletions Orleans.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@
<Folder Name="/src/Extensions/Cassandra/">
<Project Path="src/Cassandra/Orleans.Clustering.Cassandra/Orleans.Clustering.Cassandra.csproj" />
</Folder>
<Folder Name="/src/Extensions/File/">
<Project Path="src/File/Orleans.Persistence.FileStorage/Orleans.Persistence.FileStorage.csproj" />
</Folder>
<Folder Name="/src/Extensions/Google/">
<Project Path="src/Google/Orleans.Clustering.Firestore/Orleans.Clustering.Firestore.csproj" />
<Project Path="src/Google/Orleans.GrainDirectory.Firestore/Orleans.GrainDirectory.Firestore.csproj" />
Expand Down Expand Up @@ -144,6 +141,7 @@
<Project Path="test/Orleans.Runtime.Internal.Tests/Orleans.Runtime.Internal.Tests.csproj" />
<Project Path="test/Orleans.Reminders.Tests/Orleans.Reminders.Tests.csproj" />
<Project Path="test/Orleans.Placement.Tests/Orleans.Placement.Tests.csproj" />
<Project Path="test/Orleans.Persistence.FileStorage.Tests/Orleans.Persistence.FileStorage.Tests.csproj" />
<Project Path="test/Orleans.Persistence.TestKit.Tests/Orleans.Persistence.TestKit.Tests.csproj" />
<Project Path="test/Orleans.Reminders.TestKit.Tests/Orleans.Reminders.TestKit.Tests.csproj" />
<Project Path="test/Orleans.GrainDirectory.Tests/Orleans.GrainDirectory.Tests.csproj" />
Expand Down Expand Up @@ -182,7 +180,6 @@
<Project Path="test/Extensions/Orleans.Redis.Tests/Orleans.Redis.Tests.csproj" />
<Project Path="test/Extensions/Orleans.Clustering.Firestore.Tests/Orleans.Clustering.Firestore.Tests.csproj" />
<Project Path="test/Extensions/Orleans.GrainDirectory.Firestore.Tests/Orleans.GrainDirectory.Firestore.Tests.csproj" />
<Project Path="test/Extensions/Orleans.Persistence.FileStorage.Tests/Orleans.Persistence.FileStorage.Tests.csproj" />
<Project Path="test/Extensions/Orleans.Persistence.Firestore.Tests/Orleans.Persistence.Firestore.Tests.csproj" />
<Project Path="test/Extensions/Orleans.Reminders.Firestore.Tests/Orleans.Reminders.Firestore.Tests.csproj" />
<Project Path="test/Extensions/Orleans.AdoNet.Tests/Orleans.AdoNet.Tests.csproj" />
Expand Down
3 changes: 2 additions & 1 deletion docs/site/src/content/docs/resources/nuget-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ Every multi-silo production cluster needs a shared membership provider.
| [Microsoft.Orleans.Persistence.AzureStorage](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.AzureStorage) | Azure Table and Blob Storage |
| [Microsoft.Orleans.Persistence.Cosmos](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.Cosmos) | Azure Cosmos DB |
| [Microsoft.Orleans.Persistence.DynamoDB](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.DynamoDB) | Amazon DynamoDB |
| [Microsoft.Orleans.Persistence.FileStorage](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.FileStorage) | Local files for single-silo development and testing |
| [Microsoft.Orleans.Persistence.Firestore](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.Firestore) | Google Cloud Firestore |
| [Microsoft.Orleans.Persistence.Redis](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.Redis) | Redis |
| [Microsoft.Orleans.Persistence.Memory](https://www.nuget.org/packages/Microsoft.Orleans.Persistence.Memory) | Process memory for development and testing |

File storage for local, single-silo development and testing is included in [Microsoft.Orleans.Runtime](https://www.nuget.org/packages/Microsoft.Orleans.Runtime).

Memory persistence distributes records across cluster storage grains but isn't durable or replicated. Use it only when losing records with a hosting process is acceptable.

## Reminders and durable jobs
Expand Down
1 change: 0 additions & 1 deletion docs/site/src/data/external-link-allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"https://www.nuget.org/packages/Microsoft.Orleans.Clustering.Firestore": "The new Firestore clustering package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
"https://www.nuget.org/packages/Microsoft.Orleans.GrainDirectory.Firestore": "The new Firestore grain-directory package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
"https://www.nuget.org/packages/Microsoft.Orleans.Journaling.Redis": "The new Redis journaling package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
"https://www.nuget.org/packages/Microsoft.Orleans.Persistence.FileStorage": "The new file storage persistence package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
"https://www.nuget.org/packages/Microsoft.Orleans.Persistence.Firestore": "The new Firestore persistence package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
"https://www.nuget.org/packages/Microsoft.Orleans.Reminders.Firestore": "The new Firestore reminders package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
"https://www.nuget.org/packages/Microsoft.Orleans.Streaming.Kinesis": "The new Kinesis streaming package is documented but not yet published; remove this entry and its unpublished API-package entry after publication.",
Expand Down
1 change: 0 additions & 1 deletion docs/site/src/data/unpublished-api-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"Microsoft.Orleans.Clustering.Firestore": "The new provider is awaiting its first NuGet publication.",
"Microsoft.Orleans.GrainDirectory.Firestore": "The new provider is awaiting its first NuGet publication.",
"Microsoft.Orleans.Journaling.Redis": "The new provider is awaiting its first NuGet publication.",
"Microsoft.Orleans.Persistence.FileStorage": "The new provider is awaiting its first NuGet publication.",
"Microsoft.Orleans.Persistence.Firestore": "The new provider is awaiting its first NuGet publication.",
"Microsoft.Orleans.Reminders.Firestore": "The new provider is awaiting its first NuGet publication.",
"Microsoft.Orleans.Streaming.Kinesis": "The new provider is awaiting its first NuGet publication."
Expand Down

This file was deleted.

64 changes: 0 additions & 64 deletions src/File/Orleans.Persistence.FileStorage/README.md

This file was deleted.

14 changes: 14 additions & 0 deletions src/Orleans.Runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ dotnet add package Microsoft.Orleans.Runtime

This package is automatically included when you reference the Orleans Server metapackage.

## File grain storage

The runtime includes a file-based grain storage provider for local, single-silo development and testing. It stores one binary file per grain state record and uses persisted ETags for optimistic concurrency.

```csharp
using Orleans.Persistence.FileStorage;

siloBuilder.AddFileGrainStorage(
options: options => options.RootDirectory = Path.Combine(
AppContext.BaseDirectory,
"Orleans",
"GrainState"));
```

## Example - Configuring a Silo

```csharp
Expand Down
34 changes: 34 additions & 0 deletions src/api/Orleans.Runtime/Orleans.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,40 @@ public GrainClassMap(Serialization.TypeSystem.TypeConverter typeConverter, Syste
}
}

namespace Orleans.Persistence.FileStorage
{
public sealed partial class FileGrainStorage : Storage.IGrainStorage, ILifecycleParticipant<Runtime.ISiloLifecycle>
{
public FileGrainStorage(string storageName, FileGrainStorageOptions options, Microsoft.Extensions.Options.IOptions<Configuration.ClusterOptions> clusterOptions, Serialization.Serializers.IActivatorProvider activatorProvider) { }

public System.Threading.Tasks.Task ClearStateAsync<T>(string stateName, Runtime.GrainId grainId, IGrainState<T> grainState) { throw null; }

public void Participate(Runtime.ISiloLifecycle lifecycle) { }

public System.Threading.Tasks.Task ReadStateAsync<T>(string stateName, Runtime.GrainId grainId, IGrainState<T> grainState) { throw null; }

public System.Threading.Tasks.Task WriteStateAsync<T>(string stateName, Runtime.GrainId grainId, IGrainState<T> grainState) { throw null; }
}

public sealed partial class FileGrainStorageOptions : Storage.IStorageProviderSerializerOptions
{
public required Storage.IGrainStorageSerializer GrainStorageSerializer { get { throw null; } set { } }

public required string RootDirectory { get { throw null; } set { } }
}

public static partial class FileSiloBuilderExtensions
{
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFileGrainStorage(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action<FileGrainStorageOptions> options) { throw null; }

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddFileGrainStorage(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string providerName, System.Action<FileGrainStorageOptions> options) { throw null; }

public static Hosting.ISiloBuilder AddFileGrainStorage(this Hosting.ISiloBuilder builder, System.Action<FileGrainStorageOptions> options) { throw null; }

public static Hosting.ISiloBuilder AddFileGrainStorage(this Hosting.ISiloBuilder builder, string providerName, System.Action<FileGrainStorageOptions> options) { throw null; }
}
}

namespace Orleans.Runtime
{
[GenerateSerializer]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(SourceRoot)src\File\Orleans.Persistence.FileStorage\Orleans.Persistence.FileStorage.csproj" />
<ProjectReference Include="$(SourceRoot)src\Orleans.Runtime\Orleans.Runtime.csproj" />
<ProjectReference Include="$(SourceRoot)src\Orleans.Persistence.TestKit\Orleans.Persistence.TestKit.csproj" PrivateAssets="all" />
<ProjectReference Include="$(SourceRoot)test\TestInfrastructure\TestExtensions\TestExtensions.csproj" />
</ItemGroup>
Expand Down