MVC Designer: Maintianing StiReport Object in Webfarms scenario

Stimulsoft Reports.WEB discussion
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by shyam.pundkar »

Hi,

The application I am working on is deployed on web farm and uses MVC desinger. I have following questions
Is there a way we can maintain the StiReport object at client side(Browser)?
Is jsreportDesigner.options.report is equivalent to StiReport?
Can I convert jsreportDesigner.options.report to StiReport?

Thanks,
Shyam
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by Lech Kulikowski »

Hello,

Could you explain your issue in more detail?

Thank you.
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by shyam.pundkar »

Sorry I should have explained bit more.

We are building a web application which will be installed on multiple servers so that more clients can be served through load balancing. The client will access the application through browser and the requests will flow through load balancer. That means a request will go to a server which is less busy. Which also means that a request and any subsequent request from a browser may or may not go to the same server. The request/call will go to the less busy server which may not be the same server which initiated the request/response cycle. Consider the application is using Stimulsoft MVC report designer. In this load balancing setup, CreateReport action call may go to a less busy Server A and GetReport may go to another less busy Server B. But as the MVC designer maintains the report object at server side i.e in this case Server A, It wont be available for GetReport call which has been gone to Server B. So the StiMvcDesigner.GetReportObject() at Server B will not return report object because it is cached at Server A. The problem statement is how to make the report object available across different servers?

The solution could be
1. Maintain report object at client side and send it to and fro with every request.
2. Use a distributed cache / shared location accessible to all servers to maintain report object at server side.

We are aiming for solution 1. maintaining report object at client side. Now the question is, Is it possible to maintain report object at browser side using MVC Designer?
Please note we are not using sessions.

Please let me know if you need more information.
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by Lech Kulikowski »

Hello,

1. it is not possible. because MVC Designer does not store the entire StiReport object, but only some options and component settings. The full report is stored on the server side.

2. it is possible - there is a special class StiCacheHelper, which is used to store the report and its components in the server cache. This class overrides and stores the cache, for example, in files, database or other place used in your project. See documentation for more details:
https://www.stimulsoft.com/en/documenta ... ashing.htm

Thank you.
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by shyam.pundkar »

Thank you!
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by shyam.pundkar »

Hello,

I have created a custom class of StiReportCacheHelper to support storing the report objects to redis and initializing it in the MVC controller StiMvcDesigner.CacheHelper = ReportCacheHelper;
In terms of functionality everything works fine. But in terms of performance, it is getting worse. When i move a control on designer the designerEvent call takes place. Each call is taking more time than the previous call. Do you know about this issue? By the way we are using 2020.3.2.0

Image
Attachments
DesignerEvent-DegradingPerformancePerCall-AfterOverridingCacheHelper.PNG
DesignerEvent-DegradingPerformancePerCall-AfterOverridingCacheHelper.PNG (25.02 KiB) Viewed 1237 times
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by shyam.pundkar »

One more observation, When the control on the page is moved the call to StiCacheHelper.GetObjectFromCacheData is taking longer each time.
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#4210
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Post by Lech Kulikowski »

Hello,

We couldn't reproduce the issue on our samples.
Please send us a sample project that reproduces the issue for analysis.

Also, please try to decrease the UndoMaxLevel option for the designer:
https://www.stimulsoft.com/en/documenta ... ttings.htm

Thank you.
Post Reply