From c26a11a8eca5198125b0852975219a09c3cdd9a7 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Mon, 7 Aug 2023 03:34:55 -0300 Subject: [PATCH] Add package readmes --- readme.md | 28 ++++++++++++++++++-- src/CloudActors.Package/readme.md | 10 ++++++++ src/CloudActors.Streamstone/readme.md | 37 +++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 src/CloudActors.Package/readme.md create mode 100644 src/CloudActors.Streamstone/readme.md diff --git a/readme.md b/readme.md index dff4bbd..80d3af4 100644 --- a/readme.md +++ b/readme.md @@ -1,17 +1,38 @@ # Cloud Native Actors

- Orleans logo + Orleans logo

An opinionated, simplified and uniform Cloud Native actors' library that integrates with Microsoft Orleans. +[![Version](https://img.shields.io/nuget/v/Devlooped.CloudActors.svg?color=royalblue)](https://www.nuget.org/packages/Devlooped.CloudActors) +[![Downloads](https://img.shields.io/nuget/dt/Devlooped.CloudActors.svg?color=green)](https://www.nuget.org/packages/Devlooped.CloudActors) +[![License](https://img.shields.io/github/license/devlooped/CloudActors.svg?color=blue)](https://github.com/devlooped/CloudActors/blob/main/license.txt) +[![Build](https://github.com/devlooped/CloudActors/workflows/build/badge.svg?branch=main)](https://github.com/devlooped/CloudActors/actions) + ## Motivation Watch the [Orleans Virtual Meetup 7](https://www.youtube.com/watch?v=FKL-PS8Q9ac) where Yevhen (of [Streamstone](https://github.com/yevhen/Streamstone) fame) makes the case for using message passing style with actors instead of the more common RPC style offered by Orleans. + +## Overview + +Rather than the RPC-style programming offered (and encouraged) out of the +box by Orleans, Cloud Actors offers a message-passing style of programming +with a uniform API to access actors: Execute and Query. + +These uniform operations receive a message (a.k.a. command or query) and +optionally return a result. Consumers always use the same API to invoke +operations on actors, and the combination of the actor id and the message +consitute enough information to route the message to the right actor. + +Actors can be implemented as plain CLR objects, with no need to inherit +from any base class or implement any interface. The Orleans plumbing of +grains and their activation is completely hidden from the developer. + ## Features Rather than relying on `dynamic` dispatch, this implementation relies heavily on source generators @@ -407,4 +428,7 @@ partial class Account } ``` -Note how there's no dynamic dispatch here either 💯. \ No newline at end of file +Note how there's no dynamic dispatch here either 💯. + + + diff --git a/src/CloudActors.Package/readme.md b/src/CloudActors.Package/readme.md new file mode 100644 index 0000000..67c9dfe --- /dev/null +++ b/src/CloudActors.Package/readme.md @@ -0,0 +1,10 @@ +An opinionated, simplified and uniform Cloud Native actors' library that integrates with Microsoft Orleans. + +[![License](https://img.shields.io/github/license/devlooped/CloudActors.svg?color=blue)](https://github.com/devlooped/CloudActors/blob/main/license.txt) +[![GitHub](https://img.shields.io/badge/-source-181717.svg?logo=GitHub)](https://github.com/devlooped/nugetizer) + + + + + + \ No newline at end of file diff --git a/src/CloudActors.Streamstone/readme.md b/src/CloudActors.Streamstone/readme.md new file mode 100644 index 0000000..8c3a962 --- /dev/null +++ b/src/CloudActors.Streamstone/readme.md @@ -0,0 +1,37 @@ +Streamstone storage provider for Orleans grain persistence, +supporting Cloud Actors on Azure Table Storage. + +## Features + +* Supports plain CLR objects as grain state +* Supports event sourced actors +* Supports automatic snapshots for faster state reading + +See [Streamstone](https://github.com/yevhen/Streamstone) for more details. + +## Usage + +```csharp +var builder = WebApplication.Create(args); + +// other config, specially Orleans and Cloud Actors + +// 👇 register provider as default for all grains/actors +builder.Services.AddSingletonNamedService(ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME); + +// 👇 register provider with a specific name, alternatively +builder.Services.AddSingletonNamedService("streamstone"); +``` + +If the storage provider is registered with a specific name, actors can then +specify the name of the provider to use: + +```csharp +[Actor(nameof(Account), "streamstone")] +public partial class Account : IEventSourced +``` + + + + + \ No newline at end of file