Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split interfaces from server/hosting package #88

Merged
merged 6 commits into from
Nov 19, 2024
Merged

Split interfaces from server/hosting package #88

merged 6 commits into from
Nov 19, 2024

Conversation

kzu
Copy link
Member

@kzu kzu commented Nov 19, 2024

The CloudActors package now contains only the interfaces and attributes.

The CloudActors.Server is now introduced for the hosting projects to reference and set up the actor bus.

Cross-system communication can now happen by simply shipping nuget packages containing the contracts/messages supported by various components, and the IActorBus can be used to execute directly against them, fully transparent of all Orleans concerns.

Fixes #74

@kzu kzu added the enhancement New feature or request label Nov 19, 2024
We already had a separate assembly for the Orleans server extensions. By moving the grain generator to its own assembly, we can fully decouple the server/hosting interface and types from the bare business logic implemented via cloud actors. The only dependency would be the serializer generation which needs to be based on annotating the actual types, so it's unavoidable. But this is just the abstractions package.
Related codegen is also moved there, with a detection for the project having the server package installed.

Due to an issue with Orleans codec generation (see dotnet/orleans#9092), end to end tests are failing since state is not being properly serialized for actor messages.

We can only ship this rework once that's fixed. Otherwise, we'll need to move serialization codegen back to the actor/domain project (which unfortunately brings a larger dependency on Orleans, which is undesirable).
Now that [v9.0](https://github.com/dotnet/orleans/releases/tag/v9.0.0) is officially out with the fix, we can now move forward with recommending the split interfaces-only package as the only dependency a cloud actors project needs.
@devlooped-bot
Copy link
Member

devlooped-bot commented Nov 19, 2024

10 passed 10 passed
10 passed 10 passed
10 passed 10 passed

🧪 Details on Ubuntu 22.04.5 LTS

✅ Devlooped.CloudActors.CodeFixers.AddPartial
✅ Devlooped.CloudActors.CodeFixers.AddPartialMessage
✅ Devlooped.CloudActors.CodeFixers.GenerateActorState
✅ Devlooped.CloudActors.CodeFixers.NoGenerateSerializer
✅ Devlooped.CloudActors.CodeFixers.ReportPartialIndirectMessage
✅ Tests.StreamstoneTests.ReadWrite
✅ Tests.StreamstoneTests.ReadWriteComplexObject
✅ Tests.TestAccounts.HostedGrain
✅ Tests.TestAccounts.WebAppHosting
✅ Tests.TestCustomers.HostedGrain

🧪 Details on macOS Unix 14.7.0

✅ Devlooped.CloudActors.CodeFixers.AddPartial
✅ Devlooped.CloudActors.CodeFixers.AddPartialMessage
✅ Devlooped.CloudActors.CodeFixers.GenerateActorState
✅ Devlooped.CloudActors.CodeFixers.NoGenerateSerializer
✅ Devlooped.CloudActors.CodeFixers.ReportPartialIndirectMessage
✅ Tests.StreamstoneTests.ReadWrite
✅ Tests.StreamstoneTests.ReadWriteComplexObject
✅ Tests.TestAccounts.HostedGrain
✅ Tests.TestAccounts.WebAppHosting
✅ Tests.TestCustomers.HostedGrain

🧪 Details on Microsoft Windows 10.0.20348

✅ Devlooped.CloudActors.CodeFixers.AddPartial
✅ Devlooped.CloudActors.CodeFixers.AddPartialMessage
✅ Devlooped.CloudActors.CodeFixers.GenerateActorState
✅ Devlooped.CloudActors.CodeFixers.NoGenerateSerializer
✅ Devlooped.CloudActors.CodeFixers.ReportPartialIndirectMessage
✅ Tests.StreamstoneTests.ReadWrite
✅ Tests.StreamstoneTests.ReadWriteComplexObject
✅ Tests.TestAccounts.HostedGrain
✅ Tests.TestAccounts.WebAppHosting
✅ Tests.TestCustomers.HostedGrain

from dotnet-retest v0.6.3 on .NET 8.0.11 with 💜

@kzu kzu merged commit 422349c into main Nov 19, 2024
11 checks passed
@kzu kzu deleted the dev/server branch November 19, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate package for interfaces?
2 participants