Two questions
- Is there any plan to allow custom types for the actor class id? I'd like to use the StronglyTypedId package for actor ids.
- 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?
Lovely work by the way, I'm very happy to find this.
Hi there!
- 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.
- You still have to annotate the messages with
[GenerateSerializer], and that's what brings them into Orleans serialization, and the generatedAddCloudActors(generated) API is the one that brings them into Orleans automatically. You have to add that invocation, as shown on the readme.
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.
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
Heya @truegoodwill @bboyle1234 you took me down the rabbit hole, I gotta say! As part of that, I couldn't help it but come up with a better strong-typed ids generator 🤣 . You can follow the progress at https://github.com/devlooped/StructId.
My intention is precisely to use if in this project too, so I'll make sure to take your experience into consideration. Fortunately, the Orleans generator is usable by other packages, so I can make it "aware" of my codegen to emit the necessary stuff automatically.
This looks like it's off to a nice start
On Wed, Nov 27, 2024, 10:37 AM Daniel Cazzulino @.***> wrote:
Heya @truegoodwill https://github.com/truegoodwill @bboyle1234 https://github.com/bboyle1234 you took me down the rabbit hole, I gotta say! As part of that, I couldn't help it but come up with a better strong-typed ids generator 🤣 . You can follow the progress at https://github.com/devlooped/StructId.
My intention is precisely to use if in this project too, so I'll make sure to take your experience into consideration. Fortunately, the Orleans generator is usable by other packages, so I can make it "aware" of my codegen to emit the necessary stuff automatically.
— Reply to this email directly, view it on GitHub https://github.com/devlooped/CloudActors/issues/36#issuecomment-2504041030, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALA7ZWTFTPCPIMKNPF5MZ32CXKKDAVCNFSM6AAAAABJIHUMFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUGA2DCMBTGA . You are receiving this because you were mentioned.Message ID: @.***>
