akka-hosting-actor-patterns

Implement Akka.Hosting actor patterns for clustered and local .NET systems.

Updated Dec 4, 2022
One-click install
npx skills add https://github.com/devingoble/CloudOStat --skill akka-hosting-actor-patterns-devingoble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: akka-hosting-actor-patterns
Source: https://github.com/devingoble/CloudOStat/tree/main/.github/skills/akka-hosting-actor-patterns
Command: npx skills add https://github.com/devingoble/CloudOStat --skill akka-hosting-actor-patterns-devingoble

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides robust patterns for building scalable and testable actor systems using Akka.Hosting, addressing challenges in local testing, clustered deployments, and managing actor lifecycles.

Core Features & Use Cases

  • Unified Actor Logic: Write actor code that runs seamlessly in both local test environments and clustered production setups.
  • Simplified Cluster Sharding: Abstract away the complexities of Akka Cluster Sharding with Akka.Hosting extension methods.
  • Testable Scheduling: Integrate ITimeProvider for predictable, time-based logic in actors, making unit testing straightforward.
  • Durable Reminders: Implement reliable scheduled tasks using akka-reminders with configurable storage (PostgreSQL or in-memory).
  • DI Scope Management: Demonstrates patterns for handling dependency injection scopes within long-lived actors.

Quick Start

Use the akka-hosting-actor-patterns skill to configure an OrderActor with Akka.Hosting for clustered deployment.

Frequently Asked Questions about akka-hosting-actor-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Akka.Hosting for cluster sharding in .NET?

You can configure Akka.Hosting for cluster sharding using extension methods that abstract away deployment complexities, allowing your actor code to run seamlessly in both local test environments and clustered production setups.

What is the best way to unit test time-based logic in Akka.NET actors?

The best way to unit test time-based logic in Akka.NET actors is to integrate ITimeProvider, which makes scheduled tasks predictable and enables straightforward testing of your actor systems.

Can I use dependency injection with long-lived actors in Akka.Hosting?

Yes, you can use dependency injection with long-lived actors in Akka.Hosting by applying specific scope management patterns to handle DI scopes correctly within the actor lifecycle.

Does akka-reminders support PostgreSQL for durable scheduled tasks?

Yes, akka-reminders supports PostgreSQL for durable scheduled tasks, allowing you to implement reliable scheduling with configurable storage options including PostgreSQL or in-memory databases.

How do I build a generic child-per-entity parent actor in Akka.NET?

You build a generic child-per-entity parent actor in Akka.NET by applying advanced Akka.Hosting patterns, which facilitate unified code execution across local and clustered environments for scalable entities.