Skip to content

Commit

Permalink
Add package readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Aug 7, 2023
1 parent f37ed55 commit c26a11a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 2 deletions.
28 changes: 26 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
# Cloud Native Actors

<p align="center">
<image src="https://raw.githubusercontent.com/dotnet/orleans/gh-pages/assets/logo_full.png" alt="Orleans logo" width="600px">
<image src="https://raw.githubusercontent.com/devlooped/CloudActors/main/assets/img/banner.png" alt="Orleans logo" width="600px">
</p>

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.

<!-- #content -->
## 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
Expand Down Expand Up @@ -407,4 +428,7 @@ partial class Account
}
```

Note how there's no dynamic dispatch here either 💯.
Note how there's no dynamic dispatch here either 💯.

<!-- #sponsors -->
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
10 changes: 10 additions & 0 deletions src/CloudActors.Package/readme.md
Original file line number Diff line number Diff line change
@@ -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)

<!-- include ../../readme.md#content -->
<!-- include ../../readme.md#sponsors -->

<!-- Exclude from auto-expansion by devlooped/actions-include GH action -->
<!-- exclude -->
37 changes: 37 additions & 0 deletions src/CloudActors.Streamstone/readme.md
Original file line number Diff line number Diff line change
@@ -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<IGrainStorage, StreamstoneStorage>(ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME);

// 👇 register provider with a specific name, alternatively
builder.Services.AddSingletonNamedService<IGrainStorage, StreamstoneStorage>("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
```

<!-- include ../../readme.md#sponsors -->

<!-- Exclude from auto-expansion by devlooped/actions-include GH action -->
<!-- exclude -->

0 comments on commit c26a11a

Please sign in to comment.