MATLAB in Production Systems,
Database Integration, and Big Data
Eugene McGoldrick
© 2013 The MathWorks, Inc.1
Agenda
MATLAB Production Server and Excel
Integrating MATLAB Production Server into Database
Servers
MATLAB Production Server and Web Applications
MATLAB Production Server based Trading System
2
MATLAB in the Enterprise
Goals:
– Enable customers to rapidly develop and deploy MATLAB
applications onto the desktop.
– Seamlessly integrate MATLAB generated components into
other languages, applications and enterprise production
systems.
3
MathWorks Deployment Products
MATLAB Compiler™
MATLAB MATLAB MATLAB
Builder™ EX Builder™ Builder™
JA NE
.exe .dll/.lib Excel Java www COM .NET
Add-in
4
The MATLAB Compiler and Builder Products
Automatically packages your MATLAB programs as
standalone applications, software components, and
targeted programming/application environments
– Executable applications
– Excel Add-in’s
– .Net and Java components
Support full MATLAB language and
most toolboxes
Allows royalty-free deployment
Provides shared infrastructure with MATLAB:
– Speed of compiled application equivalent to
speed in MATLAB
Encrypts your functions
5
MATLAB Production Server Use Cases
Big Data …
HADOOP
Spreadsheet Applications
MATLAB Production Server
Request
Broker
&
Program Application Servers
Manager
Client Front End
Applications
MSMQ, JMS, IBM MQ
Web Applications Database Servers
Enterprise Service/Messaging Buses 6
MATLAB Production Server and Excel
© 2013 The MathWorks, Inc.7
Trader: Architecture
VB to the .NET client library
Adds trade to portfolio
New exposures & CVA
Small data transfer
8
Integrating MATLAB Production Server
into Database Servers
© 2013 The MathWorks, Inc.9
Workflow for Embedding MATLAB
Components in Production Systems
The development to production process is a two step process
Step 1: Bring Data to MATLAB
– Multiple data sources
– Build algorithms/models
– Test
– Compile to target platform component
Step 2: Bring algorithm to the Data
– Install MATLAB component into the enterprise production
applications.
– Same functionality/single source
10
MATLAB Components in Production
Databases
MATLAB Production Server can provide predictive
analytics in the database
Oracle (Java, .NET) Database Server
Microsoft SQL Server (.NET)
Microsoft Access (.NET)
Netezza (JAVA)
SAS (JAVA) MATLAB Production Server
Teradata (JAVA)
Request
Broker
&
Program
Thinclient with MPS Manager
– Java and .NET supported
Central repository for models … Simplifies change management
11
MATLAB Production Server and Web
Applications
© 2013 The MathWorks, Inc.
12
Risk Manager: Architecture
Architecture
Web
Web Server
Server
MATLAB Production Server
Request
CCRWeb
Broker
&
Program
Manager
ZeroCurveServlet
ZeroCurveServlet
genScenServlet
genScenServlet
..
..
..
..
Database Server
computeCVAServlet
computeCVAServlet
13
MATLAB Production Server based
Trading System
© 2013 The MathWorks, Inc.
14
Messaging … A very brief tutorial!
Sending Receiving
Application Application
3. Receive 3. Send Message
Message Back
Back
15
MATLAB Trading Application (1)
Made up of many components
Leverages MATLAB and Deployment Tools to integrate
MATLAB analytics into 3rd party applications
Uses MSMQ as a messaging system to “talk” to other
applications
16
MATLAB Trading Application (2)
MATLAB Production Server
Request
Broker
&
Program
Manager 17