sociomantic-tsunami / dhtproto

Distributed Hash Table protocol definition, client, fake node, and tests
Boost Software License 1.0
5 stars 22 forks source link

Update request: enhance with auto-Put behaviour #211

Open gavin-norman-sociomantic opened 5 years ago

gavin-norman-sociomantic commented 5 years ago

Currently, if an Update request reports that a record is not present in the DHT, the request ends. The application is expected to do a Put request to add the record.

This is a source of conflicts, however, as two clients could be trying to update the same record at the same time, and one could overwrite the other's Put.

The Update request should be enhanced to also handle the case of a missing record, allowing the application to specify the initial value to write to the DHT.