Page 1 of 2

MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Fri Jul 17, 2020 6:10 am
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

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Sun Jul 19, 2020 7:09 am
by Lech Kulikowski
Hello,

Could you explain your issue in more detail?

Thank you.

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Tue Jul 21, 2020 4:29 am
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.

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Thu Jul 23, 2020 7:58 am
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.

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Fri Jul 24, 2020 10:48 am
by shyam.pundkar
Thank you!

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Mon Jul 27, 2020 9:27 am
by Lech Kulikowski
Hello

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

Thank you.

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Mon Jun 07, 2021 7:34 am
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

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Tue Jun 08, 2021 12:48 am
by shyam.pundkar
One more observation, When the control on the page is moved the call to StiCacheHelper.GetObjectFromCacheData is taking longer each time.

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Wed Jun 09, 2021 8:09 am
by Lech Kulikowski
Hello,

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

Thank you.
#4210

Re: MVC Designer: Maintianing StiReport Object in Webfarms scenario

Posted: Wed Jun 09, 2021 9:10 am
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.