[MUSIC] So what 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 will help to clarify and better understand what 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 those services. So let's assume that 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 and save the video on the underlying file system. And not only will it go 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 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 going 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 we're passing the command line. So we could look for flags, we could look for the file that they want to add, the video. So look for the video path and we could 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 in vocar 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 on 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've passed us and then go and store something in a database or do something else. We might also want to issue commands to our application, that have it going query the information we've already stored. Or be processed based on the information that we've already sent the application. So, one of the, the things we might have to do then is provide feedback to the user that is sending the commands to the application. So we might have something in our main method that's printing out feedback using system.out.print line 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 that query back to the command line. Similarly, if the user issues a query that's malformed, we would probably expect the application to go and print on the command line an error message stating what the user did wrong and helping them to figure out how to formula like that command correctly and send it. Or if the application went and processed the command and it had a bug in the program and it crashed or segfault it, 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 the results of the execution of those commands. That's the basic architecture that we're going to working with throughout this class. The big difference is, is when we go into the cloud services model, what we're going to have is the case where we are sending the commands to the application from a mobile device that's not sitting on the same app that, that same host is that application. So this mobile device is going to be sending this commands remotely over the internet to this application and then some 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 interaction 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 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 is the result of running your command. It may send results back that say you've, 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 server that's living in the Cloud. And they're being processed and the 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 the 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 the commands for us.