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

18 visualizaciones (últimos 30 días)
Jose Lopez
Jose Lopez el 10 de Jul. de 2016
Editada: Walter Roberson el 29 de En. de 2022
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.

Respuestas (2)

Andreas Goser
Andreas Goser el 11 de Jul. de 2016
This looks like a good match for MATLAB Compiler SDK
  2 comentarios
arshiya aggarwal
arshiya aggarwal el 29 de En. de 2022
Could you please elaboarte on how to use Compiler SDK for such tasks?
Walter Roberson
Walter Roberson el 29 de En. de 2022
Editada: Walter Roberson el 29 de En. de 2022
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.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 11 de Jul. de 2016
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.

Categorías

Más información sobre MATLAB Production Server en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by