Open ryanwinchester opened 6 months ago
Share ideas on how to replace the ETS table.
We have an ETS table that has timestamps as the key, and updates a counter.
defp update_counter(timestamp, seed) do :ets.update_counter(__MODULE__, timestamp, 1, {timestamp, seed}) end
Once it hits the 18-bit threshold we then increment the millisecond timestamp key to avoid rollover.
timestamp
We also delete old keys on a recurring interval.
Current idea I want to explore is to use a NIF.
Share ideas on how to replace the ETS table.
Requirements:
Arguments:
Current implementation:
We have an ETS table that has timestamps as the key, and updates a counter.
Once it hits the 18-bit threshold we then increment the millisecond
timestamp
key to avoid rollover.We also delete old keys on a recurring interval.