A computer-implemented method for performing a distributed processing operation across a network (500, 900) of nodes within a smart grid, the method comprising: configuring a first node that resides at a first physical location within a first network (500, 900) to execute a first stream function on a first time series of data generated at the first node to further generate a first data stream comprising a plurality of timestamped data elements; configuring a second node that resides at a second physical location within the first network (500, 900) to execute a second stream function on a second time series of data generated at the second node to further generate a second data stream comprising a second plurality of timestamped data elements; obtaining, at a third node that resides at a third physical location within the first data network (500, 900), the first data stream from the first node via one or more network connections; obtaining, at the third node, the second data stream from the second node via one or more network connections; and processing, at the third node, the first data stream and the second data stream to generate a time series of processing results, wherein the processing of the first data stream and the second data stream is determined by the third node, based on a negotiation with the first and second nodes and without the involvement of a centralized unit, to optimise one or more of energy usage and processing throughput between the first, second and third nodes, the method being characterized in that at least one of the first, second and third nodes is solar powered, in that at least one of the first, second and third nodes is powered by a utility network, and in that the negotiation comprises distributing processing tasks to the at least one solar powered node during daylight hours and redistributing the processing tasks to the at least one utility network powered node during non-daylight hours. configuring a first node that resides at a first physical location within a first network (500, 900) to execute a first stream function on a first time series of data generated at the first node to further generate a first data stream comprising a plurality of timestamped data elements; configuring a second node that resides at a second physical location within the first network (500, 900) to execute a second stream function on a second time series of data generated at the second node to further generate a second data stream comprising a second plurality of timestamped data elements; obtaining, at a third node that resides at a third physical location within the first data network (500, 900), the first data stream from the first node via one or more network connections; obtaining, at the third node, the second data stream from the second node via one or more network connections; and processing, at the third node, the first data stream and the second data stream to generate a time series of processing results, wherein the processing of the first data stream and the second data stream is determined by the third node, based on a negotiation with the first and second nodes and without the involvement of a centralized unit, to optimise one or more of energy usage and processing throughput between the first, second and third nodes, the method being characterized in that at least one of the first, second and third nodes is solar powered, in that at least one of the first, second and third nodes is powered by a utility network, and in that the negotiation comprises distributing processing tasks to the at least one solar powered node during daylight hours and redistributing the processing tasks to the at least one utility network powered node during non-daylight hours.