A question about in-memory DataStore and hard-disk DataStore [closed]

asked 2016-12-13 18:16:25 -0700

vinllen gravatar image

After following documents in the wiki, I'm still confusing of the relationship between in-memory DataStore and hard-disk DataStore(Snapshot+journay, is it called DistributedDataStore?).

For example, a data store writing operation will write the given data into the in-memory DataStore, but I've no idea whether this transaction return immediately when successfully write into the in-memory DataStore or return until merge into the hard-disk DataStore.

As I know, in-memory is just a cache that contains nodes with type NormalizedNode. But the "hard-disk" DataStore use AKKA and RAFT to store serialization data into the hard disk which can persist data.

When I checking the source code of data writing transaction, I found the BI serializes data which means write data into the hard disk. In my point of view, it may cost some time to write data into hard-disk. Why not accept the mechanism of writing data into memory and using another process/thread to synchronous data between memory and disk.

And, Is data reading transaction read data from cache or hard-disk ?

Please point me out if I have any misunderstanding of DataStore in MD-SAL. Many thanks for any advice.

Best Regards,

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by vinllen
close date 2016-12-13 18:40:33