Caching in Windows Azure with multiple Web Roles and REST API

17 posts, 1 answers
  1. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 09 May 2014 Link to this post

    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.
  2. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 14 May 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 14 May 2014 in reply to Stef Link to this post

    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
  5. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 19 May 2014 Link to this post

    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.

     
  6. Richard
    Richard avatar
    3 posts
    Member since:
    Apr 2013

    Posted 18 Sep 2014 Link to this post

    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.
  7. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 18 Sep 2014 in reply to Stef Link to this post

    Any progress? I strongly recommend Redis...available in Azure, AWS, and as Window Service...same API on all.
  8. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 18 Sep 2014 in reply to John Link to this post

    For instance SignalR has the backplane concept where they will use Redis or SQLServer...similar idea....
  9. Answer
    Stef
    Admin
    Stef avatar
    3050 posts

    Posted 22 Sep 2014 Link to this post

    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.

     
  10. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 22 Sep 2014 in reply to Stef Link to this post

    Excellent!
  11. Richard
    Richard avatar
    3 posts
    Member since:
    Apr 2013

    Posted 30 Oct 2014 Link to this post

    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.
     
  12. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 31 Oct 2014 in reply to Stef Link to this post

    So...now that this support is live, what do we need to do to use it? Can't find any documentation....
  13. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 31 Oct 2014 in reply to John Link to this post

    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);
            }

  14. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 31 Oct 2014 in reply to John Link to this post

    And should I return a new RedisStorage each time this method is called? Or reuse a Singleton?
  15. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 04 Nov 2014 Link to this post

    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.

     
  16. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 04 Nov 2014 in reply to Stef Link to this post

    Still not sure if I get it. Is the code posted below sufficient for the web farm? (RedisSignalR.RedisClient returns the Redis multiplexer)

    protected override Telerik.Reporting.Cache.Interfaces.IStorage CreateStorage()
    {
        return new RedisStorage(RedisSignalR.RedisClient);
    }
  17. John
    John avatar
    41 posts
    Member since:
    Jun 2013

    Posted 04 Nov 2014 in reply to Stef Link to this post

    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);
            }

  18. Stef
    Admin
    Stef avatar
    3050 posts

    Posted 07 Nov 2014 Link to this post

    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.

     
Back to Top
DevCraft banner