A method for executing an Internet-of Things application, the method comprising: - providing a machine-readable language configured to encode the application as an executable smart contract, - receiving a code encoding the Internet-of Things application in the machine-readable language, the code forming an executable smart contract of the application, - providing or accessing a distributed system configured to execute the executable smart contract, the distributed system comprising one or more field devices, one or more gateways and a distributed ledger system, the distributed ledger system comprising at least one access point and a plurality of computers, each computer of the plurality of computers configured to execute at least one peer process; - executing the executable smart contract on the distributed system: wherein the executable smart contract includes instructions that cause the distributed system to process and exchange data, the exchanged data being exchanged between the one or more field devices and/or the one or more gateways and/or the at least one access point and/or at least one peer process; the method further comprising: - providing a plurality of distributed ledger owners, each distributed ledger owner owning and controlling at least one computer of the plurality of computers; - configuring the machine-readable language configured to encode the application as an executable smart contract to include instruction that when executed cause a data exchange between peer processes of computers of the plurality of computers owned and controlled by different distributed ledger owners; - configuring the distributed system to implement the data exchange according to the instructions when the smart contract is executed; - encrypting and/or signing exchanged data when the smart contract is executed; and wherein the one or more field devices include sensors and/or actuators configured to exchange data according to an Internet-of Things protocol; and wherein encrypting and/or signing the exchanged data is based at least in part on a threshold cryptosystem where private key shares are disseminated among the peer processes within the distributed ledger. - providing a machine-readable language configured to encode the application as an executable smart contract, - receiving a code encoding the Internet-of Things application in the machine-readable language, the code forming an executable smart contract of the application, - providing or accessing a distributed system configured to execute the executable smart contract, the distributed system comprising one or more field devices, one or more gateways and a distributed ledger system, the distributed ledger system comprising at least one access point and a plurality of computers, each computer of the plurality of computers configured to execute at least one peer process; - executing the executable smart contract on the distributed system: wherein the executable smart contract includes instructions that cause the distributed system to process and exchange data, the exchanged data being exchanged between the one or more field devices and/or the one or more gateways and/or the at least one access point and/or at least one peer process; the method further comprising: - providing a plurality of distributed ledger owners, each distributed ledger owner owning and controlling at least one computer of the plurality of computers; - configuring the machine-readable language configured to encode the application as an executable smart contract to include instruction that when executed cause a data exchange between peer processes of computers of the plurality of computers owned and controlled by different distributed ledger owners; - configuring the distributed system to implement the data exchange according to the instructions when the smart contract is executed; - providing a plurality of distributed ledger owners, each distributed ledger owner owning and controlling at least one computer of the plurality of computers; - configuring the machine-readable language configured to encode the application as an executable smart contract to include instruction that when executed cause a data exchange between peer processes of computers of the plurality of computers owned and controlled by different distributed ledger owners; - configuring the distributed system to implement the data exchange according to the instructions when the smart contract is executed; - encrypting and/or signing exchanged data when the smart contract is executed; and wherein the one or more field devices include sensors and/or actuators configured to exchange data according to an Internet-of Things protocol; and wherein encrypting and/or signing the exchanged data is based at least in part on a threshold cryptosystem where private key shares are disseminated among the peer processes within the distributed ledger.