sharing and deploying matlab code · 2 summary: data analytics workflow data analytics •data...

31
1 © 2016 The MathWorks, Inc. Sharing and Deploying MATLAB Programs Sundar Umamaheshwaran Amit Doshi Application Engineer-Technical Computing

Upload: others

Post on 22-May-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

1© 2016 The MathWorks, Inc.

Sharing and Deploying MATLAB Programs

Sundar Umamaheshwaran

Amit Doshi

Application Engineer-Technical Computing

Page 2: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

2

Summary: Data Analytics Workflow

Data Analytics

• Data Pre-processing

• Feature Extraction

• Building algorithms, math models

• Making business decisions

Smart Connected

Systems

Business

Systems

Analytics Integration

• Integrate algorithms with IT

• Analytics run on Embedded targets

Data Acquisition

• Engineering, Scientific, and Field

• Business and Transactional

MATLAB: Single Platform

Page 3: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

3

Data Analytics Workflow: Analytics Integration

Page 4: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

4

MATLAB Analytics Integrated with Enterprise Level Application

http://ec2-54-165-201-58.compute-1.amazonaws.com:8080/DemandForecastWeb/index.jsp

Page 5: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

5

MATLAB Programs Can be Shared With Anyone

Share With Other MATLAB Users Share With People Who do Not Have MATLAB

Page 6: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

6

Before We Share Apps- Ways to Build Apps in MATLAB

Use GUIDE

Use MATLAB Functions to Create

Apps Programmatically

Use App Designer – 2016 a

Page 7: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

7

Why App Designer

GUIDE is our current offering for

building apps with user interfaces

Existing customers have

expressed concerns

– Design environment looks dated

– Component set is limited

– Programming app behavior is challenging

Difficult to share data between parts of the app

Generated code is hard to understand

No editor integration

GUIDE

Page 8: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

8

App Designer

Enhanced design environment

Expanded UI component set

Code integration

– Tight synchronization of design and

code views with embedded editing

– New object-based code format

Built on Web Technology

Page 9: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

9

App Designer is Not a Replacement for GUIDE (today)

Limited graphics support

– Only 2D line and scatter plots are supported

– Does not support zoom, pan, rotate

– Does not support custom interaction through mouse and keyboard callbacks

Some existing UI components are not supported

– e.g., components for creating menus, toolbars, or tables

Optimized for small to medium apps (<100 components)

Page 10: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

10

Available Resources for App Designer

Dedicated landing page

– Overview video

– Summary of key features

– Comparison with GUIDE

– Summary of graphics support

– Examples

Page 11: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

11

Write Your Programs Once

Then Share To Different Targets

MATLAB

C/C++ExcelAdd-in JavaHadoop .NET

MATLAB

Compiler

MATLABProduction

Server

StandaloneApplication

MATLAB

Compiler SDK

Apps Files

Custom Toolbox

Python

With MATLAB

Users

With People Who Do

Not Have MATLAB

Page 12: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

12

Share with MATLAB Users

Package an App

Package Entire Toolboxes

Directly share MATLAB files

MATLAB

Apps Files

.mltbx

Custom Toolbox

Page 13: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

13

App Packaging

Apps are self-contained tools, typically with a

User Interface

Package your app as single installation file

– Easy distribution and installation into the apps

gallery

– Automatically includes all necessary files

– Documents required products

Page 14: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

14

Custom Toolbox Packaging

Package your toolbox as a single installer file

– Contains all of the code, data, apps,

documentation, and examples

– Checks for dependent files and

automatically includes them

– Documents required products

Included folders and files automatically

appear on path when installed

View details and uninstall toolboxes with

Manage Custom Toolboxes dialog box

Page 15: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

15

MATLAB Programs Can be Shared With Anyone

Share With Other MATLAB Users Share With People Who do Not Have MATLAB

Page 16: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

16

MATLAB Compiler and SDK

Integrate analytics with your enterprise systemsMATLAB Compiler and MATLAB Coder

MATLAB Coder

.exe .lib .dll

Page 17: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

17

MATLAB Compiler SDK or MATLAB Coder for C code?

http://www.mathworks.com/matlabcentral/answers/223937-should-i-use-matlab-compiler-sdk-or-matlab-coder-

to-integrate-my-matlab-applications-with-c-c

Page 18: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

18

Share with People Who Do Not Have MATLAB

C/C++ExcelAdd-in JavaHadoop .NET

MATLAB

Compiler

MATLABProduction

Server

StandaloneApplication

MATLAB

Compiler SDK

Python

Share Applications Built

Completely in MATLAB

Integrate MATLAB Programs

With Your Own Software

• Royalty-free Sharing

• IP Protection via Encryption

Page 19: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

19

Application Author

End User

1

2

Share Applications Built Completely in MATLAB

MATLAB

ExcelAdd-in Hadoop

StandaloneApplication

Toolboxes

MATLAB Compiler

MATLAB

Runtime3

Page 20: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

20

1

2

Integrate MATLAB Programs With Your Excel

MATLAB

Toolboxes

MATLAB

Runtime

Application Author

3

Application author and software

developer might be same person

Java

.Excel Add in

Python

MATLAB Compiler

Page 21: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

21

1

2

Integrate MATLAB Programs With Your Own Software

MATLAB

Toolboxes

MATLAB

Runtime

Application Author

Software Developer

43

Application author and software

developer might be same person

C/C++

Java

.NETMATLAB

ProductionServer

Python

MATLAB Compiler SDK

Page 22: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

22

Scale Up with MATLAB Production Server

Most efficient path for creating enterprise applications

Deploy MATLAB programs into production

– Manage multiple MATLAB programs and versions

– Hot Deployment: Update programs without server restarts

– Reliably service concurrent requests

Integrate with web, database, and application servers

MATLAB Production Server(s)

Web Server(s)

Page 23: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

23

MATLAB Production ServerEnterprise Class Framework For Running Packaged MATLAB Programs

Server software

– Manages packaged MATLAB

programs and worker pool

MATLAB Runtime libraries

– Single server can use runtimes

from different releases

RESTful JSON interface and

lightweight client library (C/C++, .NET,

Python, and Java)

MATLAB Production Server

MATLAB

Runtime

Request Broker

&

Program

ManagerEnterprise

ApplicationRESTful

JSON

Enterprise

Application

MPS Client

Library

Page 24: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

24

MATLAB Production Server Demos

MATLAB Analytics Running using MPS

Solar Radiation

Estimation WebApp

Page 25: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

25

Data

Layer

DatabasesData Warehouses

Presentation

Layer

Data Visualization

Analytics

Layer

EnterpriseOpen Source

Layers of Data Analytics

Page 26: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

26

Develop

TestRefine

MATLAB

MATLAB analytics for use with Spotfire desktop, web,

and mobile visualizations and dashboards

– Individual MATLAB sessions for small scale MATLAB analytics support

– MATLAB Production Server for large scale, robust analytics support

TIBCO

Spotfire

MATLAB Production Server

MATLAB

Analytics

Develop

TestRefine

MATLAB

MATLAB Analytics with TIBCO Spotfire

Page 27: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

27

MathWorks. MPSExtension

MathWorks. MPSExtension

Reference Diagram

Mobile Web Desktop

TIBCO

Spotfire

Web Player

TIBCO

Spotfire

Server

MATLAB Production Server

MATLAB

AnalyticsHTTP(s)

Page 28: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

28

Share with People Who Do not Have MATLAB

Program once, then choose your target:

– Desktop, Web, Enterprise applications

– C++, Java, Python, .NET

Royalty-free distribution

Encryption to protect your IP

Page 29: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

29

Online Resources

• Documentation – Create and

Share Toolboxes

• Website – Desktop and Web

Deployment

• Free White Paper – Building a

Website with MATLAB Analytics

• Website – Using MATLAB With

Other Programming Languages

Page 30: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

30

Additional Resources

Documentation

– Source Control Integration

– Techniques for Improving Performance

– Unit Testing Framework

Webinars

– Programming with MATLAB

– Speeding up MATLAB Applications

MATLAB Central

– Open exchange for the MATLAB and

Simulink user community

Page 31: Sharing and Deploying MATLAB Code · 2 Summary: Data Analytics Workflow Data Analytics •Data Pre-processing •Feature Extraction •Building algorithms, math models •Making business

31© 2016 The MathWorks, Inc.