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

Two questions #36

Open
truegoodwill opened this issue Mar 13, 2024 · 4 comments
Open

Two questions #36

truegoodwill opened this issue Mar 13, 2024 · 4 comments
Labels
question Further information is requested

Comments

@truegoodwill
Copy link

truegoodwill commented Mar 13, 2024

  1. Is there any plan to allow custom types for the actor class id? I'd like to use the StronglyTypedId package for actor ids.
  2. Assuming the actor AND its command/query/response objects are built ignorant of Orleans, is there any way to also include these message classes into orleans serialization?

Back this issue
Back this issue

@truegoodwill truegoodwill added the bug Something isn't working label Mar 13, 2024
@truegoodwill
Copy link
Author

Lovely work by the way, I'm very happy to find this.

@kzu kzu added question Further information is requested and removed bug Something isn't working labels Jun 13, 2024
@kzu
Copy link
Member

kzu commented Jun 13, 2024

Hi there!

  1. I started exploring strongly typed ids, but haven't made a decision on it yet. Sounds useful, but if you keep implicit conversion from those to string, this library can remain agnostic to that choice. Still undecided.
  2. You still have to annotate the messages with [GenerateSerializer], and that's what brings them into Orleans serialization, and the generated AddCloudActors (generated) API is the one that brings them into Orleans automatically. You have to add that invocation, as shown on the readme.

@kzu
Copy link
Member

kzu commented Nov 19, 2024

Heya @truegoodwill, good news on #2: you now can have your messages be 100% ignorant of Orleans. A fix I sent them has now shipped in v9 and so I've updated my projects so that CloudActors contains only interfaces and attributes and no dependency on Orleans whatesoever.

The new CloudActors.Server package is the one that hooks it up to Orleans and does the codegen as needed.

@bboyle1234
Copy link

bboyle1234 commented Nov 19, 2024

As a small aside, values generated by [StronglyTypedIds] don't work with orleans [GenerateSerializer] out of the box. I modified the templates slightly to get them working in orleans.

First, I tried adding the orleans serialization attributes to the templates. That didn't work, because the orleans serializer code-gen didn't pick up types made by other code-gens.

Next, I removed the public string Value {get;} line from the template and added just that little bit manually into my own code with the orleans serialization attribute, and it worked beautifully.

(Yes I know this is a little off topic, but the knowledge was really helpful for me)

At the moment, I'm working on a system that has to place about 10 million events per minute. We started with Orleans but right now aren't using it. We could come full-circle back to it. My colleague took over it and dropped Orleans while he was figuring out how to get us up to full speed requirements. He's written a tremendously lovely event-sourcing framework, maybe one day we can show it off.

Ps this is truegoodwill using my other github login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants