I have data that is stored on a local machine and periodically replicated using webservices. This data is critical to the application of this program and is along the lines of business transactions.
TransactionHeader JOIN TransactionDetail
So forth.
Should I be using some type of CRC checking when sending the data to the webservice or is this handled by the TCP protocol itself sufficiently?
EDIT: Just to be clear the data isnt deleted from the client until the server acknowledges receipt and I use strongly typed parameters in my webservice but I am more thinking about “mangled” data (although in all cases but string it should theoretically fail datatype casting).
normally tcp does a fine job of transferring data intact but if that data is business critical then you shouldn’t leave checking that data up to tcp and should use a good hash function
at the tcp level everything is reduced to byte strings so if you transfered a number if that number was changed in transit due to an error and just happened to still be an number to the other side it would mean that datatype casting wouldn’t catch that
if the main problem your dealing with is transfer checking then crc32 or such would work fine but if those hashes are used to verify the data after it’s been received and stored a much better hash like sha1 or such should be used