OrleansContrib/Orleans.Providers.MongoDB

Can you to provide IRepository for grain State manipulation?

P9avel opened this issue · 5 comments

Hi. i am have grain
public class MyGrain : Grain, /.../
{
/.../
}

And state
public class MyGrainState
{
public string Property1 {get;set; }
public string Property2 {get;set; }
}

I am want to have IMongoRepository with methods

  1. Task<IList> GetList(Predicate filter, CancellationToken cancellationToken)
  2. Task<IList> GetList(Expression<Func<MyGrainState, bool>> predicate, CancellationToken cancellationToken)
  3. Task<IQuarable> GetList(CancellationToken cancellationToken)
  4. Task<List> GetList(string filter, int maxResultCount, int skipCount, string sorting, CancellationToken);

I.e. i am want to get list of States for any Grain (Active or Inactive) with filtering and pagging and show states in grid in UI. Can you to provide so IRepository

It is not planned from my side, you have to open a PR for that.

I am think not enougth my knolledges for implemention this task. But i think very important feature

Nobody has asked for that yet. So I guess it is not that important

Because nobody know about this. For example i am need to show grains in Grid with filtering, without activation

Yes, but you could just implement your own storage solution. Or you build a custom class that just uses the same collection.

The problem is that the provider uses JSON.NET for serialization, therefore the individual properties are known by the mongo serializer and you cannot use linq.