[ts-gen] multiple shims, client id's
Bill Pippin
pippin at owlriver.net
Wed Aug 12 17:50:00 EDT 2009
Back in June, Paul notes:
> It appears that the shim no longer tries incrementing the client
> id ... [when] another shim is running ...
> ... data mode it gets stuck at 1; in risk mode it uses whatever
> is in the .shimrc, but again will not increment if that value is
> already taken. ...
Belated thanks, Paul, for this report. The problem has now been
fixed. I'd put off dealing with the issue until now since fairly
substantial refactoring in open.c was needed, and I wanted to work
on other features first.
This bug has been mentioned a number of times on the list since Paul
reported it, so others will probably be interested in the fix as well.
E.g., from a post by Ken:
> I wonder if there should only be one instance of the Shim running,
> ... is there a way ... run one instance for pulling down prices,
> and one for wiring orders ...
Nils suggested the best possible work-around available at that time,
of using two sessions, one each in --data and --risk mode (thanks
Nils!). That limitation no longer applies; users can now run multiple
sessions in both data and risk modes up to the IB tws limit of eight
concurrent sessions.
>From the NEWS:
> Fix the handshake logic to retry on client id collisions,
> so that it is again possible for multiple data mode shim
> sessions to share the same account and IB tws gui session,
> and similarly, so that it is more convenient to have multiple
> concurrent risk mode sessions. This restores a feature
> that was disabled as part of preliminary work on versioning
> earlier this year, and fixes a bug reported by PaulC ...
Anyway, the solution involved splitting the VersionTable object into
VersionTuple and VersionTable objects, where the client id, and client,
server, and protocol api indices make up the VersionTuple, and the
various version-specific event rules remain in VersionTable as before.
For those who are interested, most of the changes were to open.c and
version.h, and a comparison between those files from a couple of weeks
ago and now will show the reader what changes were involved.
Thanks,
Bill
More information about the ts-general
mailing list