Energy aware data replication
It is determined that data stored on a storage device associated with a computing device powered by a power source is to be transmitted to a remote computing device. A power state of the power source is determined. An encoding mechanism is selected from a plurality of different encoding mechanisms based on the power state of the power source. The data is encoded based on the encoding mechanism to generate encoded data. The encoded data is transmitted to the remote computing device.
1. A method comprising:
determining, by a computing device comprising a processor device and powered by a power source, that data stored on a storage device associated with the computing device is to be transmitted to a remote computing device;
determining, by the computing device, a power state of the power source;
selecting, by the computing device, a first encoding mechanism from a plurality of different encoding mechanisms based on the power state of the power source, wherein the first encoding mechanism comprises a first compression technique and a first encryption technique, and wherein selecting the first encoding mechanism comprises:
selecting the first compression technique from a plurality of compression techniques based on the power state of the power source; and
selecting the first encryption technique from a plurality of encryption techniques based on the power state of the power source and the first compression technique;
encoding, by the computing device, the data based on the first encoding mechanism to generate encoded data; and
transmitting, by the computing device to the remote computing device, the encoded data.
2. The method of claim 1 further comprising comparing the power state to a first energy range.
3. The method of claim 2 , wherein selecting the first encoding mechanism further comprises:
determining that the power state is within the first energy range; and
in response to determining the that the power state is within the first energy range, selecting the first encoding mechanism, the first encoding mechanism requiring less energy consumption than a second encoding mechanism of the plurality of encoding mechanisms.
4. The method of claim 2 , wherein selecting the first encoding mechanism further comprises:
determining that the power state is within the first energy range; and
in response to determining the that the power state is within the first energy range, selecting the first encoding mechanism, the first encoding mechanism requiring more energy consumption than a second encoding mechanism of the plurality of encoding mechanisms.
5. The method of claim 1 wherein determining that the data stored is to be transmitted further comprises receiving a request from the remote computing device to send the data.
6. The method of claim 1 wherein determining that the data stored is to be transmitted further comprises receiving a notification that a transmission timer has expired.
7. The method of claim 6 further comprising increasing the transmission timer to delay a frequency of transmission.
8. The method of claim 6 further comprising decreasing the transmission timer to increase a frequency of transmission.
9. The method of claim 1 wherein determining that the data stored is to be transmitted further comprises receiving a notification that an amount of data storage availability is less than a data capacity threshold.
10. The method of claim 1 wherein the power source is a battery.
11. The method of claim 10 further comprising:
comparing the power state to a first energy range;
measuring historical power consumption of the battery; and
redefining the first energy range based on the historical power consumption.
12. The method of claim 1 further comprising determining a strength of a cellular signal, wherein selecting the first encoding mechanism further comprises selecting the first encoding mechanism based on the strength of the cellular signal.
13. The method of claim 1 wherein the computing device is one of a mobile handset, an internet of things device, a computer laptop, or any other device that contains a processor device, storage, and a wireless transceiver.
14. The method of claim 1 wherein the data stored on the storage device is one of environmental data, multimedia data, and telemetry data.
15. The method of claim 1 wherein encoding the data based on the first encoding mechanism to generate the encoded data comprises:
compressing, by the computing device, the data based on the first compression technique to generate compressed data; and
encrypting, by the computing device, the compressed data based on the first encryption technique to generate the encoded data.
16. A computing device, comprising:
a wireless transceiver;
a memory; and
a processor device coupled to the memory to:
determine that data stored on a storage device associated with the computing device is to be transmitted to a remote computing device;
determine a power state of a power source that powers the computing device;
select a first encoding mechanism from a plurality of different encoding mechanisms based on the power state of the power source, wherein the first encoding mechanism comprises a first compression technique and a first encryption technique, and wherein, to select the first encoding mechanism, the processor device is to:
select the first compression technique from a plurality of compression techniques based on the power state of the power source; and
select the first encryption technique from a plurality of encryption techniques based on the power state of the power source and the first compression technique;
encode the data based on the first encoding mechanism to generate encoded data; and
transmit, via the wireless transceiver, the encoded data to the remote computing device.
17. A non-transitory computer-readable storage medium that includes executable instructions to cause a processor device to:
determine that data stored on a storage device associated with a computing device is to be transmitted to a remote computing device;
determine a power state of a power source that powers the computing device;
select a first encoding mechanism from a plurality of different encoding mechanisms based on the power state of the power source, wherein the first encoding mechanism comprises a first compression technique and a first encryption technique, and wherein, to select the first encoding mechanism, the instructions further cause the processor device to:
select the first compression technique from a plurality of compression techniques based on the power state of the power source; and
select the first encryption technique from a plurality of encryption techniques based on the power state of the power source and the first compression technique;
encode the data based on the first encoding mechanism to generate encoded data; and
transmit the encoded data to the remote computing device.