yfractal / blog

10 stars 0 forks source link

WIP Interesting In Memory Cache Techs #11

Open yfractal opened 1 year ago

yfractal commented 1 year ago

Where Can We Place the Cache?

General Design

Screen Shot 2022-10-11 at 09 18 04

General design, Application needs handle cache fill and cache miss logical and DB may expire/fill cache in some system[1].

Cache in DB

Screen Shot 2022-10-11 at 09 20 44

We can let DB handle the cache logic. for example Noria[2], it's a DBMS and can handle cache relate things through data flow in eventual consistency. Some benchmarks[3]:

Screen Shot 2022-10-11 at 09 26 22 Screen Shot 2022-10-11 at 09 27 51

Cache in App Server

Screen Shot 2022-10-11 at 09 33 30

Put cache in app servers for avoiding (un)marshalling and network hops[4]. Such as Erlang ETS, Mnesia and [5].

References

  1. Rajesh Nishtala. Scaling Memcache at Facebook, nsdi, 2013
  2. Jon Gjengset, Partial State in Dataflow-Based Materialized Views, PhD dissertation, 2021
  3. Jon Gjengset, PhD dissertation presentation Slides, 2021 https://jon.thesquareplanet.com/slides/thesis.pdf
  4. Atul Adya, Robert Grandl, Daniel Myers, and Henry Qin. Fast Key-Value Stores: And Idea Whose Time Has Come and Gone. In HotOS. 2019.
  5. D Zhuo, K Zhang, Z Li, S Zhuang, S Wang, A Chen, Rearchitecting In-Memory Object Stores for Low Latency, PVLDB, 2021