[MUSIC] So what is exactly is a cloud service, that a mobile device might talk to, and how do we differentiate and understand, how these services differ from the typical applications. That we're used to writing. So, let's take a look at an example and hopefully it'll help to clarify and better understand what a clou, a cloud service is, and what the scope of this course is and what are the challenges that we're going to face, when building these services. So let's assume we're writing a Java application. And what that java application allows us to do, is we can capture a video and then we can run a command line utility that will be our application. And it will go in save the video, on the underline file system. And not only will be going and save the video in the underlying file system, but it will also take that video and it will save it to a database. So, that we have a record of all of the videos, that we've entered into our system. So, this is our service in this case or application. That we're going to be building. And we'll assume that there's nothing special about this, it's just a Java application. Well, if we're going to be running this thing over here from the command line, one of the things that we're probably going to want to do, if we're writing this in Java is we're goig to have a main method. So, we might have a public, static, void, main that takes some arguments. And we could go out and spell out what those are. And then in that main method. We might go and do things like you know, look for the flags that were passed on the command line. So, we can look for flags. We can look for the file that they want to add the video. So, look for the video path, and we can do a whole bunch of other stuff. But the key would be, we've got this main method, which is part of this application and every time from the command line they invoke our application. They're going to be passing commands from the command line into our application, so what we have is a stream of commands that are being passed into our application. So, every time the user goes and invokes this thing from the command line, they're basically sending a different command to it. And the tax that they enter in the command line is then being passed to our public static void main method, where we can start up our application, take action based on the data that they passed us, then going store something in a database, or do something else. We might also want to issue commands to our application. That have it go and query the information we've already stored, or be processed based on the information we've already set the application. So one of the, the things we might have to do then, is provide feedback to the user that's sending the commands to the application. So we might have something in our main method that's printing out feedback. Using System.out.printline back to the user, so that the user can see the results of the commands that they're issuing. Or see information that comes out of the database that the user is querying. So, not only do we have a situation, where we are sending commands and asking. The application to go and store data, but we also have situations where we need to, based on those commands, go and provide feedback to the user, about the success or failure of those commands and any data associated with them. So, for example, if the user issues a query to see all of the videos created. In a certain time period we'll probably want to print out the query back to the command line. Similarly if the user issues a query that's malformed. We would probably expect the application to go in print on the command line an error message. Stating what the user did wrong, and helping them to figure out how to formulate that command correctly and send it. Where if the application went and processed the command, and it had a bug in the program and it crashed or [UNKNOWN] we would expect to get some feedback telling us that the application crashed. So what we'll see is this basic architecture of commands being sent to an application processing data in some format either storing it or performing some analysis on it, and then providing feedback to the user based on the success or failure of those commands, and in the results of the execution of those commands. That's the basic architecture we're going to be working with throughout this class. The big difference is when we go into the cloud services model, what we're going to have is, the case where we're sending the commands to the application from a mobile device, that's not sitting on the same app, the same host as that application. So this mobile device is going to be sending this command remotely over the internet. To this application and this application's going to be living in the cloud and receiving those commands, processing data through some data store, saving the information somewhere that's being sent to it, and having to remotely send back to the mobile device, the results of those commands. So, we have this remote interactions that's based on commands being issued to the application and results coming back, that we're going to be working with. We're going to be sending data from the mobile device, which is the client, to the application. It's going to process that information. And in this case, the application is going to be a server. And it's going to be living in the cloud and then it's going to send the results back to the mobile device, so that it can know what happened. So it may be sending back results that say here's the result of running your command. It may send results back that say you you know, did not formulate your command correctly. Or it may be sending results back saying the server had a problem. Here's what the problem was and it crashed. And that's the architecture that we're going to be building through this class. Is this remote distributed architecture where mobile clients, your mobile devices on Android, are sending commands over the internet, to a service or a server that's living in the cloud. And they're being processed and then results are being sent back to the mobile client. And one of the key questions that we have to answer and address is, how do we get these commands from the mobile device to the server and communicate the results back? What are the requirements and rules for that communication with they server that's remote? How do we ensure that it's reliable? How do we ensure that it's orderly, and done in a way that the server can understand and process commands for us?