OrleansContrib / Orleans.Providers.MongoDB

A MongoDb implementation of the Orleans Providers: Membership, Storage and Reminders.
MIT License
100 stars 43 forks source link

Thoughts on the future of IGrainStateSerializer #105

Closed wassim-k closed 1 year ago

wassim-k commented 1 year ago

IMO, one great feature about using mongo as a grain storage provider is that it enables a good experience for viewing, filtering and querying grain state, whether from Compass or from other microservices querying the data directly.

I've noticed with Orleans v4, there has been a move to storing grain state in binary format, for example this is the interface for IGrainStorageSerializer

public interface IGrainStorageSerializer
{
    BinaryData Serialize<T>(T input);
    T Deserialize<T>(BinaryData input);
}

And this is recent PR in Orleans repo for updating DynamoDB provider is an example where storing data in JSON format has been removed in favor of implementing IGrainStorageSerializer.

So I'm keen to know if this has been given some consideration and what your thoughts are?

SebastianStehle commented 1 year ago

Personally I would like to be able to debug my grain states. I mean you cannot really modify that, because it would not change the state of the Grains, but at least you can see what is going on.

I am open for a PR to support that, but I would not shift to that. Also for backwards compatibility.

wassim-k commented 1 year ago

Great, we're in agreement then, thank you.