Developer Zone

Advanced Software Development with MATLAB

Running MATLAB in the Cloud with Reference Architectures

The incredible growth and adoption of cloud based services make it an exciting time to be working at MathWorks with its rich history of technology to supercharge scientific computing workflows.

The scale and power of the public and private cloud offerings make it amenable to tackle increasingly large computation and simulation workloads while vastly simplifying the operational aspects of doing so. As MathWorks users are discovering the many benefits of leveraging the cloud, we strive to support their needs and enable their success.

For starters, I have seen incredible advances in the scale of computation with our products. Our conversations about results are discussed in orders of millions of MATLAB and Simulink simulations. As the scale of these systems explode, it is also remarkable to note the shrinkage of the time to run these huge simulation workloads - often in the orders of hours, minutes and seconds when running the appropriate stack of tools.

This summer, MathWorks introduced a one-stop landing page to address these use-cases and you can find it at https://www.mathworks.com/cloud.html. The full spectrum of our evolving support for cloud services can be found there. This support takes the form of the MathWorks Cloud as well as our support for the Public Cloud environments like Amazon Web Services (AWS), Microsoft Azure and other cloud systems.

Taking it further, MathWorks has released a set of reference architectures to support workflows ranging from prototyping in MATLAB, to full production quality stacks that can be provisioned on the cloud allowing our users to put their MATLAB models into production within their systems.

Reference architectures

The term reference architecture refers to a template solution detailing an architecture that involves our products composed in a configuration that adheres to current best practices. Given the wide variety of use-cases and scenarios that it attempts to address, it is intended to be used as a guideline, often in conjunction with various other building blocks of a complete solution. With these reference architectures, it is easy to get up-and-running with MATLAB by automating many of the steps in provisioning and configuring cloud infrastructure.

I have blogged in the past about our approach to being open and extensible. These architectures are no exception and have been released on github.com to allow full transparency into how they work and what they do - allowing users to use them standalone or fork and tailor to their needs. You can find them at:https://github.com/mathworks-ref-arch

Reference architectures themselves can be defined at various levels of abstraction, so let us take a closer look at a small sample of these templates.

MATLAB®

Templates for our flagship product, MATLAB, can be found for AWS and Azure. For the purposes of the rest of this post, I will use the terminology for AWS and Azure alternatingly to be fair to our users on these systems. (eg: cloud formation templates on AWS and Azure resource manager templates - aka ARM templates).

You can find the template for MATLAB on Amazon Web Services at: https://github.com/mathworks-ref-arch/matlab-on-aws and MATLAB on Microsoft Azure at: https://github.com/mathworks-ref-arch/matlab-on-azure

This reference architecture provisions a MATLAB instance in a VM running on the cloud and sets up the network and security required to access it. In pictures, this looks like:

If you are signed in to a valid cloud account, you can launch these stacks with no more than a few clicks.

Users can connect to the provisioned instance via remote desktop clients or if necessary via clientless access methods like noVNC or Apache Guacamole™. All it should take is a click of button and the selection of a few configuration options and Viola! MATLAB R2018a (Linux)... on the cloud.

MATLAB Distributed Computing Server™

A single MATLAB presents our development environment but your problem may be bigger, gnarlier and require a lot more horsepower. The next reference architecture of interest provisions a complete cluster of the MATLAB Distributed Computing Server product. This supports development workflows to scale the computational power of a single MATLAB session and give it more bite when applied to your problem.

In pictures, this looks like:

You can find this template for Microsoft Azure at: https://github.com/mathworks-ref-arch/mdcs-on-azure and for Amazon Web Services at: https://github.com/mathworks-ref-arch/mdcs-on-aws

Using it with your Azure account is as simple as clicking the deploy or launch button which will launch a cluster of our latest product R2018a on a cluster sized to your choosing.

MATLAB Production Server™

Mature workflows in MATLAB allow users to explore their data and develop a model or function. MathWorks Production Server enables developers to serve these models as scalable services that can be called from anywhere.

In pictures, this would look like:

Read more about using it on Amazon Web Services at: https://github.com/mathworks-ref-arch/mps-on-aws or on Microsoft Azure at: https://github.com/mathworks-ref-arch/mps-on-azure

In the past I have blogged about examples of taking a MATLAB model quickly from prototype to production without costly inefficiencies. Many of those examples are powered by such stacks of our software on the cloud. The wider view of this stack is that it enables MATLAB technology to work well with the rest of your solution and scale to meet the demands of the enterprise as needed.

Integrate with other solutions

MathWorks products play well both in workflows that are standalone as well as instances where they need to function as a part of a much bigger solution stack. There are other reference architectures for connecting these MathWorks stacks to products like TIBCO Spotfire®. The end objective of all of this is to provide you, the reader, easy access to our products on the Cloud environment of your choice.

Putting it all together to build something real

The building blocks above can now be composed into much richer full solutions. For example, below is the architecture of a MathWorks powered analytics platform addressing the needs for both streaming analytics and batch analysis of data coming from a collection of connected cars. There are several ways to build such a system with managed services such as ThingSpeak or as services within a custom application specific platform.

While the system architecture picture looks complicated, each of the light grey patches on the picture correspond to the reference architectures for MATLAB, MATLAB Distributed Computing Server and MATLAB Production Server discussed above, provisioned on the cloud with a few clicks.

Architectural pictures such as the one above may look strange and puzzling to someone who is seeing it for the first time, but they can be made as easy to develop and launch - as easy as clicking some of the buttons on reference architecture documentation pages.

In conclusion, if you are on the cloud, we've got your back. If you are on the developer side of DevOps practices, the key takeaway is that building these systems to best practices can be easy with proper reference patterns. If the word DevOps is new to you... well... that is a fertile topic for another day. Please stay tuned!




Published with MATLAB® R2018a

|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.