You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm thinking this could be as simple as the following:
Provide a "tag" that updates when any prefix updates.
Get a list of 5-letter prefixes that changed
From a backend perspective, you could avoid expensively iterating all 2^20 entries on every single request when the function's hot by doing something like this:
For the "tag", return a monotonically increasing counter, incremented by at least 1 on change. The important thing is that older tags come before newer tags.
For the data, it could just live in a prefix -> tag table, along with a record for "current tag". This current tag, along with the whole table, could be cached and stored in an array sorted by tag (and optionally then by prefix).
If Azure Functions only allows function instances to process one request at a time, the sorted array can be generated on ingest and just read by the querying function. (I don't know if Azure Functions works this way, but I know AWS Lambda does.)
Results returned would just be a matter of finding the first prefix in the array with a given tag >= the one provided, and returning every prefix from that one on.
The text was updated successfully, but these errors were encountered:
I'm thinking this could be as simple as the following:
From a backend perspective, you could avoid expensively iterating all 2^20 entries on every single request when the function's hot by doing something like this:
The text was updated successfully, but these errors were encountered: