This is a migrated thread and some comments may be shown as answers.

Caching in Windows Azure with multiple Web Roles and REST API

15 Answers 330 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 09 May 2014, 05:32 PM
So, on Azure with 2 or more web roles, using the REST API and HTML viewer, do I have to enable database caching, as they don not share a file system? Also, I dont want to use ASP.NET session state, this is a pure MVC WebAPI app.

15 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 May 2014, 08:43 AM
Hello John,

Regardless of the selected cache mechanism (file or database), the Reporting REST service must be deployed on a single instance in order to have a synchronized read/write access to the cache. Thus my suggestion is to host the service separately and enable CORS to allow the communication between the viewers and the service.

In addition, note that the HTML5 Report Viewer is not using exactly the MVC architecture. There is a client widget (the viewer) and a service which work combined. To preserve the report between requests we keep its state in cache. This is what makes the HTML5 Report Viewer suitable for any Web application.

Let us know if you have any further questions.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
John
Top achievements
Rank 1
answered on 14 May 2014, 05:15 PM
Thanks Stef.
That sounds like a very limiting design decision for reporting. Reporting is certainly something that stands to gain hugely from scale out in the cloud. Limiting it to 1 instance, and especially when you already have an out of process cache, seems like shooting yourself in the foot. Most distributed caches can handle web farm concurrent access quite well! Please rethink this!
Cheers
John
0
Stef
Telerik team
answered on 19 May 2014, 10:53 AM
Hello John,

Thank you for your feedback.

We consider covering the described scenario where applications are hosted on multiple machines. Until there is a solution for the described scenario, please use the suggestion from my previous post.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Richard
Top achievements
Rank 1
answered on 18 Sep 2014, 05:20 PM
We are experiencing the same limitation.  With more companies moving to cloud solutions for horizontal scaling, this seems like it should be a fairly high priority item.
0
John
Top achievements
Rank 1
answered on 18 Sep 2014, 06:59 PM
Any progress? I strongly recommend Redis...available in Azure, AWS, and as Window Service...same API on all.
0
John
Top achievements
Rank 1
answered on 18 Sep 2014, 07:00 PM
For instance SignalR has the backplane concept where they will use Redis or SQLServer...similar idea....
0
Accepted
Stef
Telerik team
answered on 22 Sep 2014, 12:35 PM
Hello everyone,

We are working on the feature for the Reporting REST service and it is included in Telerik Reporting Roadmap.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
John
Top achievements
Rank 1
answered on 22 Sep 2014, 06:04 PM
Excellent!
0
Richard
Top achievements
Rank 1
answered on 30 Oct 2014, 04:01 PM
We have updated to 2014 Q3 and are attempting to run the html5 report viewer in the azure web farm scenario and are getting error 410 (Gone) every so often when trying to run a report.
Sometimes it's on load, sometimes it's on refresh, but it happens a lot.

Are there any other configuration changes that need to be made to support multiple instances?

Error creating report document (Report = MyReport.trdx; Format = HTML5Interactive):
Client with ID '155607-0c80' not found. Expired.
 
0
John
Top achievements
Rank 1
answered on 31 Oct 2014, 06:04 AM
So...now that this support is live, what do we need to do to use it? Can't find any documentation....
0
John
Top achievements
Rank 1
answered on 31 Oct 2014, 06:22 AM
Well...I found the help. So now I do this (where RedisSignalR.RedisClient returns my Redis ConnectionMultiplexer).
So it that all I need to do? Or do I also need to implement a custom cache provider?

    public class ReportsController : ReportsControllerBase
    {
        protected override Telerik.Reporting.Cache.Interfaces.IStorage CreateStorage()
        {
            return new RedisStorage(RedisSignalR.RedisClient);
        }

0
John
Top achievements
Rank 1
answered on 31 Oct 2014, 06:27 AM
And should I return a new RedisStorage each time this method is called? Or reuse a Singleton?
0
Stef
Telerik team
answered on 04 Nov 2014, 04:01 PM
Hi,

@Richard: We believe there is an issue with the service's synchronization of requests to the cache storage, which will be fixed in a consecutive internal build in the next few weeks. Currently, we investigate the reported problem and will update you in your support ticket on the same question.


@John: If the application is hosted in a web farm, you will need to use the new IStorage for the cache where to create an instance of the selected type of storage e.g. Redis. If you use the old ICache, the service has to be deployed as a single instance for the whole application - REST Service storage.
If you experience the same error as Richard, please wait for the next internal build to test it.


Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
John
Top achievements
Rank 1
answered on 04 Nov 2014, 09:21 PM
So, for the Web Farm scenario, is the below enough? (RedisSignalR.RedisClient is an internal method that returns the redis connection multiplexer).

        protected override Telerik.Reporting.Cache.Interfaces.IStorage CreateStorage()
        {
            return new RedisStorage(RedisSignalR.RedisClient);
        }

0
Stef
Telerik team
answered on 07 Nov 2014, 12:13 PM
Hello John,

Correct.

In case you need further help, feel free to open a support ticket and send us a demo project to check your settings.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Stef
Telerik team
John
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Share this question
or