dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.06k stars 2.03k forks source link

Benefits of grain state persistence framework #8316

Closed JaktensTid closed 1 year ago

JaktensTid commented 1 year ago

Hi, just out of a curiosity

What is the main point of state persistence framework (https://learn.microsoft.com/en-us/dotnet/orleans/grains/grain-persistence/?pivots=orleans-3-x)? How is it different from custom entity framework implementation? What are the benefits?

bradygaster commented 1 year ago

EF is useful when you want more of an ORM, where you're mapping objects directly to RDBMS tables. State persistence is more for persisting the state of the grains, which may or may not be your domain objects for your app. You might use grain persistence to persist the state of a workflow, for example.

ghost commented 1 year ago

Thanks for contacting us. We believe that the question you've raised has been answered. If you still feel a need to continue the discussion, feel free to reopen the issue and add your comments.