Thanks a lot and I am going to try and implement this. Will let you know how it goes.
I guess I asked the question in the wrong way.
I am currently using multi-databse and multi -tenant architecture. So all my connection string are stored in Tenant table.
In production each database will be replicated to either to the same server with a suffix as "DatabaseNaem_RPT" or might get replicated to a separate server with the same name.
I am using Grids extensively and also providing excel export option which will export the entire grid just not the visible data.
In such cases I would like to connect to the replicated or reporting database for the tenant and fetch the data.
But both the Grid and excel export will use the same service and only the page size will change based on the request.
So if I want to fetch all data I send the page size= number of records and for this scenario I would like to change the dbcontext connection string to the reporting database and for other request I will use the existing db context.
I need some kind of smart solution where I don't have to make lot of changes .
Hi -
I am planning to use the Elastic Redis Cache in AWS, but I am unable to figure out how to configure the connection string for Redis Cache.
Could you provide a connection string for AWS Elastic Redis Cache ?
Thanks, Partha
Hi -
I am planning to use the Elastic Redis Cache in AWS, but I am unable to figure out how to configure the connection string for Redis Cache.
Could you provide a connection string for AWS Elastic Redis Cache ?
Thanks, Partha
Hi -
I use the Multi Tenant - Multi Database approach in my application. I would like all the reporting request to hit a replicated database for the Tenant.
I was wondering how do I go about it?
Thanks, Partha
We did something similar. Put the tenants you want to share data into one organization and then switch off the data filter for Tenant and switch on the Organization filter.
We figured out the culprit to be Dependency Injection.
We were injecting services at the constructor level which was adding to the slowness.
Is there any reason why Dependency Injection would add such slowness to the application ?
We are planning to Inject dependency wherever it's required rather than injecting at the constructor.
Do you have a better suggestion on how to use the DI ?
Hi -
I have been struggling with performance issue with my code. I am using New Relic to find out what's the issue but it hasn't helped much.
Below is a brief description of my issue :
I have written a method called : GetVendorUnits(SearchInputDto input) which is being exposed as a Web Api. When I monitor in Audit Log or using New Relic I am observing it's executing within 1100 mili seconds, but the response I get back from the server is taking 12 - 15 seconds and sometime more.
[attachment=0:oa152h8v]Relic.png[/attachment:oa152h8v]
Could you please point me to the right direction to troubleshoot the issue on where the time is being spent and what to look for ?
Few questions :
I am having no clue how to figure this out.
Note :
If you look at the time spent in constructor is minimal but the code that's getting executed withing each constructor access is causing the delay.
I am directly calling the GetVendor web service and no other processing is being done.
I am literally stuck and unable to move forward.
Any help will be highly appreciated.
Hi -
I am using New Relic to monitor my performance.
Most of my time is being spent on : Application code (in ExecuteRequestHandler) .
Where as the internal methods is taking few milli seconds.
I am unable to trace the Application Code.
What could be the application code which could be slowing me down ? Any idea ?
Sure will share it in a short time. In the mean time I have been trying to write the extension method and I am kind of lost on the implementation :
public static GetAll<TEntity> GetAllFromCache<TEntity, TPrimaryKey>(IRepository<TEntity, TPrimaryKey> repository)
where TEntity : class, IEntity<TPrimaryKey>, new()
{
return repository.GetAll().FromCache();
}
Obviously the above one doesn't work.
Could you help me on this.