What is In-Memory Computing (In-Memory DB/IMDG)?
In-memory DB and IMDG, told as a story about an express desk that skips the trip to the deep shelf.
The packer has to walk all the way to the deep shelf.The driver keeps waiting the whole time.
The same popular item, fetched from deep storage every time.Couldn't frequently-needed items stay close by?
An in-memory DB is an express desk that skips the deep shelf.Data is kept in memory, so pickup is far faster than from disk.
In-memory DB/IMDG is used for caching, fast lookups, and pooling memory.Logs or snapshots are kept so data can be restored after a power loss.
Memory costs more than disk, so moving all the data into memory is hard.So often only frequently-used data gets loaded into memory — that's a cache.
In-memory DB/IMDG keeps data right in memory instead of making the trip to the deep shelf (disk), so it can be fetched far faster than from disk.
An in-memory DB keeps data resident in RAM instead of disk, greatly cutting disk I/O latency. An IMDG (In-Memory Data Grid) pools memory across multiple nodes into a large distributed in-memory store. Volatility is its weak point, so write-ahead logging, snapshots, and replication back up its durability.
When grown-ups say it
- In-Memory Database
- A warehouse that keeps data right in memory. Almost no disk I/O latency on reads.
- In-Memory Data Grid
- A warehouse pooling memory across many machines. Scales together with sharding. → the warehouse split into zones
- Cache
- Keeping only the frequently-needed items close by. Holds only a portion of the data in memory.
- Volatility
- The trait of vanishing when power is lost. Lost data is recovered via log or snapshot.
- Durability
- The promise that once stamped, it stays. Some in-memory DBs trade off this promise for speed. → the four promises a receipt keeps
- NoSQL Modeling
- A warehouse reshaping shelves to fit the box. Some products, like Redis, are both key-value and in-memory. → the free-shelf warehouse
- Caching (SRE field)
- The caching story from the SRE field. The distributed-systems view of caching is covered there. → caching
- Concurrency Control
- Rules that stop simultaneous edits from colliding. Still needed even when everything lives in memory. → the no-collision rule