educative.io

Educative

Hashing the FileID

Hashing scheme here suggests that one could Hash the FileID to determine the shard for storing the file/metadata. However, generally it is the Shard that generates the ID. How do we suggest generating the FileID? Would we use something similar to Key Generation Service, as used in TinyURL or PasteBin? That may not be appropriate since the FileID does not necessarily need to be 64 bit encoded? I suppose we could create a table for auto-incrementing FileIDs though we would need to content with overflow and also with sync/latency. Other recommendations?

Dear Abhishek,
Your query has been logged. We’ll get back to you shortly.

I had the same question, too bad it’s not been address since 2018 (writing this in Apr 2020)