Hi Marc, Tianrun had one implementation of the TCP Server interface when he was working on the GRAIL related stuff. The idea is to subclass the LineReader interface. This minimizes the changes needed inside QuickstepCli.cpp. The code might help and is available here:
https://bitbucket.org/TianrunLi/tcpreader/src Best, Jianqiao 2017-03-30 10:10 GMT-05:00 Marc Spehlmann <sp...@apache.org>: > Hi dev, > I'm looking to make a simple TCP server interface to Quickstep so that we > can keep the db running while we communicate to it from a python program. > After investigating, I think the simplest way to do this is: > > - create a Server executable which: > - opens a TCP socket > - forks a child with an open pipe > - std input of the child process is redirected from the pipe > - child process launches the main() code of QuickstepCli and goes on as > normal > - Server process channels messages from the TCP buffer to the pipe > - Server exits when child exits > > Since I'd like to reuse the code in main() of quickstep_cli, I think this > means abstracting that code into a stand alone library. > > Does anyone have any initial comments on this design? > > --Marc >