dwyl / hits-elixir

:chart_with_upwards_trend: An Elixir implementation of the "Hits" project (a super-basic "Web Page View Counter")
http://hits.dwyl.io
GNU General Public License v2.0
31 stars 1 forks source link

Cache SVG Template and Count for Endpoint using GenServer #3

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

https://robots.thoughtbot.com/make-phoenix-even-faster-with-a-genserver-backed-key-value-store

leordev commented 6 years ago

Can I also have this one?

nelsonic commented 6 years ago

@leordev we first need to "benchmark" the Filesystem version of the script, but yeah, would be good to attempt to use GenServer. 👍

note: we still need to save the data to disk after the Http response to ensure that data is safe if server crashes. 💾

leordev commented 6 years ago

About the save part, I'd do it in an async fashion after I already give the count response to the user...

I did not understand about the filesystem script benchmark though... Can you please elaborate it a lil bit?