MATLAB® Client for MATLAB Production Server™ makes the functions deployed on server instances available in your MATLAB session.
You must enable the discovery service on each server instance that hosts the MATLAB functions.
MATLAB Client for MATLAB Production Server enables you to do the following:
Scale with demand: Shift computationally intensive work from MATLAB desktop to server-class machines or scalable infrastructure.
Centralize algorithm management: Install MATLAB functions that contain your algorithms on a central server and then run them from any MATLAB desktop, ensuring consistent usage and making upgrades easier.
Protect intellectual property: Protect algorithms deployed to the server using encryption.
Using MATLAB Client for MATLAB Production Server is less suitable for algorithms that have the following characteristics:
The algorithms are called several times from inside a loop.
The algorithms require resources such as files or hardware that are available only on a single machine or to a single person.
The algorithms rely on the MATLAB desktop or MATLAB graphics, or use data from a MATLAB session.
Install the MATLAB Client for MATLAB Production Server support package from the MATLAB Add-On Explorer. For information about installing add-ons, see Get and Manage Add-Ons (MATLAB).
After your installation is complete, find examples in
is the root folder of support packages on your system. Access the documentation by entering
doc command at the MATLAB command prompt or by clicking the Help button. In the Help browser that opens,
navigate to MATLAB Client for MATLAB
Production Server under Supplemental Software.
MATLAB Client for MATLAB Production Server uses MATLAB add-ons to connect a MATLAB session to MATLAB functions deployed on server instances. The connection between a server instance and a MATLAB desktop session consists of two parts:
A MATLAB Production Server deployable archive that publishes one or more functions.
A MATLAB add-on that makes those functions available in MATLAB.
You must install a MATLAB
Production Server add-on to connect a MATLAB desktop session to an archive deployed on a server instance. For example, for
mathfun deployed to a server instance running on
myhost.mycompany.com at port 31415, you can install the corresponding
add-on with a single command:
>> prodserver.addon.install('mathfun', "myhost.mycompany.com", 31415);
Then, you can call the functions in that archive from the MATLAB desktop, script, and function files. For example, if the deployed archive
contains a function
mymagic that takes an integer input and returns a
magic square, you can call
mymagic from the MATLAB command prompt.
For a detailed example, see Execute Deployed MATLAB Functions.