In my project I want to store some data in fast storage, but some data is too large to be stored in RAM. Can I store some data in memtx and some in vinyl?
Asked
Active
Viewed 103 times
1 Answers
1
Tarantool works just fine with memtx
and vinyl
spaces under one process. So you just create a space, specify engine type (memtx|vinyl
) and you are good to go. See documentation for more info.
box.cfg{}
box.schema.create_space('memtx_test', {engine = 'memtx'})
box.schema.create_space('vinyl_test', {engine = 'vinyl'})
However, there may be complex scenarios. For example, you may want to expire your memtx
(hot/fast) data into vinyl
(cold/slow) storage and you want to do it atomically. Tarantool doesn't yet support cross-engine transactions so you won't be able to delete a tuple from memtx
space and insert it into vinyl
space in one transaction. For such use case you may need to build some workaround like maintaining a third space (memtx
) for temporary data.

RunFor
- 555
- 3
- 12