Database / Mnesia intermediate to advanced Interview questions
When would you use a local_content table instead of a normal replicated table?
Reach for local_content specifically when the data is conceptually per-node rather than
shared — each node's copy is meant to hold genuinely different information, not a synchronized replica of
the same logical dataset. A normal replicated table is the wrong fit here since it's designed around every copy
converging on identical content.
mnesia:create_table(node_health, [{ram_copies, [node()]}, {local_content, true}, {attributes, [check, status, checked_at]}]).
Typical examples: recording each node's own health-check results, keeping a node-local request cache that
doesn't need to match other nodes' caches, or logging events specific to that node's own activity. If you find
yourself wanting the exact same data visible identically from every node, that's the signal you actually want
a normal replicated table, not local_content.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
