Skip to content

Commit

Permalink
Add RedisCacheDatabase buffered pipelining
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Dec 4, 2023
1 parent 01b45bb commit e80193d
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 91 deletions.
6 changes: 4 additions & 2 deletions examples/live/binance_spot_market_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from nautilus_trader.adapters.binance.config import BinanceExecClientConfig
from nautilus_trader.adapters.binance.factories import BinanceLiveDataClientFactory
from nautilus_trader.adapters.binance.factories import BinanceLiveExecClientFactory
from nautilus_trader.config import CacheDatabaseConfig
from nautilus_trader.config import InstrumentProviderConfig
from nautilus_trader.config import LiveExecEngineConfig
from nautilus_trader.config import LoggingConfig
Expand All @@ -45,7 +44,10 @@
reconciliation=True,
reconciliation_lookback_mins=1440,
),
cache_database=CacheDatabaseConfig(type="redis"),
# cache_database=CacheDatabaseConfig(
# type="redis",
# buffer_interval_ms=100,
# ),
# message_bus=MessageBusConfig(
# database=DatabaseConfig(),
# encoding="json",
Expand Down
2 changes: 1 addition & 1 deletion nautilus_core/infrastructure/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub trait CacheDatabase {
fn insert(&mut self, key: String, payload: Option<Vec<Vec<u8>>>) -> Result<()>;
fn update(&mut self, key: String, payload: Option<Vec<Vec<u8>>>) -> Result<()>;
fn delete(&mut self, key: String, payload: Option<Vec<Vec<u8>>>) -> Result<()>;
fn handle_ops(
fn handle_messages(
rx: Receiver<DatabaseCommand>,
trader_key: String,
config: HashMap<String, Value>,
Expand Down
Loading

0 comments on commit e80193d

Please sign in to comment.