Is it possible to use MATLAB on the Server Side of my Website?

18 ビュー (過去 30 日間)
Jose Lopez
Jose Lopez 2016 年 7 月 10 日
編集済み: Walter Roberson 2022 年 1 月 29 日
Hello all, I am new to the forums.
I am an experienced MATLAB user. I think this hasn't been asked before (or at least I haven't found it on the forums), so here is what I'm trying to achieve:
I am building a web service. My users log-in to the website, then a ALGORITHM.m file needs to execute on the server and return the output to the client-side. I am doing this for two reasons:
  1. The code inside this ALGORITHM.m is meant to be kept private/unreachable by my clients (commercial purposes).
  2. The computations would be done faster on the server-side than on the client-side.
The question is thus: how can I run a *.m file in the server that receives and parses information from some users' field inputs, then return the OUTPUT back to them? What licenses should I have in MATLAB if this is meant to be used for commercial purposes? (I have an educational license but I doubt this will be enough). Is there a more economical/friendly alternative than using MATLAB on the Server?
Thanks.

回答 (2 件)

Andreas Goser
Andreas Goser 2016 年 7 月 11 日
This looks like a good match for MATLAB Compiler SDK
  2 件のコメント
arshiya aggarwal
arshiya aggarwal 2022 年 1 月 29 日
Could you please elaboarte on how to use Compiler SDK for such tasks?
Walter Roberson
Walter Roberson 2022 年 1 月 29 日
編集済み: Walter Roberson 2022 年 1 月 29 日
MATLAB Compiler SDK allows you to create callable libraries that can be invoked from programs that act as web servers, including .ASP or other routines coded for .NET use.
You would need to have a server that invokes something that decodes the parameters obtained by the POST action, and makes a call to the created library call, and sends out the results.
Caution: if you do not use MATLAB Production Server then it can take one to two minutes for the library to initialize the MATLAB environment.
An implication of this is that for performance you might want to keep a live MATLAB process and use the Engine API to talk to it. If I recall correctly, this cannot be done with Compiler SDK, for license reasons if nothing else.
Also, you need to be careful, as executables from MATLAB Compiler and Compiler SDK are not designed for hardened access -- not certain to be crack-proof. Not, for example, thoroughly tested for buffer overruns.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2016 年 7 月 11 日
If you have commercial access to such a system, then the license required is the Floating Network license if I recall correctly. Basically it is the most expensive form of limited capacity license that MATLAB offers.
For heavier traffic, my understanding is that you might need to go for MATLAB Production Server.

カテゴリ

Help Center および File ExchangeMATLAB Production Server についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by