1. Technical Field
The embodiments of the present disclosure relate to cloud computing technology, and particularly to a file uploading system and method via cloud computing.
2. Description of Related Art
A data center is a facility which houses a large number of servers and stores huge amounts of data (e.g., files). When <<I assume this is a new sentence>> a user uploads a file into the data center, a server is selected from the large number of servers for saving the file. However, the data center may not know which server is uploading the file, and if the computer is slow or non-responsive the file may be not successfully uploaded into the selected computer. Thus, there is room for improvement in the art.
The disclosure is illustrated by way of examples and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The data center 50 is located behind a firewall, and is connected to the network 40. The network 40 may be, but is not limited to, a wide area network (e.g., the Internet) or a local area network. The firewall is used to protect the data center 50 from unauthorized access and secure information of the data center 50.
The monitoring computer 20 is connected to the data center 50 and is capable of accessing each cloud server 500. In one embodiment, the monitoring computer 20 may be a personal computer (PC), a network server, or any other data-processing equipment. Further details of the monitoring computer 20 will be described below.
The database 30 is connected to the monitoring computer 20 using open database connectivity (ODBC) or java database connectivity (JDBC), for example. The database 30 may store parameters of each cloud server 500. The parameters of each cloud server 500 includes a total storage (e.g., two TB) of the cloud server 500, an available storage (e.g., one TB) of the cloud server 500, a memory utilization rate (e.g., 30%, a percentage capacity usage of a memory) of the cloud server 500, a CPU utilization rate (e.g., 80%, a percentage capacity usage of a CPU) of the cloud server 500, a continuous operation time (e.g., two days) of the cloud server 500, a total number (e.g., ten files) of files stored in the cloud server 500, and a usage storage of the files stored in the cloud server 500. The database 30 also stores a priority coefficient list 1000 as shown in
The client 10 is connected to the monitoring computer 20. The client 10 may be a personal computer (PC), a network server, or any item of other data-processing equipment. In one embodiment, the client 10 may provide a user interface, which is displayed on a display device of the client 10, for a user to control one or more operations of the monitoring computer 20. The user may input an ID (e.g., a username) and a password by an input device (e.g., a keyboard) of the client 10 into the user interface, to access the monitoring computer 20.
The obtaining module 210 obtains the parameters of each cloud server 500. In one embodiment, each cloud server 500 is installed with an operating system, and the parameters of each cloud server 500 are collected by a task manager of the operating system. The obtaining module 210 obtains the parameters of each cloud server 500 from the task manager of the operating system installed in the cloud server 500. Additionally, the parameters of each cloud server 500 are obtained at a time interval (e.g., one day).
The calculation module 220 calculates a priority coefficient of each cloud server 500 according to the obtained parameters of each cloud server 500. In one embodiment, the priority coefficient indicates a priority for saving a file. The greater the priority coefficient is, the more loads the cloud server 500 has. The priority coefficient of the cloud server 500 is calculated by a formula as follows: H=[(B/A)+C+D]*(M+N+P), where H represents the priority coefficient, B represents the available storage of the cloud server 500, A represents the total storage of the cloud server 500, C represents the memory utilization rate of the cloud server 500, D represents the CPU utilization rate of the cloud server 500, M represents the continuous operation time of the cloud server 500, N represents the total number of files stored in the cloud server 500, and P represents the usage storage of the files stored in the cloud server 500. For example, assuming that the available storage of the cloud server 500 is three hundred GB, the total storage of the cloud server 500 is six hundred GB, the memory utilization rate of the cloud server 500 is 40%, the CPU utilization rate of the cloud server 500 is 30%, the continuous operation time of the cloud server 500 is twelve days, there are total one hundred files stored in the cloud server 500, and twenty GB usage storage of the cloud server 500 has been used for storing the one hundred files, then the priority coefficient of the cloud server 500 is calculated as follows:
[(300/600)+40%+30%]*(12+100+20)=158.4.
The generation module 230 generates the priority list 1000 and saves the calculated priority coefficient into the priority list 1000. As shown in
The uploading module 240 selects one cloud server 500 from the data center 50 for saving a file which is uploaded from the client 10 by a user. In one embodiment, the uploading module 240 searches for a minimum priority coefficient in the priority list 1000, and selects the cloud server 500 corresponding to the minimum priority coefficient. The file is preferentially saved into the cloud server 500 corresponding to the minimum priority coefficient.
In step S10, the obtaining module 210 obtains parameters of each cloud server 500. In one embodiment, the obtaining module 210 obtains the parameters of each cloud server 500 from a task manager of an operating system installed in the cloud server 500. Additionally, the parameters of each cloud server 500 are obtained at a time interval (e.g., one day).
In step S20, the calculation module 220 calculates a priority coefficient of each cloud server 500 according to the obtained parameters of the cloud server 500. As mentioned above, the priority coefficient indicates a priority for saving a file. The greater the priority coefficient is, the more load percentages (e.g., CPU utilization ratio) the cloud server 500 has. The priority coefficient of the cloud server 500 is calculated by the formula H as mentioned above. For example, the priority coefficient of the cloud server T1 is calculated as 158.4 according to the formula H. The priority coefficient of the cloud server T2 is calculated as 116.5 according to the formula H. The priority coefficient of the cloud server T3 is calculated as 186 according to the formula H. The priority coefficient of the cloud server T4 is calculated as 85 according to the formula H. Because the parameters of each cloud server 500 are obtained at a time interval (e.g., one day), the priority coefficient of each cloud server 500 is also calculated at the time interval.
In step S30, the generation module 230 generates a priority list 1000 and saves the calculated priority coefficient into the priority list 1000. As shown in
Additionally, the priority list 1000 is updated in real time. For example, if the priority coefficient of the cloud server T1 is changed to 123.4, the priority coefficient 158.4 in the priority list 1000 is replaced by the priority coefficient 123.4.
In step S40, the uploading module 240 selects a cloud server 500 that has a minimum priority coefficient for saving a file uploaded by the client 10. For example, as shown in
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
2012105106624 | Dec 2012 | CN | national |