At least one embodiment of the present invention pertains to mobile devices, and more particularly, to mobile devices capable of migrating service components of mobile applications to cloud computing platform.
In cloud computing, a cloud server is typically responsible for providing and managing applications running at the cloud server. The data of the applications can be stored remotely in a cloud database. These applications are designed only for running on top of the special operating system of the cloud server. The cloud server and the computing devices have different operating systems and running environments. Typically applications designed for the cloud may not be downloaded and installed by the users on their own computing devices, because processing and storage for the applications are maintained by the cloud server and cloud database.
Technology introduced herein provides a mechanism to migrate at least portions of computer applications to a server. According to at least one embodiment, a computing device identifies a service component of a computer application executed at the computing device. The service component does not directly interact with a user of the computing device. The computing device transfers an instance of the service component to a server so that the service component is executed at the server. The computing device then receives from the server a result message generated by the instance of the service component executed at the server. The computing device feeds the result message to a user interface component of the computer application via a procedure call such that the user interface component retrieves the result message as if it was generated by an instance of the service component executed at the computing device.
Migration of the applications to the server can free up device resources and improve device power management, since the server uses its resource to execute the components of the applications and consolidates data changes (e.g., generated by the migrated applications). The overall performance of the device can be improved, because the operating system of the device has better knowledge when to synchronize data than an individual application. Cloud servers typically have faster processors, memory and storage devices. Applications that use intensive hardware resources (e.g., CPU or I/O intensive tasks) can benefit from increased efficiency by running in the cloud server. Therefore, it usually takes less time to run the application in the cloud than running it at the computing device.
In accordance with the techniques introduced here, therefore, a computing device is provided. The computing device includes a processor, a networking interface, an output device and an operating system including a migration module. The migration module include instructions which, when executed by the processor, monitor a computer application executed at the computing device, and identify a background thread and a foreground thread of the computer application. The networking interface is configured to transfer an instance of the background thread to a server, and to receive from the server result data generated by the instance of the background thread executed at the server. The output device is configured to present content of the result data via a user interface generated by the foreground thread. The foreground thread generates the user interface based on the result data as if the result data was generated by an instance of the background thread executed at the computing device.
In accordance with the techniques introduced here, therefore, a server for executing computer applications designed for computing devices is also provided. The server includes a processor, a networking interface and an application monitoring module. The networking interface is configured to communicate with at least one computing device. The application monitoring module is configured to, when executed by the process, monitor a computer application executing at the computing device, and to identify a service component of the computer application. The service component can be, for example, handling a computing task which does not need to receive input data from or send output data from input/output (“I/O”) devices of the computing device. Alternatively, the service component can be handling a computing task which handles heavy network inputs and storage I/Os (for writing data received from the network to the local storage). The networking interface can retrieve from the computing device an instance of the service component or data sufficient for the server to carry out the same functionality of the service component. The processor executes the instance of the service component at the server. The networking interface then synchronizes data generated by the instance of the service component executing at the server with data on which a user interaction component of the computer application executing at the computing device operates. The server can include a virtualized instance of a computing device, or a runtime application that mimics a computing device.
There are different ways of migrating applications to the server. The ways of application migration can be optimized for different goals. For instance, applications can be migrated in order to optimize the power usage of the computing device. The computing device can minimize the CPU running time and network component running time by letting the server execute the service component instead. The energy cost of receiving the result data from the server can be a fraction of the energy cost of running the service component locally at the computing device. Alternatively, applications can be migrated in order to optimize the network bandwidth of the computing device. The service component may need to download a large amount of the data from the network and process the data to generate result data. The total size of the result data to be received by the computing device from a service component running at the server can be a fraction of the total size of data to be received by the computing device from the network when the service component has been executed locally at the computing device.
Other aspects of the technology introduced here will be apparent from the accompanying figures and from the detailed description which follows.
These and other objects, features and characteristics of the present invention will become more apparent to those skilled in the art from a study of the following detailed description in conjunction with the appended claims and drawings, all of which form a part of this specification. In the drawings:
References in this specification to “an embodiment,” “one embodiment,” or the like, mean that the particular feature, structure, or characteristic being described is included in at least one embodiment of the present invention. Occurrences of such phrases in this specification do not all necessarily refer to the same embodiment, however.
The computing devices 130 and 140 can each communicate with the cloud server 110 via network 120. The network 120 can be, e.g., the Internet. Although
The computing device 130 includes an operating system 132 to manage the hardware resources of the computing device 130 and provides services for running computer applications 134 (e.g., mobile applications running on mobile devices). The computer applications 134 stored in the computing device 130 require the operating system 132 to properly run on the device 130. The computing device 130 includes at least one local storage device 138 to store the computer applications and user data. The computing device 130 or 140 can be a desktop computer, a laptop computer, a tablet computer, an automobile computer, a game console, a smart phone, a personal digital assistant, or other computing devices capable of running computer applications, as contemplated by a person having ordinary skill in the art.
The computer applications 134 stored in the computing device 130 can include applications for general productivity and information retrieval, including email, calendar, contacts, and stock market and weather information. The computer applications 134 can also include applications in other categories, such as mobile games, factory automation, GPS and location-based services, banking, order-tracking, ticket purchases or any other categories as contemplated by a person having ordinary skill in the art.
The operating system 132 of the computing device 130 can include a migration module 136 to manage migrations of computer applications from the computing device 130 to cloud server 110. Instead of executing computer applications 134 directly at the computing device 130, the migration module 136 can identify certain portions of the computer applications 134 suitable to be executed at the cloud server 110, e.g. the background components of the computer applications 134. The migration module 136 sends the background components to the cloud server 110 so that the cloud sever 110 can execute the background components for the computer device 130. For instance, the migration module 136 may identify that an application includes both a service component for background computing and an activity component for providing user interfaces interacting with a user. The migration module 136 may decide to migrate the service component to the cloud server 110 so that the computing task of the service component is offloaded to the cloud server 110.
The computer applications 134 running at the computing device 130 (e.g. foreground components of the computer applications 134) need not be aware that the background components of the computer applications 134 are executed at the cloud server 110 separate from the computing device 130. The migration module 136 can be responsible for retrieving the data generated by the background components executed at the cloud server 110 back to the computing device 130. The foreground components of the computer applications 134 can read these data as if they are generated by background components executed at the computing device 130 itself.
The networking component 210 can be capable of switching between states including a high power consumption state and a low power conservation state. The network component 210 can be, e.g. a WiFi networking adapter, a cellular phone networking adapter, or a combination thereof. The battery 220 is configured to provide power to the networking component and other components of the computing device 200. The computing device may further include a power adapter to be connected to a power source to provide power for the computing device 200, in addition to the power provided the battery 220.
The processor 230 is configured to run computer applications 260 and the operating system 250 of the computing device 200. The memory 240 stores instructions of the operating system 250 which, when executed by the processor 230, cause the operating system 250 to perform processes for realizing certain functionalities of the computing device 200.
For instance, the process of the operating system 250 can receive, from a cloud server (e.g., cloud server 110 in
The technology benefits the computing device in many ways. The performance of the application can be better. The execution of the background component at the server can be faster, since the server may have much more powerful hardware resources than the computing device. Alternatively, the efficiency of the local hardware resources of the computing devices can be improved. Since the background component has been migrated to the server, this frees up the local hardware resources (e.g. CPU and memory) of the computing devices to handle the local applications and operating system in a more efficient way. Furthermore, the technology may extend the battery life of the device. For instance, the computing device 200 can stay at a low power conservation state initially. When the server requests the background component, the computing device 200 switches to a high power consumption state and transmits the data for an instance of the background component to the server. The computing device 200 can again switch back to the low power conservation state after sending out an instance of the background component. When the server sends back the result after executing the background component, the computing device 200 switches to the high power consumption state to handle the result. In this way, the battery power and the hardware resources of computing device 200 are optimized and utilized in a more efficient way. As a result, the battery life of the computing device 200 can be extended.
Alternatively, instead of the server, the operating system 250 itself can monitor the computer applications 260 running at the computing device and determine which background component of a computer application is suitable to be executed at the server to reduce the workload of the computing device 200. Once the background component is migrated to the server, the server can execute the background component and send back the result to the computing device 200.
An app migration module 330 can run on top of the kernel 304. Alternatively the kernel 304 can be modified to include the app migration module 330. The app migration module 330 is responsible for migrating at least a portion of an application to a server. For instance, the app migration module 330 can monitor the application and maintain a network connection with a storage server. The application may include multiple threads, e.g. a background thread (e.g., a service component) and a foreground thread (e.g., an activity component). When the app migration module 330 determines that the background thread does not interact directly with a user of the computing device, the app migration module 330 sends an instance of the background thread to the server. The server executes the background thread and sends back result data generated by the background thread. The app migration module 330 further feeds the result data to the foreground component as if the result data was generated by an instance of the background thread executed at the computing device.
The technology disclosed herein can be applied to various computing devices including, e.g., devices capable of receiving emails or internet messages. For instance,
In some embodiments, server 400 may monitor or measure resource usage or workload of the devices. In some embodiments, the resource usage may be associated with resource usage of a central processing unit (CPU) of the devices, resource usage of a graphic processing unit (GPU) of the devices, resource usage of a main memory of the devices, and/or resource usage of a graphic memory of the devices, etc.
For example, in some embodiments, server 400 may determine or identify, a background component of an email application running at device 411. The background component is responsible for inquiring and retrieving emails from a remote email server. The email application also includes a foreground component responsible for presenting the email to a user of the email device 411 via an output device (e.g. a display). The email device 411 can send an instance of the background component to the server 400 and stop executing the background component at the device 411. In turn, the server 400 starts executing the background component for inquiring and retrieving emails for device 411.
The server 400 continues to monitor the email application running at the email device 411. For instance, when the email device 411 runs the foreground component at a background of an operating system of the device 411, the server 400 can avoid sending the retrieved emails to the device 411 by caching the received email on the server 400 itself. Once the foreground component is switched to a foreground of the operating system of the device 411, the server 400 can send to the device 411 emails retrieved by the background component of the email application executed at the server 400.
A person having ordinary skill in the art can readily understands that the types of device illustrated in
Similarly, the technology disclosed herein can be applied to devices for steaming video or other types of data steaming. For instance,
In some embodiments, server 500 may determine or identify, a background component of a video streaming application running at device 511. The background component is responsible for inquiring and retrieving video streaming packets from a remote content server. The video streaming application also includes a foreground component responsible for playing the streaming video to a user of the video device 511 via an output device (e.g. a display). The video device 511 sends an instance of the background component to the server 500 and stops executing the background component at the device 511. In turn, the server 500 starts executing the background component for inquiring and retrieving video streaming packets for device 511.
The server 500 continues to monitor the application running at the video device 511. For instance, when the video device 511 runs the foreground component at a foreground of an operating system of the device 511, the server 500 can continue to forward the video streaming packets received by the background component running at the server 500 to the video device 511 in real time as soon as the background component receives them. Once the foreground component is switched to a background of the operating system of the device 511, the server 500 can continue to run the background component, but stop sending the video streaming packets to the video device 511. The video streaming packets are cached in the server 500 so that they can be sent to video device 511 if the foreground component is switched back to the foreground of the operating system of the device 511.
The technology disclosed herein can also be applied to devices for processing photos or other types of data. For instance,
In some embodiments, server 600 may monitor or measure resource usage or workload of the photo devices. For example, in some embodiments, server 600 may determine or identify, a background component of a photo application running at device 611. The video streaming application can include a foreground component responsible for receiving photo data from, e.g., a camera device of the device 611 and playing the photo to a user of the device 611 via an output device (e.g. a display). The background component of the photo application is responsible for processing the photo. The processing of the photo can include, e.g., resizing, filtering, exposure adjusting, color adjusting, file format changing or editing of the photo. The photo device 611 sends an instance of the background component to the server 600 and stops executing the background component at the device 611. The photo device 611 can further send a photo to be processed by the background component to the server 600. In turn, the server 600 starts executing the background component for processing the photo for device 611.
The server 600 continues to monitor the photo application running at the photo device 511. For instance, when the photo device 611 runs the foreground component at a foreground of an operating system of the device 611, the server 600 can send the processed photo data back to the device 611 as soon as the background component finishes processing the photo at the server 600. If the foreground component is switched to the background of the operating system of the device 611, the server 600 can continue to run the background component for any incoming photo processing tasks, but stop sending the processed photo data to the photo device 611. The processed photo data are cached in the server 600 so that they can be sent to photo device 611 if the foreground component is switched back to the foreground of the operating system of the device 611.
As illustrated in the figures, computing devices can communicate with the cloud server to migrate and offload some portions of the computer applications to the cloud server. The cloud server acts as a surrogate hardware resource for executing the migrated portions of the applications.
At step 710, the computing device determines whether a workload of the computing device can be reduced if the service component is migrated to a server. If so, the process 700 continues to step 715. Otherwise, the process goes back to step 705 to identify a service component of another computer application executing at the computing device.
At step 710, the computing device stops executing the service component at the computing device. Then at step 720, the computing device transfers to the server an instance of the service component. Alternatively, the computing device can just notify the server to start or restart an instance of the service component at the server, if the server has the instance of the service component. In some embodiments, the server have a mirror of the data (including the service component) of the computing device, there can be minimal work to migrate the service component over to the server if the server has an instance of the service component and its state data that are synchronized with the counterparts of the computing device.
Optionally at step 730, the computing device can further transmit data on which the service component has been operating to the server. Once the server receives the service component and corresponding data, the server starts executing the service component at the server.
The computing device may choose not to receive data generated by the service component executed at the server, when the corresponding user interface component at the computing device is switched to a background of an operating system of the computing device. At step 735, the computing device determines whether the user interface component is running at a foreground of the operating system of the computing device. If so, the process 700 continues to step 745. Otherwise, at step 740, the computing device continues monitoring the user interface component.
Optionally at step 745, the computing device sends to the server a message indicating that the computing device switches the user interface component of the computer application to the foreground of an operating system of the computing device. Upon receiving the message, the server can send out a result message as a response. At step 750, the computing device receives from the server the result message generated by the instance of the service component executing at the server.
At step 755, the computing device feeds the result message to a user interface component of the computer application via a procedure call such that the user interface component retrieves the result message as if it was generated by an instance of the service component executed at the computing device. The procedure call can be, e.g., a remote procedure call (RPC) generated by an operating system of the computing device for a thread of the user interface component. Optionally at step 760, the computing device can present content of the result message to the user of computing device, by the user interface component via an output device of the computing device.
The server can continue to execute the service component at the server. The server or the computing device may determine certain optimization factors in order to decide whether to stop executing the service component at the server. For instance, at step 765, the computing device can determine whether an optimization factor for the service component of the computer application executing at the server is less than a predetermined value. The optimization factor may depend on, e.g., a CPU resource, a GPU resource, a memory resource, a power level, a data input/output amount, or a completion time needed for the instance of the background component to continue executing at the server.
If the optimization factor is larger than the predetermined value, at step 770, the computing device allows the server to continue executing the service component at the server (by, e.g., avoiding sending further instruction to the server). If the optimization factor is less than the predetermined value, at step 775, the computing device may retrieve, from the server, data generated by the instance of the service component executed at the server before the instance of the server component is stopped. At step 780, the computing device sends to the server an instruction to stop executing the instance of the service component at the server. At step 785, the computing device may choose to execute the service component of the computer application at the computing device.
Alternatively, the server can determine whether to stop executing the service component at the server. The server may monitor the status of the computing device and determine the optimization factor for the service component. Based on the optimization factor, the server may decide whether it is advantageous to continue executing the migrated background component.
Those skilled in the art will appreciate that the logic illustrated in
The server, instead of the computing device, can also monitor the computer applications running at the computing devices and control the application migration process.
At step 830, the application monitor module determines whether a workload of the computing device can be reduced by migrating the instance of the service component to the server. If so, at step 840, the server instructs the computing device to transfer an instance of the service component to the server and to stop executing the service component at the computing device.
At step 850, the server retrieves an instance of the service component from the computing device. The server may further retrieve from the computing device the data needed for running the service component.
At step 860, the server executes the instance of the service component at the server. The service component executed at the server generates new data. The server may decide whether to send back the generated data based on the status of the computer application at the computing device. For instance, at step 870, the server may determine whether the computer application is running at a foreground of an operating system of the computing device. The determination may be based on a signal from the computing device indicating that the computing device switches the computer application to the foreground of an operating system of the computing device. If the computing application is not running at the foreground of the operating system, at step 880, the server may cache the generated data and not send the data to the computing device at the moment. If the computing application is running at the foreground of the operating system, at step 890, the server may synchronize data generated by the instance of the service component executing at the server with data on which a user interaction component of the computer application executing at the computing device operates.
The process 800 can continue to step 830 to determine whether a workload of the computing device can be reduced by migrating the instance of the service component to the server. If the server determines that the workload is not reduced by the application migration, at step 895, server can stop executing the instance of the service component at the server, and instruct the computing device to execute the service component at the computing device.
The processor(s) 910 is/are the central processing unit (CPU) of the computer 900 and, thus, control the overall operation of the computer 900. In certain embodiments, the processor(s) 910 accomplish this by executing software or firmware stored in memory 920. The processor(s) 910 may be, or may include, one or more programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, application specific integrated circuits (ASICs), programmable logic devices (PLDs), trusted platform modules (TPMs), or the like, or a combination of such devices.
The memory 920 is or includes the main memory of the computer 900. The memory 920 represents any form of random access memory (RAM), read-only memory (ROM), flash memory, or the like, or a combination of such devices. In use, the memory 920 may contain a code 970 containing instructions according to the technology disclosed herein.
Also connected to the processor(s) 910 through the interconnect 930 are a network adapter 940 and a storage adapter 950. The network adapter 940 provides the computer 900 with the ability to communicate with remote devices, over a network and can be, for example, an Ethernet adapter or Fibre Channel adapter. The network adapter 940 may also provide the computer 900 with the ability to communicate with other computers. The storage adapter 950 allows the computer 900 to access a persistent storage, and may be, for example, a Fibre Channel adapter or SCSI adapter.
The code 970 stored in memory 920 may be implemented as software and/or firmware to program the processor(s) 910 to carry out actions described above. In certain embodiments, such software or firmware may be initially provided to the computer 900 by downloading it from a remote system through the computer 900 (e.g., via network adapter 940).
The techniques introduced herein can be implemented by, for example, programmable circuitry (e.g., one or more microprocessors) programmed with software and/or firmware, or entirely in special-purpose hardwired circuitry, or in a combination of such forms. Special-purpose hardwired circuitry may be in the form of, for example, one or more application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), etc.
Software or firmware for use in implementing the techniques introduced here may be stored on a machine-readable storage medium and may be executed by one or more general-purpose or special-purpose programmable microprocessors. A “machine-readable storage medium”, as the term is used herein, includes any mechanism that can store information in a form accessible by a machine (a machine may be, for example, a computer, network device, cellular phone, personal digital assistant (PDA), manufacturing tool, any device with one or more processors, etc.). For example, a machine-accessible storage medium includes recordable/non-recordable media (e.g., read-only memory (ROM); random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; etc.), etc.
The term “logic”, as used herein, can include, for example, programmable circuitry programmed with specific software and/or firmware, special-purpose hardwired circuitry, or a combination thereof.
In addition to the above mentioned examples, various other modifications and alterations of the invention may be made without departing from the invention. Accordingly, the above disclosure is not to be considered as limiting and the appended claims are to be interpreted as encompassing the true spirit and the entire scope of the invention.
This application claims to the benefit of U.S. Provisional Patent Application No. 61/708,794, entitled “CLOUD COMPUTING INTEGRATED OPERATING SYSTEM”, which was filed on Oct. 2, 2012, which is incorporated by reference herein in its entirety.
Number | Date | Country | |
---|---|---|---|
61708794 | Oct 2012 | US |