In Dec 2016, Microsoft R Server 9.0 introduced a new set of capabilities to help enterprises deploy their R analytics into production environments. In the latest release of R Server 9.1, Microsoft further improves on operationalization capabilities. This article will give a glance on those new exciting capabilities in R Server 9.1.
Boost up the scoring performance with Realtime web services
Starting from R Server 9.1, users can deploy models as ‘Realtime’ web services. It is a new type of web service comparing with previous standard web services. These Realtime web services offer super low request-response latency, so that you can get scoring results instantly and handle high volume concurrent requests.
The following tables show more than 10X (sometimes 100X) performance gain by using real time scoring. In most cases, it can reach as low as 3ms ~ 10ms latency even for complicated models built with RxDForest or RxNeuralNet. And for big models, the performance gain is even more obvious.
The performance boost comes from the following improvements:
- No use R interpreter for scoring; therefore, no additional resources or time is spent spinning up an R session for each call.
- No need to reload a model for subsequent calls, once it’s loaded into memory
In R Server 9.1, only models built with RevoScaleR algos and MicrosoftML algos can be deployed as Realtime web services (learn more supported algos) and hosted in Windows platform. Additional platform support will come from future releases.
Please check this example of deploying a model as Realtime web service.
Role Based Access Control for analytical web services
By default, any authenticated R Server users can publish, list, and get any web services. Additionally, users can also update and delete the web services they’ve published.
From R Server 9.1, to make the web service management more secure, we enable admins to further control who can publish, update and delete web services.
Three roles were introduced:
- Owner who can update and delete any services.
- Contributor who can publish and manage their own services but not the services of others.
- Reader: who cannot publish services, but only list and consume services.
Asynchronously batch processing for large input data
The typical approach to consuming web services, “Request Response” consumption, involves a single blocking API call to execute the code in that web service. There are situations however in which a computation is long running, or you need to get results for more than one item and the typical “Request Response” paradigm is not optimal.
In R Server 9.1, we introduced the “Asynchronous Batch” consumption of web services to greatly speed up the scoring time for large input data sets and long running computations. The Asynchronous Batch approach runs intrinsically parallel workloads for a specific web service via a single non-blocking request to the R Server. R Server will immediately execute those operations once for every row of data provided and store the results for use at a later point in time.
The following chart shows the asynchronous batch workflow:
Please check this example to learn more about asynchronous batch.
Asynchronous remote execution
When you are running scripts remotely that have long execution time, you don’t want to wait and get hang in the R Interactive Window. In R Server 9.1, we introduced the asynchronous remote execution. It will enable users to run the long execution scripts in the remote R server in the background, and release the interactive windows back to the users.
To execute an R script asynchronously, you need to set the async parameter for remoteScript() to TRUE. When remoteScript() is executed, the script is run asynchronously in a new remote R console window. All R console output and any plots from that execution will be returned to that window.
Learn more about asynchronous remote execution.
Dynamic scaling of operationalization grid on Azure
In many cases, enterprises want to scale up and down the computing grid that hosting analytical web services, based on consumption demanding. By doing that, they can leverage their compute infrastructure more efficiently.
The ARM template and scripts will be offered soon to help spin up a set of R Server VMs in Azure, configure them as a grid for operationalization, and scale it up and down based on CPU / Memory usage.
With all these new functionalities, R Server will make it easier, more secure and more efficient for enterprise customers to operationalize advanced analytics.
Learn more about R Server operationalization.
For a comprehensive view of all the capabilities in Microsoft R Server 9.1, refer to this blog.