From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying...
Transcript of From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying...
![Page 1: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/1.jpg)
1 © 2013 The MathWorks, Inc.
From Apps to Web Services:
Deploying Your MATLAB Algorithms
and Applications
Marta Wilczkowiak
![Page 2: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/2.jpg)
2
Why deploy your MATLAB algorithms?
Raise awareness of your work
Reduce duplication of efforts
Serve your customers better
Reduce errors caused by reimplementation
Accelerate development cycle by avoiding recoding
![Page 3: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/3.jpg)
3
Deployment considerations
Where would the algorithm live and how it will interface with the world?
Will the end user need and have access to MATLAB?
Will the product be standalone or a part of larger system?
Will many users need to access this functionality at the same time?
What is the performance requirement?
What product features are required?
![Page 4: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/4.jpg)
4
Deployment options
MATLAB Apps
MATLAB Complier
– Standalone applications
– Software modules
MATLAB Production Server
MATLAB Coder
C
![Page 5: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/5.jpg)
5
Deployment options
MATLAB Apps
MATLAB Complier
– Standalone applications
– Software modules
MATLAB Production Server
MATLAB Coder
C
![Page 6: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/6.jpg)
6
MATLAB Apps
MATLAB Apps: Custom interactive
applications running in MATLAB
Easy to package, install and find
Support full MATLAB language
Require MATLAB to run
![Page 7: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/7.jpg)
7
Deployment options
MATLAB Apps
MATLAB Complier
– Standalone applications
– Software modules
MATLAB Production Server
MATLAB Coder
C
![Page 8: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/8.jpg)
8
MATLAB Builder™ EX
MATLAB Builder™ JA
.NET COM Excel Add-in
Java www
MATLAB Builder™ NE
.exe .dll/.lib
MATLAB Compiler™
MATLAB Compiler and Builders
Generic
CTF
![Page 9: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/9.jpg)
9
Application Virtual Machine Concept
MATLAB
Compiler
MATLAB
Source Code
MATLAB
Encrypted Code
MATLAB Compiler
Runtime (MCR)
JAVAC
Java
Source Code
Java
Byte Code
Java Runtime
Environment (JRE)
Execute
Visual Studio
Compiler
.NET
Source Code
.NET
Byte Code
Microsoft Common
Language Runtime (CLR)
Execute Execute
Various language implementations
![Page 10: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/10.jpg)
10
MATLAB Compiler Product Summary
Automatically packages your MATLAB programs as
standalone applications and software components
Supports full MATLAB language
and most toolboxes
Allows royalty-free deployment
![Page 11: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/11.jpg)
11
MATLAB Compiler and Builders What’s new?
Improvements for all phases of application deployment
– Compiling apps … greatly improved usability provided by a
toolstrip user interface
– Distributing apps … customization options create a more
professional software experience
– Installing apps … faster and more reliable download and
installation of MATLAB Compiler Runtime (MCR)
![Page 12: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/12.jpg)
12
Compiling Apps App and User Interface Changes
Two new apps for deployment – Application and Library
– Both apps utilize tool strip style user interface
Automatic download of runtime (MCR)
– Ensures end user has correct version for their platform
![Page 13: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/13.jpg)
13
Distribution and Installation Improved End Customer Experience
Customizable Installer
Icon
Splash Screen Application in Start Menu
![Page 14: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/14.jpg)
14
Deployment options
MATLAB Apps
MATLAB Complier
– Standalone applications
– Software modules
MATLAB Production Server
MATLAB Coder
C
![Page 15: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/15.jpg)
15
MATLAB Production Server
Directly deploy MATLAB programs into production
– Centrally manage multiple MATLAB programs & MCR versions
– Automatically deploy updates without server restarts
Scalable & reliable
– Service large numbers of concurrent requests
– Add capacity or redundancy with additional servers
Use with web, database & application servers
– Lightweight client library isolates MATLAB processing
– Access MATLAB programs using native data types
HTML
XML
Java Script Web
Server(s)
MATLAB Production Server(s)
![Page 16: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/16.jpg)
16
MATLAB Compiler vs MATLAB Production Server
Package
MATLAB
Source Code
MATLAB
Component
MATLAB Compiler
Runtime (MCR)
Execute
.NET
Package
MATLAB
Source Code
Request
Broker
&
Program
Manager
MATLAB
Component
Execute
![Page 17: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/17.jpg)
17
What is MATLAB Production Server?
Enterprise class framework for running
packaged MATLAB programs
Lightweight client library (for .NET & Java)
– Request MATLAB programs (functions)
Server software
– Manages packaged MATLAB programs &
worker pool
Runtime libraries
– MATLAB Compiler™
Runtime (MCR)
.NET
Request
Broker
&
Program
Manager
MATLAB
Component
![Page 18: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/18.jpg)
18
Amazon Machine Instance Analysis Server
Example: EXPO Conversations
Java Application
Agent1
Agent2
Web Server
results
.gif
.json
.csv
![Page 19: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/19.jpg)
19
Example: EXPO Conversations
MATLAB
Trigger Agent 1
Agent 2
Java
Trigger Agent 1
Agent 2
MPS
Executor MPS Worker
MPS Worker
![Page 20: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/20.jpg)
20
Deployment options
MATLAB Apps
MATLAB Complier
– Standalone applications
– Software modules
MATLAB Production Server
MATLAB Coder
C
![Page 21: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/21.jpg)
21
MATLAB code
C code
Compiled C code (MEX)
MATLAB Coder
![Page 22: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/22.jpg)
22
Accelerate Implement
Prototype Integrate
![Page 23: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/23.jpg)
23
Deployment options and considerations Summary
MATLAB Apps MATLAB
Compiler
Builders MATLAB
Production
Server
MATLAB Coder
Using live
MATLAB Yes No No No No
Packaging MATLAB App exe, dll
java class, .NET
assembly, Excel
add-in
generic ctf
calls over http
c/c++, dll, lib,
exe
Simultaneous
access No No No Yes No
Latency Medium Medium Medium Low Very Low
MATLAB
feature support Rich Rich Rich Rich
Subset of
MATLAB and few
toolboxes
![Page 24: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/24.jpg)
24
Use cases
Clustering tool
Medical image segmentation software
Pension calculator
Component of an industrial image-based quality
inspection software
![Page 25: From Apps to Web Services: Deploying Your MATLAB ...€¦ · From Apps to Web Services: Deploying Your MATLAB Algorithms and Applications Marta Wilczkowiak . 2 Why deploy your MATLAB](https://reader035.fdocuments.in/reader035/viewer/2022070808/5f0771ef7e708231d41d0477/html5/thumbnails/25.jpg)
25
Why deploy your MATLAB algorithms?
Raise awareness of your work
Reduce duplication of efforts
Serve your customers better
Reduce errors caused by reimplementation
Accelerate development cycle by avoiding recoding