The Distributed Counter is a great extension for firebase for integers, such as for likes, followers, shares etc. I am wondering if you could use the same architecture to generally process writes in all different data types at a high frequency.
In my case, I would like to append the user id to a list each time the user "downloads" a document.
How could I use the Distributed Counter extension to do this, while ensuring that this procedure can happen at a very high frequency and not reach the limitations of firestore writes?
You can't use the counter extension for maintaining a different type of data, but you could indeed take the same approach of writing data to multiple shards to increase the throughput.
A few things to keep in mind when implementing this:
array-union
operator. If that's not possible, you may need to use a transaction, but that will have lower throughput (so may need more shards).