[MUSIC] One consideration when you're building your application and deploying it to the Cloud, is what style of, services you're going to use. Are you going to use Infrastructure as a service. Which is typically called IaaS, or you're going to use Platform as a Service, or PaaS. And this is one of the big decisions that you'll have to make. When you're trying to figure out how you're going to build your application, and how you're going to deploy it into the cloud. So let's talk about what each of these things are, and compare and contrast them a little bit. You can think of infrastructure as a service as the closest thing to basically buying a new machine in the cloud. You're asking the cloud provider to go, and turn on a virtual machine typically that has some configuration that you know how to use. So there, that cloud provider will go, and turn on the base virtual machine or container or whatever it is, and then you will go and stack on top of it the different components of your application, maybe your, controllers, maybe you'll go and stack some other utilities. On top of this thing. Maybe you'll put a database on a node, and you'll begin stacking all the different pieces that you need for your application on top of this virtual machine. Now the nice thing that this gives you, is it gives you the flexibility to control the type, and configuration of the virtual machine. It gives you the ability to control all of the different pieces that go in that virtual machine, and it gives you control of things like security, you can decide what the controllers can, and can't access under on the underlying machine, what APIs are available to them, you can mix and match things that are written in C++, and are built just for that Linux virtual machine you're running on. With your Java code, and easily build up a very custom environment that you want to run in. Now the downside of this is all of this customization that you're doing means that it's something very specific to you. So you're also going to have to manually decide all of the auto scaling policies, and how you scale up. You're going to have to build your own infrastructure to configure machines. So you'll need to have scripts to automate the setup of these machines, to automatically monitor these machines. So you'll need to know what's running and be able to track it and monitor it. You'll need to be able to handle load by auto-scaling. You'll need to do all kinds of different things, that are certainly doable and within your realm of capabilities, but you become responsible for all of the aspects of not only setting up, and configuring these virtual machines. But launching them, monitoring them, handling the load and auto scaling as needed. So infrastructure as a service gives you the bare metal to build your application on top of. But you become responsible for all of the monitoring, and management capabilities of, of dealing with those machines. With platform as a service what you do is you provide your application. So in this case it would be your web application, like a war file which would have the controllers, and other things that were going to handle the request. And the platform as a service. [MUSIC] Is what takes your application. Automatically for you configures a web container. Configures the underlying virtual machine that it's running on. Decides all of the security settings. Decides when to scale it up or down. How much capacity it needs. And runs it for you. Now the advantage of hte platform as a service is it takes away this, this complexity of how do I go, and actually set up my machines? When should I add machines, how should I monitor them? And it gives you all of the tools to support the actual execution, and running of your application. And to. You can give it hints as to what you're expecting in terms of performance so that it can try to automatically scale your application for you. It can also give you all kinds of tools, that are tightly coupled to that platform that can tell you things like collecting the request logs across all of the machines that you have running with your application. So that you can go and look across. A thousand machines and see the requests that are coming in and what they're logging. Or if you want to go and look at the performance of how your application is interacting with the database, that the PaaS system has created or the platform as a service, you can go in and look at that, because they provide you tools to give you those metrics. So with platform as a service, you get that advantage, that you have all of the management infrastructure provided for you and built for you, and you are getting to use it for free you just have to go to build something that fits into their model. Now the downside of this approach is that. You typically have to write your application to live within the, the limits of what they will allow. So you, you don't get the same configurability you do over here with getting to decide exactly which database you want to use. Or exactly which set of monitoring infrastructure you want to use. Now there are some newer approaches that are starting to blend this. Model of infrastructure as a service and platform as a service, but right now if you have pure platform as a service or, or pure infrastructure as a service, platform as a service is going to be more restrictive on what you can and can't do. And more of the set up and management infrastructure is going to be taking care of one as a platform as a service. Side versus an infrastructure services side, so over here you can spend a lot more emphasis on just writing your application, and then letting the platform as a service go and run it and figure out how to operate your application effectively. Make sure it's always available and always running. Over here you take over that. Functionality, you have to keep it running, you have to scale it, but you can decide to do anything you want. If you want to save a file to the virtual machine that you're running on, you can do that, whereas over here you may not have access to the file system. You may have to use some vendor specific API to store that file. So you have a trade off, when you're using infrastructures as a service versus platform as a service primarily, and how much effort you have to put put into managing, and setting up, and scaling the platform that you're running it on. You have a trade off in terms of how configurable versus not configurable you are. And then a trade-off in terms of you, how tightly coupled you are to standards versus a particular vendor's APIs. So there's a number of things to consider. If you're a very small developer, and you don't have a lot of experience scaling an app up to huge scales. You might be better off with platform as a service, because you're not going to have the capacity to manage this application at scale. Particularly not without all of the tools that have been built for a platform as a service environment like Google app engine. With the an Infrastructure as a service environment, just like Pure Amazon EC2 where you're setting up virtual machines. This may be great if your in an application that has deep expertise in scaling up applications, and monitoring them. And you've got all of the tooling and infrastructure for it. And it will give you greater flexibility and freedom in how you build your applications. And not necessarily be tied in to one particular vendor's platform. So there's various concerns, that you have to think through when you're trying to make this decision, between infrastructure as a service versus platform as a service for your cloud service to support mobile devices.