Is that possible to run MatLab runtime on Azure Function?

조회 수: 1 (최근 30일)
Yinhe Zhu
Yinhe Zhu 2019년 5월 21일
답변: Tim Choo 2020년 5월 1일
Since I want to build IoT with Azure, and I need to Matlab to compute and analyse data from IoT, I want the computation on Azure, and output to Cosmos DB. What is best way to implement it? Any ideas guys?
  댓글 수: 3
Yinhe Zhu
Yinhe Zhu 2019년 5월 24일
Yes, you're right about running matlab on the same the operating system in cloud and at local. I have successfully deployed MatLab and Matlab RunTime on Azure VM in windows 10.
My real concern is that since my aplication needs to talk to IoT, I have many sensors collecting data from IoT and send to Blob consistently. Once the data is in Blob, I need to trigger matlab runtime or matlab to process the data. I'm not sure which one is suitable for this taks, matlab, matlab parallel or matlab production server?
Walter Roberson
Walter Roberson 2019년 5월 24일
If you are starting one process and it is continually running and processing one stream at a time, then you amoratize startup costs, and any of those would be fine.
However, if you are starting up a number of different processes, perhaps one per stream, then startup time can start to become important, and in that case MATLAB Production Server would tend to become what you would want.
If the data is being sent via UDP, then even though in theory you could have one server for all clients (provided you could process the data quickly enough), in practice MATLAB udp() does the equivalent of a bind() operation: you cannot easily listen for all UDP packets addressed to the socket, you need to create a connection that listens to a particular endpoint. That makes MATLAB less than ideal for high-volume low-dwell updates.

댓글을 달려면 로그인하십시오.

채택된 답변

Saumya Goel
Saumya Goel 2019년 5월 24일
Please have a look at these GitHub links:
  1. MATLAB Azure Cosmos DB - https://github.com/mathworks-ref-arch/matlab-azure-cosmos-db
  2. MATLAB Reference Architectures for Cloud - https://github.com/mathworks-ref-arch
  댓글 수: 2
Yinhe Zhu
Yinhe Zhu 2019년 5월 24일
Hey Saumya,
I have checked the repository you suggested. I read and tested the communiocation between matlab and Azure Blob/Cosmos DB. And I also depolyed Matlab on Azure VM in windows operating system since my local environment is windows 10.
My concern is what is the best way communicate with IoT. Since sensor's data comes to Blob consistently, and there will be more than one data that Matlab need to process concurrerntly. So I'm confused about what is the suitable solution for this case?
Pallavi Kar
Pallavi Kar 2019년 5월 31일
편집: Pallavi Kar 2019년 5월 31일
You can use the MATLAB Production Server reference architecture to deploy MATLAB Production Server on Azure. This tool allows you to process web requests in Parallel. Link: https://github.com/mathworks-ref-arch/matlab-production-server-on-azure
For info on MATLAB Production Server: Watch this video
You can also use Azure IoT Hub to connect your devices to it. Azure IoT hub can receive event triggers and pass data through routes and endpoints. One of this endpoint needs to be MATLAB Production Server.
2 kinds of example routes:
  • Route data as it comes to MATLAB Production Server(endpoint), which can run a compiled MATLAB Analytics in parallel. Learn an example of how to take MATLAB Analytics to MATLAB Production Server.
  • Alternately, if a certain kind of analytics needs to run over a longer period of time, IoT hub can pass/route the data to blobs(endpoint) instead and invoke a scheduled MATLAB Production Server hosted analytics.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Tim Choo
Tim Choo 2020년 5월 1일
In addition to the cloud reference architecture, MATLAB Production Server is also available from the Microsoft Azure Marketplace: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/mathworks-inc.matlabprodserver-byol?tab=Overview

카테고리

Help CenterFile Exchange에서 Licensing on Cloud Platforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by