Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Data Server – internal member in IDataStorage

Lukas Navratil asked on March 31, 2021

We are trying to use Flexmonster.DataServer.Core library, but we need to make some adjustments and provide a custom implementation for some classes. 
One of the interfaces we would need to implement is IDataStorage, but unfortunately it has an internal member which prevents us to create an implementation of that interface. Is there any chance that the internal modifier could be removed?

public interface IDataStorage
    Task<IDataStructure> GetOrAddAsync(string cacheKey);
    internal Task<object> GetShemaFromFileAsync(string index);

Kind regards,

5 answers

Lukas Navratil March 31, 2021

It seems there are two more internal things which we would need to extend:

  • DataSlice (internal class)
  • IApiService (has single internal method again)

Any chance to make them public as well?

Mykhailo Halaida Mykhailo Halaida Flexmonster April 1, 2021

Hi Lukas,
Thank you for writing to us.
We’ve talked to our developers and decided it would make sense to remove the internal modifier in the IDataStorage interface.
Speaking of DataSlice & IApiService, do you think you could tell us a little more about what you’re trying to achieve by modifying them?
We also remember you’ve been using MS Analysis Services while considering the custom data source API, but I don’t think we’ve got to hear your feedback on the latter. Do you have any questions regarding the custom data source API or other thoughts you’d like to share with us?
Thank you in advance, and looking forward to your response.
Best regards,

Mykhailo Halaida Mykhailo Halaida Flexmonster April 8, 2021

Hi Lukas,
How are you?
Just checking in to ask if you’ve had a chance to look through our previous response. 
We’d be happy to hear your thoughts.
Best regards,

Lukas Navratil April 12, 2021

Hi Mykhailo,
First of all, sorry for late reply.
The background why we would need these changes for IDataStorage is that we have a multi-tenant environment, so we need to separate data in the cache for individual tenants. If CacheKey generation was a virtual method, then we would not need to do this, so perhaps another option is to make this a virtual method so we can override it.
The reason for the second change is that we would like to push the aggregations / filter operations to the SQL server, so we do not need to store the entire dataset in memory, and re-aggregate / filter it in memory.
We are trying to reuse here what you have already implemented so that we don’t need to implement the full custom API. 
Regarding the experience with custom data source, we had it as a PoC, but then priorities have changed and we never finished that yet (we implemented another solution that is based on JSON data source), but now we are working on that again.

Mykhailo Halaida Mykhailo Halaida Flexmonster April 14, 2021

Hi Lukas,
Thank you for the further explanation of your use case.
Our developers will modify the code according to your suggestions – this will become available with our upcoming release on ETA May 5th.
We’ll keep you posted.

Please login or Register to Submit Answer