[ts-gen] scripts to collect data into mysql database - 1 of 2

R P Herrold herrold at owlriver.com
Fri Dec 28 16:23:47 EST 2007


The yahoo list had a couple of posts from me today, responding 
to a person wanting a shim under Windows.  I had answered the 
question a couple of weeks ago on that list, but it does not 
have a well searchible and open archive, so I repost a couple 
pieces here, to get permanent links.

-- Russ Herrold

---------- Forwarded message ----------
Date: Fri, 28 Dec 2007 12:38:33 -0500 (EST)
From: orcwcbe at owlriver.com
To: TWSAPI at yahoogroups.com
Subject: scripts to collect data into mysql database

On Fri, 28 Dec 2007, buglefrank wrote:

> I appreciate ur response. the trading shim is looking like 
> all powerful thing that i am looking for. however it does 
> not have the compiled executable or i am not reading it 
> properly. can u guide me to a compiled executable or tell me 
> how to make one on xp. thanks

I do not know that it is immediately doable, but wrote a memo 
about this a couple weeks back as to the steps I would take to 
do so if so inclined.

My notes indicate it crossed this list: Mon, 17 Dec 2007 14:42:43 -0500 (EST)

---------------- extract from that email -------------------

All true as to the trading-shim being developed on a POSIX 
complaint system; it is in theory technically possible to run 
it in a VMware or other virtual PC inside the proprietary 
Windows environment, I suppose (but have not yet tested -- it 
is on my 'someday list').

I was reading a HowTO as to building a new Wireshark plugin 
after the thread about protocol dissection last week, and had 
bookmarked the Wireshark description of how to set up a build 
environment for Wireshark under Windows, at:
    http://www.wireshark.org/docs/wsdg_html_chunked/PartDevelopment.html

and noticed that they also described (at another part of that 
write up), setting up the build environment they use under 
Windows at sections 2.2 and 4 of:
    http://www.wireshark.org/docs/wsdg_html_chunked/index.html


As Wireshark is doing more complex work than the shim 
(sniffing and reassembling packets) rather than a simple read 
using Berkeley select (and writes to UDP sockets (the logd), 
std err and std out), it seemed likely to me that I could use 
the Wireshark appraoch on Windows compile environment as a 
base to work forward from, add the MySQL library headers, and 
see if the shim could indeed build and run indeed Windows.  I 
_do_ have a Cygwin environment on my aged Windows 2000 box 
here at the office (the latest Microsoft OS version I have, 
used to view Webex presentations [after IB's ill considered 
switch, imho ;) ]), so, if things got slow, knew where I would 
start to so proceed.

I _have_ connected from *nix to that Windows 2000 box, running 
a TWS, over sockets with no incident and full functionality -- 
the chart in section 6.1.1 of the Manual
     http://www.trading-shim.org/doc/node76.html

was produced from queries on it as well.  MySQL AB ships a 
Windows MySQL server as well, so drilling that in should be 
straightforward; the database initialization scripts should be 
ale to similarly work across a socket connection to the 
database backend [getting perl DBI like database abstraction 
should be straightforward to drill into the shim either: 1) if 
and when a paying client wants it; or 2) a member of the 
development community indicates an interest in doing that 
sub-task.  ;) ]

------------------------------ extract ends ---------------

buglefrank, and others

-- I would be delighted for someone to follow the wireshark 
outline as a guide, to join the (free) trading-shim mailing 
list as a venue in which to describe shim specific to describe 
issues and to give a try to documenting issues encountered (if 
any) [and to get load off the Yahoo list], and hopefully to 
celebrate successes doing a Windows environment setup and 
build.

I will 'follow along' and replicate it; I am reasonably sure 
that (assuming the code needs at most minimal 'tweaks' to 
build under the Cygwin environment described by the Wireshark 
folks), that it would take perhaps a week's work to complete 
this process.

-- Russ Herrold


More information about the ts-general mailing list