REST Service Storage Overview
When implementing the REST Report service you need to provide an IStorage interface implementation. An instance of the provided implementation will be used from the service to store its internal state (like active clients, interactivity state, rendered reports).
The interface also exposes a method called AcquireLock which is used from the service to enforce serialized access to all stored resources from each thread of the application and between the instances of the application in case of multi-instance environment (i.e., Web Farm). This requires that a suitable interface implementation should be selected when implementing the Reporting REST Service within your application.
IStorage implementation suitable for deploying both on single instance application hosting and in Web Farms
The following implementations of the IStorage interface allow service multiple instances support. They also have better overall performance.
- MsSqlServerStorage object - See How to Configure an MSSQL Database Storage. It supports storage server side locks to achieve inter-machine resources serialized access by its Sql Server transactions feature.
- RedisStorage object - See How to Use Redis storage. It supports storage server side locks to achieve inter-machine resources serialized access by its distributed locks feature.
IStorage implementation suitable for deploying on a single instance application only
The following implementations of the IStorage interface support the service to be deployed as a single instance only. For locking mechanism they use OS specific synchronization primitives which only enable inter-thread serialized resources access in the boundaries of a single machine.
- FileStorage - Use the FileStorage constructor to create a storage instance. All Visual Studio item templates for adding the Reporting REST service use the default FileStorage constructor. The second overload of the FileStorage constructor allows you to specify a folder, and it is recommended for usage in production environment.
- DatabaseStorage - Use the DatabaseStorage constructor to create a storage instance. This storage option requires reference to Telerik.Reporting.Cache.Database.dll that has dependencies on Telerik Data Access which can be checked in the version corresponding Upgrade article.