Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In Elixir/Erlang thats quite common I think, at least I do this for when performance matters. Put the specific subset of commonly used data into a ETS table (= in memory cache, allowing concurrent reads) and have a GenServer (who owns that table) listen to certain database change events to update the data in the table as needed.

Helps a lot with high read situations and takes considerable load off the database with probably 1 hour of coding effort if you know what you're doing.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: