Each process maintains a copy of the shared ledger implemented as a blockchain. Each time the blockchain is updated it is multicast to all other peers. Process zero is responsible for writing the updated [url removed, login to view] file to disk. We will use only three processes, but your system design should—in theory—work for any number of peers with minor modifications.
Each process reads in a data file to create new records. A new record is placed in an unverified block. The block is multicast to all the processes in the blockchain group which begin competing with one another to solve the "work" puzzle. One process solves a puzzle to verify the block, prepends the verified block to the blockchain, and multicasts the new blockchain to all other processes in the group. All other processes abandon the attempt to verify that block.
Every record in the shared ledger is considered cannonical. It is ~impossible to insert a counterfeit block (record) into the blockchain.
We will use simple medical records in files, but the data is not really of concern to us. We could use the same system for a complete audit trail of business transactions, to support a digital currency, or to keep track of banking records.
Ordinarily many records would comprise a single block; for simplicity we will use a single record for each block.
Your system must run from some version of the provided run scripts. Adapt as needed for other operating systems.