Fix market data replay

This commit is contained in:
Eric Harding committed 2017-09-07 16:38:30 -04:00
1 parent 4c7cbf80b9
commit eb671ea2f9
5 files changed
+34 -1

No files matched your search

+1
View File
@@ -69,6 +69,7 @@ set (Sparkd_Sources
# md/platforms/mdp3_onixs/MDP3Main.cpp
# md/platforms/mdp3_onixs/MDP3Utils.cpp
# md/platforms/mdp3_onixs/tests/mdp3_tests.cpp
md/run_md.cpp
)
+27
View File
@@ -0,0 +1,27 @@
#include "run_md.h"
#include "lib/md/relay/RelayRecorder.h"
#include "lib/utils/bts_assert.h"
#include "lib/config/config.h"
#include "lib/config/protos/MarketData.pb.h"
#include <iostream>
#include <thread>
using namespace bts;
using namespace md;
void run_relay() {
auto naggle_ms = config::get<md::RelayOptions>().naggle_ms();
auto file = "http://mdreplay/c2/futures.coconut";
replay_recording(file, naggle_ms);
}
std::thread* _md_thread;
void run_market_datapublishers() {
bts_assert(_md_thread == nullptr);
// start a thread for the md
_md_thread = new std::thread([]() {
// just relay for now. More coming soon
run_relay();
});
}
+3
View File
@@ -0,0 +1,3 @@
#pragma once
void run_market_datapublishers();
@@ -10,6 +10,7 @@
#include "server/sparkd/persistence/PersistenceServiceServer.h"
#include "server/sparkd/user/UserServiceServer.h"
#include "server/sparkd/algo_man/AlgoManServiceServer.h"
#include "server/sparkd/md/run_md.h"
#include "lib/md/relay/QueryServer.h"
namespace bts {
@@ -32,6 +33,7 @@ struct ServiceHostActor::PImpl
algo_man_server (service_context)
{
run_market_datapublishers();
}
qbus::Quickbus quickbus;
api::ServiceContext service_context;
+1 -1
View File
@@ -31,6 +31,6 @@
<RemoteTarget>1134075360;localhost (username=, port=22, authentication=Password)</RemoteTarget>
</PropertyGroup>
<PropertyGroup>
<ShowAllFiles>false</ShowAllFiles>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>