Is it possible to use MATLAB on the Server Side of my Website?
18 次查看(过去 30 天)
显示 更早的评论
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:
- The code inside this ALGORITHM.m is meant to be kept private/unreachable by my clients (commercial purposes).
- 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.
0 个评论
回答(2 个)
Andreas Goser
2016-7-11
2 个评论
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
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Production Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!