How to schedule a task inside hyperledger composer ledger?

0 votes

I need to update some field every day. I came up with 2 possible solutions:

  1. Update it via REST API - for example, a program that runs on some server, updates the field via REST API and then sleeps 1 day. Problem: if the program stops it does not update the ledger, thus the network does not work correctly anymore.

  2. Make a smart contract that sleeps 1 day and then updates the fields. Problem: as far as I know how the internals are working, isn't that going to make problems with reaching the consensus?

Jun 18, 2018 in Blockchain by Christine
• 15,790 points
70 views

1 answer to this question.

0 votes

correct on 2 - you likely won't get a deterministic result (whatever you're updating it with but sounds like its date-based and not sure whether its a calendar or elapsed day etc etc) and the update will fail. You're best to manage the update based on a field value from the client side. You need some high availability solution and/or checks for your client-side issue that the update takes place. The ledger is not really the place to rely on applying your operational, schedule-based update.

answered Jun 18, 2018 by charlie_brown
• 7,720 points

Related Questions In Blockchain

0 votes
1 answer

How to explore and analyze the data inside a Hyperledger Blockchain network?

In Hyperledger Composer, you have all the ...READ MORE

answered Aug 10, 2018 in Blockchain by Christine
• 15,790 points
94 views
0 votes
1 answer

Hyperledger Composer: How to update a contract after it is saved?

Try this and see if this works: /** * ...READ MORE

answered Nov 9, 2018 in Blockchain by Omkar
• 67,290 points
33 views
0 votes
1 answer
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,010 points
769 views
0 votes
1 answer

Hyperledger Composer rest server NPM versions

The Hyperledger Composer pre-requisites can be installed ...READ MORE

answered Jul 13, 2018 in Blockchain by Christine
• 15,790 points
85 views
0 votes
1 answer
0 votes
1 answer

How to store picture(s) in a hyperledger blockchain channel

You can hold images as encrypted characters ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,720 points
134 views
0 votes
1 answer

Not Able to register a user with Hyperledger-Fabric v1.1 preview

The error: "Certificate not found with AKI 'e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011' ...READ MORE

answered Jun 16, 2018 in Blockchain by charlie_brown
• 7,720 points
366 views