Create a .NET MATLAB Production Server Client

To create a MATLAB® Production Server™ client:

  1. Obtain the client run-time files installed in $MPS_INSTALL/client.

  2. In consultation with the MATLAB programmer, agree on the MATLAB function signatures that comprise the services in the application.

  3. Configure your system with the appropriate software for working with .NET.

    See Prepare Your Microsoft Visual Studio Environment.

  4. Based on your requirements, decide if the client uses a static proxy or a dynamic proxy.

    • A static proxy uses an object implementing an interface that mirrors the deployed MATLAB functions. You provide the interface for the static proxy.

      See Static Proxy Interface Guidelines.

    • A dynamic proxy creates server requests based on the MATLAB function name provided to the invoke() method. You provide the function name, the number of output arguments, and all of the input arguments required to evaluate the functions.

      See Invoke MATLAB Functions Dynamically.

  5. Write a the .NET code to instantiate a proxy to a MATLAB Production Server instance and call the MATLAB functions.

    1. Create a dynamic proxy for communicating with the service hosted by MATLAB Production Server software.

    2. Declare and throw exceptions as required.

    3. Free system resources using the close method of MWClient, after making needed calls to your application.