Deploying MATLAB Models to Web and Production for Finance
From the series: Using MATLAB in Finance 2020
Dive into some of the most common and effective ways MATLAB® models are deployed and shared in the financial services industry. Learn about a new product, MATLAB Web App Server™, which allows for web deployment and browser-based access of graphical applications, as well as MATLAB Production Server™, a tool used for robust, scalable deployment of MATLAB functions as RESTful endpoints.
Published: 10 Dec 2020
Hi, everyone. Thank you for coming. My name is Steve Notley and I'm an application engineer with The MathWorks, and I specialize in working with our customers in the financial services industry. And during normal non-pandemic times, that means I usually travel around, talk with our customers in the financial services industry, listen to the interesting problems that they're currently trying to tackle, and help them solve them efficiently and effectively by using MATLAB and the associated tools here.
So today we're going to be talking about deploying MATLAB models to web and production. So we're going to have kind of two separate topics, the web portion of that, and then the production portion of that. So we're going to begin to touch on how you can develop and share graphical web applications from within MATLAB, and then we're going to switch gears a little bit and talk a little bit more generalizable deployment and how you can share your models for production system by sharing them as RESTful endpoints that can be accessed by HTTP calls.
So to start off with let's talk about deploying our applications to web. So this is a question that comes up a lot with our customers, how can I make my models useful and accessible. And it sounds like a simple question, but there's kind of a lot to actually unpack here.
So it's important that your models be useful not only to technical stakeholders, programmers, people who work in MATLAB, work in other languages and may be able to look at your code and understand your model well, it's also important that it can be accessed by a lot of the non-technical stakeholders that may be able to get real benefit out of your model. These could be people on the business side of your company or even some of your customers and clients who will be accessing these and trying to get the most out of it.
So we can look at some ways today that we can make our models as accessible as possible. And one of them is going to be something like this. What we have here is a MATLAB web app server, and I'm seeing what would be my library of apps here today.
I only have one app here. I can click into this so that we can get a view of what this looks like. And what I'm going to see here is a completely browser-based application that is completely interactive and designed entirely in MATLAB.
So I can click on any of these interactive components. For example, I can click here to import my data, I can select a file here and send that off to the server. I can go ahead and click through these various views, run my analysis, and actually send that request to the server to be evaluated and then observe all of the MATLAB graphics as these results come back in.
So this is something that's created entirely using MATLAB, something that I can use to communicate and share these technical pieces of code, these techniques with, even if someone isn't a MATLAB user or maybe isn't a programmer at all. So we're going to use this as a little bit of a case study and talk about what goes into this, how can I actually get here, how can I make something like this as a method to share my models.
So we'll jump back into PowerPoint for a moment here. So this kind of concept is becoming broadly a little bit more popular. There's this idea of creating these applications, these visual web apps as a vehicle for your models. So the reason for this is exactly what I was kind of just getting to a moment ago, which is that they can be a powerful way to make your models accessible to a very wide audience of both technical and non-technical stakeholders.
So why doesn't everybody do this? Why is it still at the end of the day that engineers will usually produce something that maybe is used in a command line or as part of a programming language? And that's because there's some important things that tend to stand in the way of this process. Oftentimes, lack of web programming experience is a significant barrier. If you have engineers who are programming analytics in one language, oftentimes there are specialized languages like JavaScript and associated packages that are often used to create web apps.
So that can mean an engineer needing to pick up a very different language than the one that they're familiar with or potentially hiring a new engineer for performing that part of the project, and then on top of that, it can also add significant time to a project a lot of the time. If you're talking about either of the approaches that I just mentioned, maybe an engineer has a ramp up on a new language or even if that's not the case, it still is a largely separate engineering effort to design a web page from scratch.
And so how we aim to kind of eliminate this barrier and make this a smooth and easy process for everybody is an environment right within MATLAB that we call our App Designer that allows you to create and share apps very easily. And what this is is essentially a design canvas that allows you to quickly develop these graphical components by using a drag-and-drop interface.
So there's no need to learn another language to make these interactive components. You can do it interactively and all of the code will live directly within MATLAB, and then you can create hooks back to this interactive functionality to your MATLAB analytics without really any additional steps.
So let's take a look at what App Designer actually looks like and what it feels like to design applications like this. So I'll just go ahead and jump into MATLAB here. And if I go ahead and type appdesigner, all one word, right at the command window, click Enter, my panel for App Designer will come up here.
So you can see it loads up this starter page. I can pick my format. You can see that there are a lot of different examples and templates for me to pick from if I want to leverage some of the examples that MathWorks has already provided. For now, I'm going to start with a blank app just to give a realistic example of what it feels like when you're starting a new project.
And so from there, we can jump right into it. So I have my blank canvas that will ultimately become my app, and I can see all of the components that are available for me here. So we can just make something pretty simple here. So let's throw an axes on here that we can use to plot and to display information, and I can put a button here, as well, to interact with this.
And so you can see, like I mentioned before, it's an easy drag-and-drop interface. And you can see up at the top right here that currently we're in what's called the Design View. So if I want to see the code that underpins this, I can go ahead and switch over to the Code View, and I can see all of the MATLAB code that's actually being generated to render these graphical components as I'm doing this interactively.
So for example, you can see the code to create this button here to configure it properly, and you can see the similarly code to create my axes and ensure it's in the proper location with the proper axes labels, et cetera. And so I can go ahead and continue to change attributes of this.
So let's say I want this button to plot something on this axis. I can go ahead and call it a plot button. And so if I go back to the code view, I can see again this line of code necessary to make that change is being updated and generated in real time, as well.
So how do I actually take these visual components that are now very easy to generate, very easy to create, and actually link them back to MATLAB code, to my analytics, to my models so that that can all run together? And the answer is that that's done by something that we call callback functions. And so a lot of these interactive components will have what we call callback functions that you can use to define what happens when a certain action is taken on that component.
So if I go ahead and click on my button here, I can see that there's a callback option, and I can see I have the ability to add something called a button pushed function callback, which is exactly what you'd imagine it would be. It's basically saying, hey, I'm going to go ahead and define the behavior that's going to happen in MATLAB when this button is pushed. So if I go ahead and click that, it'll take me back to my code view. It'll generate that function for me, and I can see now that I have this little white strip within this function.
So all of this other code is in this kind of gray area, and that means that that's the graphical code that's been automatically generated by MATLAB, whereas these white sections are sections for me to fill in my code to define custom behavior here.
So I'm inside of my plot button pushed function, and so let's go ahead and define the MATLAB code that will be run when I push this button. So I'm just going to create a simple plot. I want to plot on my UI axes, so I'm going to grab the handle for that component. And then we'll just plot some random lines for this example. So let's say every time we press this button, I want 10 random lines to be plotted on this.
So a simple line of code, and when I'm all set there, I can go ahead and run this. Save it quickly. And my app comes up here exactly as I've designed it, and now I can interact with it. So when I go ahead and press this plot button, you'll see that my 10 random lines get plotted.
Now this is obviously just a toy example, but this is really a powerful interface that can be extended to really complex applications, and to give you a little bit of a feel for that, I'll go ahead and open up the app that we saw at the beginning of this that was deployed to web here. So you'll see I have a .ml app file that stores my App Designer app here. So I can go ahead and open that up.
This will take a minute to open because it's significantly larger app. And you can see here, just like the other one, this app is available for me to edit in this canvas, and it's made up entirely of these same drag-and-drop components, including all these various tabs that have all of my tables for displaying data, all of my axes for showing the graphics that I have here. And this can be built up in largely the same way in.
Similarly, back in my code view I have all of my callbacks that define the behavior of actually running these analytics and hooking back to other external functions that maybe in a real world scenario that my quants have created or that my researchers have come up with and I now want to package up to distribute here.
So now that we have an app like this, it brings up the question of exactly how do I share it, how can I go ahead and actually take that step. So I have this here, it runs on my machine, and now I need to get it to bridge that gap to that web page that we saw at the beginning.
So right in App Designer, you might have noticed up at the top that there's this nice little Share button, and if I click on that, it gives me a couple of options here. So I can share it as a MATLAB app, which is good for sharing with other MATLAB users, other people who have access to MATLAB license. I have a standalone app that I can distribute to people in order to install a local copy on their machine. Or the third option, which is what we're going to be focusing on today, is actually compiling this to an application that can be deployed, accessed, and run on the web entirely, so only access through a browser.
And so I'll kind of jump back into PowerPoint to elaborate a little bit more on this capability and then we'll see exactly how it's done. So this ability to share MATLAB apps as these components that can be accessed in a web browser is something that is a capability that comes from a fairly new product for us called MATLAB Web App Server. And this allows for, as I mentioned, in-browser access to MATLAB developed apps without needing a MATLAB license.
And now that's kind of an important note here because if you're a MATLAB developer, you're developing your models, your components, and ultimately these apps in MATLAB. If you want to distribute that MATLAB code and have them run it in an IDE like we have been doing so far, anyone who wants to do that would need a MATLAB license.
And so this web app distribution is one way that you actually can distribute it to people who don't have MATLAB license. They don't even need to know that this is a MATLAB-based tool, they can use this app without having any kind of business arrangement with us, and it doesn't cost you as a user any more as more people access these apps either.
And so beyond that distribution capability, it provides a really easy way to deploy these apps. You can actually do it with we call it one click compilation, and you'll see that in just a moment. And then once it is deployed you can be assured that it's very secure. We offer support for a couple of different kinds of authentication, and we also offer support for user roles. So you can define different roles for different users for who has access to view certain apps, for who has access to actually author and upload new applications and things like that.
And finally, it makes your life a little bit easier by having support for multiple releases of MATLAB. So if you have a few different people who are developing apps and they have different sets of tools, they have different versions of MATLAB, that is no longer a problem. You don't have to worry too much about coordinating that or making sure that the different versions of MATLAB all agree. A MATLAB Web App Server can support and host applications that are created through a few different versions of MATLAB.
So let's go ahead and see what's involved in the process here and how we can actually go ahead and make this happen. So once I get up to my Share component here, I can click on that Web App option, and I'll get a little dialogue here that shows that my app is building. And while that is building, I can go ahead and spin up my MATLAB Web App Server.
So I showed it to you before, so I'd actually spun it up beforehand, but when you actually start your Web App Server you'll get a little dialogue like this. And you'll get, notably, one folder that is called the Apps folder, and it will give you an address on your machine where this server is essentially going to look for apps to be deployed. So I can go ahead and navigate to that location. And when my app is finished compiling here, I can open my output folder.
So this is the results of my compilation. I can see I have a few different files that act as logs and documentation of the compilation process itself and what took place. And then finally I have the most important piece here, which is this .ctf file.
Now this .ctf is MathWorks' own file extension, and essentially it's a file that is fully encrypted so that your analytics are secure. It contains all of the code necessary to run your app, and it contains instructions for the server on how to automatically deploy this app. So everything is really combined into this one file, and this is, for all intents and purposes, your final product.
So once I have this, it's very easy to deploy it. So I have another file location here. This is that location on my machine that my server told me where it would look for apps. And you can see I already have a version of this here that I showed at the beginning, but it's really as simple as just dragging and dropping this new version of this file or adding additional files here.
And then the next time that I go ahead to my actual web browser and I refresh this, I'll see the new version of the app here for my users to take advantage of. So very easy, very quick process to actually deploy these and get these out, and once you have this server set up, don't even need to take it down to have any updates pushed to apps or have new apps be deployed. This is something that you can do live and with really very little fuss. So nice and easy to administer and easy for your users, as well.
So that is essentially it for the developing web application section. So let's move on to a little bit of a different topic. And the difference is a little bit nuanced, and the question here is really how can I integrate my MATLAB models into production systems. And the reason why we ask this is because in real world systems, as they get bigger, as they go to scale, it's really never going to be just one technology. There's a lot of things that play in and it can be a little bit of a task sometimes to figure out how all these things are going to work together.
So let's take a look at an example of what we exactly mean here. Close out some of these to clean up from the previous run here. So let's take a look at a different web page here. So what I have here is a deployed web page written mostly in JavaScript here, and it's something that I'm going to use as a tool for counterparty credit risk analysis.
So I can go ahead and interact with this here. It's just a normal JavaScript page, but when I go ahead and click this Run Analysis, what this is actually doing is it's shelling out calls to a MATLAB Production Server, as we call it. And that's something that allows your MATLAB code to be served up as RESTful end points so that they can be accessed by essentially anything that can make an HTTP call.
So super general broad spectrum deployment that's useful for a wide variety of purposes, and is very useful for distributing your libraries as nice reusable pieces of production code that can run remotely. So before, the analytics and the apps were all running in one place, very tightly coupled with the other product, with MATLAB Web App Server, and this Production Server allows for a more general decoupling of this. I have one server running my actual web page and I have another server serving MATLAB Analytics to both this web page and many other clients that might want to take advantage of the same analytics.
So again, as we did with the Web App Server, we're going to use this as a little bit of a driving example for talking about what are the considerations here, what kind of problems often crop up when you're making a system like this, and ultimately, how do we end up here. How do we end up with something that looks like this. So for now let's jump back into some slides and talk a little bit about that.
So as I started to mention before, it takes a lot to make these systems work. You might have a lot of different tools, programming languages, you might have analytics that spread maybe three or four different languages, different technologies for displaying things. A lot can go into these things.
And for every pairing of these technologies, there are important questions that you need to ask. Is there an interface between the relevant sections that I need to talk to each other to make these work on the same machine, is there a way to deploy this to make it available and go about it that way instead. And this can be sort of a lengthy process, so we aim to try and simplify this any way we can.
And beyond that, it may involve things like making code changes to allow those functions to play nicely with these other tools, or even writing my own infrastructure code for servers in the event that I decide to deploy it and make this available that way. So it can be a very manual process to set this up and it can add a lot of overhead to projects even when all of the relevant pieces are-- the engineering effort is already completed there.
So we believe that it should be really easy if you have all these components in place to make that leap into a production environment where they're working together seamlessly. And that's why we have the MATLAB Production Server, and in short, it allows you to deploy these MATLAB algorithms to a server to make them available without needing to do any recoding or without needing to create any of your own custom infrastructure. We want to automatically take care of all of that for you.
And so once you have MATLAB functions that are living on this server that are available and deployed, you can run those MATLAB functions remotely by calling the server via bunch of different client libraries for various programming languages that we have, or more generally speaking, by REST calls. So we use the REST standard for making HTTP calls, and so this can be queried by anything that can make an HTTP request, from your browser to certain kinds of business intelligence tools, all the way to pretty much any major programming language out there.
And again-- another important point that I highlighted with the Web App Server, but the same thing applies here-- the people who are pinging this server, the people who are taking advantage of these analytics, they do not need any kind of MATLAB license in order to query the server. Again, your end users don't even really need to know that this is MATLAB, what it's based off of, it's totally general, totally agnostic, and certainly doesn't come with any licensing entanglements for your end users that you want to distribute this to.
And this allows you to really easily administer this server, as well, from an IT perspective. So you can manage multiple server instances at a time and you can do this using some of the web-based utilities that we provide, as you can see here. That's what we're going to be using today. Or if you want to go a little bit more fine-grained and really be able to tune every small aspect, you can absolutely do that, too, and we have a whole bunch of command line utilities that expose that functionality for you, as well.
So let's go through a little bit of that development process. Let's take a look at how we get from having an analytic on my local MATLAB instance for me as the developer, having created this, how we can go ahead and test that in a production environment, integrate it with a client that calls this stuff, and then ultimately, spin up an instance of that MATLAB Production Server and get it deployed out and making real production-grade calls here.
So I'm going to jump back into MATLAB. Let me navigate over here. So I essentially have two different directories over here that you can see. I have my MATLAB portion and my web page here.
So this is essentially-- you can think of this as in a real world scenario, these might be two directories that exist on two completely different engineer's machines. One living on your web developer's machine, who's in charge of taking results from these analytics, which as far as they're concerned are maybe black boxes that they just know, hey, I need to paint it with these inputs and I get these results back. It's my job to display it, to make it pretty, to make it interactive.
And conversely, you have the person who's developing analytics in MATLAB who knows that they need to develop these functions to accept these inputs and do the proper calculations and return those results.
So let's take a look at the web page here first. So I can see I have a whole bunch of different HTML, CSS, and JavaScript pages to open this up. If I go ahead and open this main page outside of MATLAB, I can see it's exactly the same pages before, it's just now the local address version. So this is going to be our client that we're going to use to ping the server and use for our testing purposes here.
And if I take a little bit deeper of a look, into some of the JavaScript code here, I can actually see how these calls are being made. And so I can see that it's expecting these analytics to be deployed at these URLs, I can see that it's looking for the get riskmetrics, get sensitivity plot functions, and ultimately when it's called, it's just a server request with some JSON inputs that sent over HTTP here.
So my web developer can go ahead and create those things, assume that there's a black box, assume that those analytics will be there, and now I can switch over to the MATLAB user perspective and say OK, now it's my job to build these, to make sure that black box functions as expected for my web engineer here. So I can see here, I have all of the functions that are relevant for this kind of work. I have a whole bunch of them, and together they form, essentially, a library of functions that rely on each other, some of which I want to expose, some of which are internal for me.
And if I take a look at any one of these, I can see, as I mentioned, there's no recoding and there's no special sauce required from a programming perspective to make this available to be deployed by the web. These are all normal MATLAB functions doing normal calculations and there's nothing in particular or special about these functions.
So once I have all of this-- we'll go ahead and assume that I've already fully developed this code, I've tested my code in its own right. I know that these analytics work and we'll go ahead and take all of that for granted and say that I am right at the portion of my testing where I want to make sure that the two different pieces written in these different languages can work together well, and then I want to go ahead and push it out to production.
So I can go ahead and go to my Production Server compiler app in my Apps tab down here, and that'll pop up my dialogue that I can use to add any functions that I want to be part of this library, and add that list of functions that I want to be exposed and available for use here.
So I have quite a few functions to add, so to save a little bit of time, I've already saved those in a project. I'll go ahead and load those up. And you can see I have a bunch of these functions that you just saw that are now going to be exposed by this library and made available for other people to use here.
And now another nice thing that this compilation will do-- and I didn't point this out earlier with the Web App Server, but the same thing happens there under the hood-- is once I've decided what needs to be compiled and actually packaged up, MATLAB will go ahead and do an automated dependency analysis. So we'll go through, see what other functions are being called, what other files are being used, and it'll sweep all of those up for me.
So this is actually all of the functions that are required for these functions to run, and MATLAB has automatically figured out what those functions are, found where they live on my path, and included them here to be compiled, as well.
So before I go ahead and do that final packaging, we can actually test the client connection and see if it works well in a realistic scenario with my web page here. So if I click to start this test session-- I can see I can decide what port I want this to run on, I can do some configuration for any testing that I want to do in particular-- gives me the address where these things will be found for this temporary server, and then I can go ahead and click Start.
And now what this has essentially done when I click Start here is it has on my local machine basically created a very minimalist simple version of a Production Server to emulate how these interactions will take place between these components locally. So this server has now been started, and I can now treat this as if it were the real thing in production here, and that's exactly what we're going to do.
So I'll put this over to one side of my screen so we can see. I'll put my client over here. And let's go ahead and interact with this exactly the same way that we did with the finished production model before.
And when I click this Run Analysis button, you can see the calls actually coming in here. You can see when they get sent, you can see what functions are being called from my library, and you can see the status of the requests, and they'll tick up and show as complete when they do, or if anything fails here you'll see that, as well. And I can see a total log of the interactions with the server, as well.
So once these calls complete, I can see my web page has rendered as normal. My web developer will be very happy that everything is working as expected. And for my part, if I want to see any more details on any of these tests, I can actually just go ahead and click right on these and I can see a little bit more info about what info was passed into these functions, what I got back in return in terms of data type, byte transfers, et cetera.
And this is especially important, of course, if any of these fail, I definitely want to see what the conditions were that caused that to happen. And so this is a good place to kind of author test suites on the client side, to put this through its paces, and make sure that the communication is happening as you would expect, as well.
So once I am content with that, I can go ahead and stop this test. I'm going to close it out. And now we can say, I've checked that off, I've tested this, I'm ready to deploy it, and I can go ahead and click this Package button. Now I'm not actually going to click it because there is a lot of functions here and it'll take four or five minutes for this to compile. I don't want to keep you guys waiting, so I jump back into MATLAB and show you what you'd end up with as a result here.
And what you would end up with is a folder that looks just like this that has the name of your library there. And if I go ahead and drill down into this, we can see, just like last time, I have this .ctf file. And this, again, is kind of all important file here, used for deployment. Totally encrypted so that everything that's in there is safe. Contains all of your code and contains the instructions necessary for the server to actually deploy this.
So this is the thing that I'm ready to put into my real server here. So we can go ahead and spin that up. I'm going to go back and spin down my Web App server, and then I'm going to start up, similarly, a MATLAB Production Server here. This is now running. I can go back to my web page before and I will now see the ability for me to log into my MATLAB Production Server.
And now I can see I have my dashboard here that's ready for me to administer the server. So it's currently not active, so we can go ahead and bring that up here. So now once the server has been brought up, I can see on my little activity graph here-- well I can see, first of all, a bunch of physical stats about the machine itself, what resources are available, and I can see the graph here of activities that have come in and resources that are available.
So you'll notice I have this Available Workers plot here that has ticked right up to four, and what these workers essentially are are the MATLAB instances that are running on this server that are available to process these requests.
So when I go ahead and make one of those RESTful calls like we saw in my client-side code, what this will essentially do is say, hey, a request to evaluate this function came in, it'll grab one of these workers, that worker will run the MATLAB code for that function, calculate the results and return it back, and then be released and ready to handle whatever the next job is that comes in.
So I have four of these spun up, which means I can basically handle four of these concurrent requests coming in at the same time. So now we can go ahead and deploy our application.
So if I go over to the applications tab here, you'll actually see that I have an old version of this here, but if I wanted to deploy a new version here, all I have to do is say Upload and Deploy a New Archive. I would choose my file. I can go back to MATLAB to make sure I get the right location here. Copy that over. And I would want to choose my CTF here. And now I would go ahead and click Deploy, and that new version would be up there.
Again, that'll take probably 30 seconds. So I'm just going to use the version that's already up here. But this is now running and ready to receive requests, and this is now ready to go.
And again, as with the Web App Server, I don't need to incur any downtime in order to swap these out. I can upgrade to new applications, add new applications, delete old applications all while this is up, and so none of that process has to in any way interfere with the uptime here.
And so let's now run the same request as we did before. So I'll put this over to one side of my screen. And again, we can pull up my client here, and this should now be ready to access my real life Production Server here, and we can go ahead and see what that process looks like as these requests come in.
So I click my Run Analysis button. I can see right away there's four requests that come in as a result of this. And so because we have-- luckily enough-- four workers, these will actually all start to be evaluated at the same time here. And unlike before with our test scenario, where one result came in at a time, you can see a bunch of these have finished and the results have been populated.
And then this fourth call, which is a different kind of call, takes a little bit longer to evaluate. And once that is done, we'll see those final results over here, as well.
So I have this request has been completed-- and like I said before, this is a JavaScript web page that's pinging this-- but this can be receiving requests from this web page at the same time as people are writing requests from a Python client or from a C++ client, anything. So this is really useful as a way to make your components generally available no matter what the purpose.
So I'll go ahead and spin this down here, and we will head back to some slides here to talk a little bit more about this.
So just to recap what this process looks like, I have this server, it has all of these little MATLAB instances that are ready to handle any requests that come in. My users that have the ability to compile here can create their MATLAB analytics, test them out locally, compile into those all-important .ctf files that we talked about, and ultimately send them out to be deployed to this server.
And then, as I mentioned at the end there, these can be connected to simultaneously from a whole bunch of different avenues. So maybe we have a web server that queries this, and my server can also pull from databases and other external services as needed through the MATLAB code in there.
Maybe I have Excel users. Production Server also has the ability to create Excel add-ins that are automatically generated to ping this server, as well. So if I have Excel users, that might be an option that I want to explore there, too. I might want to have cron jobs, jobs that run every 24 hours to refresh a certain report or a certain piece of analytics there. So again, super general purpose and can be used for a really wide variety of things.
And I have clients in all of the languages that we see here. So I can access this directly through C, C++, Java, Python, and Excel, any of these. And then finally, we also have the support for RESTful calls through HTTP, which is really kind of the catch-all. If we don't have an explicit client library for it, then pretty much any programming language can make an HTTP call and you can just go ahead and do it that way instead.
All right so just to give a little bit of a summary here for the two use cases that we went over, MATLAB Web App Server is a great tool if you want to connect with a wider audience that includes potentially non-technical stakeholders and you want them to be able to really easily interact with your models by creating these visual MATLAB apps and allow colleagues to interact with them via web without needing a MATLAB license.
And the Production Server is a little bit more general. It can be used not only with graphical interfaces, but even by other programming language, other business intelligence tools, anything that can make a call to this server. So you have one, you can think of it as kind of a living repository for your MATLAB code that can be reused for all of these different purposes.
And one last thing I want to mention before we close out is I wanted to give a little bit of a shout out to the consulting services that we have here at MathWorks because a lot of customers who are using these tools find it really useful to pair that with some advice from our expert consultants. So our consultants can help with a wide variety of things.
Basically it's worth giving them a call if there is anything that you're under a time crunch. They can do anything that you don't have the in-house technical expertise to do. We're there to help with that.
So some common examples as they pertain to these tools are for the MATLAB Web App Server, our consultants are often enlisted to design the front end for these models. App Designer makes it really easy to do this, but if you want to not spend the time kind of making all of the design choices, making it really easy to use, writing tests for it, our consultants can come in and take that high level design that you have in mind and really work out all the details, get it there for you, and make sure that you have a really nice gateway for your analytics there.
More on the Production Server side, they can help refactor your code to make it more organized for creating these deployed components. So something that we see a lot is someone who has some really old code that's really written in just a monolithic format. So they have this huge process that's maybe a couple of thousand lines of code that performs all of these useful things and they're all in this one big messy code file.
And the problem that they have is, hey, a lot of these things in here are really actually useful-- and maybe they're useful computations, they're efficient computations-- and if only we could really extract those from this huge, ugly file, we could probably reuse them and still get some more value out of them today. And so that's something that our consultants can help with, as well. Going through these code, refactoring it, breaking it up into these nice digestible, easily reusable pieces to help you out there and to get it ready for this kind of deployment.
And these are just a couple of concrete examples, but like I said, they perform many other services, and if there's anything where you feel like you want an outside expert to give some advice, someone to take some of the technical load off your hands and help you when you're under a time crunch, our consultants can do all of that.
And one last note on this is that it's not a black box. So our consultants don't write code that is encrypted and really messy and just drop it on your doorstep and then say, here you go, good luck. These consultants will actually go in, they'll keep a very open dialogue with all of your engineers, and when it comes time to deliver the final product, they'll actually go through the code with your engineers, they'll train them on exactly all of the methods that they used to develop it, and give them some advice for maintaining that code, as well. So at the end, you don't just have a black box, you have a solution and a code base and engineers that know how it works and how to maintain.
And so that is the last of what I wanted to say. If there are any questions, first of all, our contact info is up here. You can reach out to myself or Greg. We do have a little bit of time left so I'm going to take a moment to look through some of the Q&A that has come in here, compile a couple of those, and then I'll be back in one or two minutes and I'll use the rest of the time to answer any of those questions that have come in.