Main Content

.NET Client Programming

Create client programs in .NET

The MATLAB® Production Server™ .NET client API allows you to evaluate MATLAB functions on remote servers using native .NET data. The .NET client API offers the following two workflows for client-server communication.

One workflow hides the implementation details of request creation and data serialization when evaluating MATLAB functions deployed on servers. This workflow uses the MWHttpClient class and lets you choose between the following two styles of APIs to evaluate a MATLAB function.

  • Static proxy — You provide an interface that models the MATLAB function signature. This is a type-safe API that enforces passing the proper data types to the function at compile time.

  • Dynamic proxy — You pass the function name as a parameter to the proxy along with the function arguments. This defers type checking until runtime.

The other workflow uses the MATLAB Production Server RESTful API for MATLAB Function Execution for MATLAB function execution for request creation and protocol buffers (protobuf) for data serialization. Protocol buffers are a language-neutral and platform-neutral method of serializing structured data. The MATLAB Production Server .NET client library provides helper classes to internally create protobuf messages and deserialize protobuf responses.

In an on-premises MATLAB Production Server installation, the client APIs are located in $MPS_INSTALL/client, where $MPS_INSTALL is the MATLAB Production Server installation location. The client APIs are also available for download at MATLAB Production Server Client Libraries. The Java® client API is also hosted in a Maven™ repository at https://mvnrepository.com/artifact/com.mathworks.prodserver/mps_java_client.

Topics

Basics

Programming Using Static and Dynamic Proxy

Programming Using RESTful API and Protocol Buffers for Data Serialization

Inputs and Outputs

Security

Data Types and Data Conversion