My client manufactures a medical device that takes various measurements of a given sample and writes the results to a database. The amount of data generated is relatively small.
In the current configuration, each device has its own computer, and that computer runs an instance of a database server. The devices are not networked.
The client wants to modify the device such that roughly fifty of them can be connected to a local area network.
The devices use various consumables that are lot numbered and once used cannot be used again. These lot numbers are written to the database when a sample is measured. This requirement is notable because in the current configuration a device has no way of knowing if a consumable has been used by a different device. In the proposed network configuration, the expectation exists that each device will have immediate access to information about consumables used by other devices.
The devices also need to track the quantity of various chemicals that are used in the testing process. Each bottle of chemical is lot numbered and barcoded. When a bottle is inserted into the machine, the machine reads the database to determine how much liquid has been consumed from the bottle. The expectation exists that a lot numbered bottle can be inserted into any machine and the machine will be able to accurately asses the amount of liquid in the bottle.
The client wants a recommendation on which of the two architectures should be used:
1.) Each device will write data to its own local database as it does now. Synchronization software will be installed on each device and synchronization will be performed in real-time. Each device will periodically broadcast a heartbeat (1 to 5 min intervals have been proposed) and this heartbeat will contain a CRC checksum. Every device on the network will listen for heartbeats. A device will initiate a sync if the heartbeat CRC differs from its own. The sync software be external to, and independent of, the software that runs tests. Therefore it is theoretically possible, but not probable, that a device will run while it is disconnected from the network or while the sync software is not running.
2.) The database server on each device will be removed and a database server will be used instead.
The client is concerned that if a database server is used, all devices on the network will be rendered unusable in the event of server failure. Does using a peer topology effectively mitigate this risk? In other words, if one peer on the network fails, is it business as usual for all other peers? Are any data integrity dangers or benefits associated with either approach?
Edit in response to answers from iag and MikeyB:
I can see how my question leaves room for ambiguity, so here it is again, hopefully phrased in a more meaningful way.
In a client-server environment, server failure is catastrophic because if the server fails, all clients are shut down. Given that design feature, why do some highly critical information, inventory, financial, and medical systems implement client-server architecture as opposed to peer-to-peer?
Please note I am NOT asking "How do I mitigate the risk server failure?" I AM asking "Is peer-to-peer architecture an effective way to mitigate the risk of server failure?" Why or why not? Does the topology of the network influence the design of the application? Does peer-to-peer introduce the possibility of data corruption or ambiguous results?
Is the following a realistic example of what might occur in a peer-to-peer network topology?
DeviceA, DeviceB, and DeviceC are computers on a peer network that share a common agent called agent R. Whenever a peer needs to check how much R is available, it synchronizes with other peers and calculates the availability. One day at about 1pm, the lab technician inserts a bottle of R into DeviceB. DeviceB immediately syncs with DeviceC and confirms that DeviceC has never consumed R from that bottle. DeviceA, however, has not been responding to pings since noon. Can DeviceB reliably calculate the quantity of R available in the bottle?
I am a software engineer and I will be writing the application that allows these devices to share data over a network. Honestly, I have an opinion about the question I am asking however my client does not trust my experience. I want to know the experience of my peers, hence my post here. I do not want to put words in anyone's mouth so I am trying not to be as general as possible and still explain the issue.