A computer-implemented method for performing a distributed processing operation across a network of nodes within a smart grid, the method comprising: configuring a first node (230-1) that resides at a first physical location within a first network to execute a first stream function (510-1) on a first time series of data generated at the first node (230-1) to further generate a first data stream (520-1) comprising a plurality of timestamped data elements; configuring a second node (230-2) that resides at a second physical location within the first network to execute a second stream function (510-2) on a second time series of data generated at the second node (230-2) to further generate a second data stream (520-2) comprising a second plurality of timestamped data elements; obtaining, at a third node (230-4) that resides at a third physical location within the first data network , the first data stream (520-1) from the first node (230-1) via one or more network connections; obtaining, at the third node (230-4), the second data stream (520-2) from the second node (230-2) via one or more network connections; and processing, at the third node (230-4), the first data stream (520-1) and the second data stream (520-2) 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 (230-1) that resides at a first physical location within a first network to execute a first stream function (510-1) on a first time series of data generated at the first node (230-1) to further generate a first data stream (520-1) comprising a plurality of timestamped data elements; configuring a second node (230-2) that resides at a second physical location within the first network to execute a second stream function (510-2) on a second time series of data generated at the second node (230-2) to further generate a second data stream (520-2) comprising a second plurality of timestamped data elements; obtaining, at a third node (230-4) that resides at a third physical location within the first data network , the first data stream (520-1) from the first node (230-1) via one or more network connections; obtaining, at the third node (230-4), the second data stream (520-2) from the second node (230-2) via one or more network connections; and processing, at the third node (230-4), the first data stream (520-1) and the second data stream (520-2) 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. <EOS>