Make multiple strategies share orderbook cache #1565
-
I'm recently started to play with nautilus and it works well in efficiency and reliability. I have scenario which multiple (30+) different strategies make decision on same data source (e.g. orderbooks of all tickers) based on different algorithm. Since caching such large data set is very space/time consuming, I'm wondering if we have some way to make them share these original data across strategies? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @VeraLyu The current setup is that there is a single cache per running trader instance (process). So all of your strategies will share this cache, including an order book per instrument, and all of the execution state. If you're taking this one level of abstraction higher, and considering many trader nodes sharing a single Redis instance/cluster (a valid setup), then yes right now all of the keys are separated per trader - so some data is duplicated (instruments, currencies), although this is a small amount relatively and avoids logical issues of many writers and readers to the Redis cache. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hi @VeraLyu
The current setup is that there is a single cache per running trader instance (process). So all of your strategies will share this cache, including an order book per instrument, and all of the execution state.
If you're taking this one level of abstraction higher, and considering many trader nodes sharing a single Redis instance/cluster (a valid setup), then yes right now all of the keys are separated per trader - so some data is duplicated (instruments, currencies), although this is a small amount relatively and avoids logical issues of many writers and readers to the Redis cache.
Hope that helps!