[ts-gen] setting up mysql and editing data.c and once.c in shim/src directory

Justin justins at ftml.net
Sun Jan 11 23:52:00 EST 2009


Thank you Russ

I completely skipped the paragraph at the top explaining the use of the
info 
pre 2007 and post 2007. I've kept the database the same for now. Logged
into my 
mysql as root, changed to the "mysql" database, created the user shim
with no 
password, granted all privileges on testing and gave shim at localhost
super and 
create temporary tables. 

mysql> SHOW GRANTS FOR 'shim'@'localhost';
+---------------------------------------------------------------------------------------------------------------------+
| Grants for shim at localhost                                             
                                                                     |
+---------------------------------------------------------------------------------------------------------------------+
| GRANT SUPER, CREATE TEMPORARY TABLES ON *.* TO 'shim'@'localhost' WITH
GRANT OPTION | 
| GRANT ALL PRIVILEGES ON `testing`.* TO 'shim'@'localhost'             
                                            |  
+---------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

I haven't changed a thing in .shimrc

DbmsName        mysql
DbmsHost        localhost
TableSet        testing
UserName        shim
Password        0
FeedName        tws
FeedHost        localhost
FeedPort        7496
HqPeriod        11
ClientId         8       
Upstream        paper       
LogFiles        log
PollTime        2

I started my demo TWS "Enabled ActiveX and Socket Clients" and added the
localhost
ip 127.0.0.1 to the trusted IP addresses.  

When I try and test shim with "shim --data" I get:

Problem: 512 mySQL isolation level must be serial
Exiting

I thought I had all the pieces of the puzzle in place, I must have
missed something 
along the way. Of the top of my head, quick question for you,  once this
program works
smoothly could it access a stripped down version of the TWS, one that
would run as a
demon in the background, removing the GUI altogether?

Justin 



On Sun, 11 Jan 2009 17:16:27 -0500 (EST), "R P Herrold"
<herrold at owlriver.com> said:
> On Sat, 10 Jan 2009, Justin wrote:
> 
> >
> > I've run into a bit of a problem with understanding how I'm to add the
> > lines below in
> > the two files mentions.
> 
> 
> The example cited was related to doing edits to set up 
> userid's and such for using the database, with other than 
> 'stock' values, and written using a February 2007 version of 
> the sources as an example.  In the last two years, we have 
> come VERY FAR past that need, and I need to revisit that pate; 
> I'll take a look when in the office Monday.
> 
> > I did some looking around at some examples of code from C++ 
> > and Ruby and it seems to me to be C++ code. What I need to 
> > know is how to properly introduce the lines below,
> 
> The good news is that you no longer need to do those source 
> code edits, and can simply drop the variable / value pair into 
> the .shimrc There is a sample in any recent tarball; the 
> release from Friday looks like this:
> 
> 
> [herrold at centos-5 shim-090109]$ cat .shimrc
> DbmsName        mysql
> DbmsHost        localhost
> TableSet        testing
> UserName        shim
> Password        0
> FeedName        tws
> FeedHost        localhost
> FeedPort        7496
> HqPeriod        11
> ClientId         8
> Upstream        paper
> LogFiles        log
> PollTime        2
> [herrold at centos-5 shim-090109]$
> 
> The first four entries are simple to edit.  My working copy 
> (which connects on host: xeon.first.lan to a database: 
> rph_testing  under userid: rph_shim  with NO password), looks 
> like this:
> 
> 
> [herrold at centos-5 ~]$ cat .shimrc
> DbmsHost        xeon.first.lan
> UserName        rph_shim
> TableSet        rph_testing
>     ...
> 
> Note that these are not order sensitive.
> 
> 
> The .shimrc file was added, after Bill and I discovered that I 
> was 'stepping on' his working dataset, with a failed source 
> code patch for like the third time.  (additionally I moved my 
> MySQL server and dataset to another computer -- it can be 
> really difficult to debug a side effect which neither person 
> is looking for)
> 
> >  but honestly I don't see how to do this without spending 
> > hours maybe days learning basic C++ code, that is to say if 
> > I'm right about it being C++ code.
> 
> outlined above, and no source edits needed.
> 
> Part of the benefit of coming to the project now is that we 
> are three years in, and so as others had to do this, we 
> responded to their confusion with the .shimrc file mechanism. 
> We have one fairly minor set of additions to that file, and to 
> the initiialization process left on our roadmap before we will 
> move the project from a 'beta' to a 'production stable' status 
> [there are some other milestones in the code as well, which we 
> need as well].  The changes will be largely invisible to an 
> external user, and any recent writeup of the .shimrc in teh 
> mailing list archive will be substantailly complete.
> 
> Welcome, by the way.
> 
> For the wider audience, we are largely complete with the 
> development cutover to the Debian 'lenny' (and once security 
> updates are underway well in 'testing', back to 'testing'). 
> A final member computer to run Debian 'lenny' in the distcc 
> buildfarm which Bill uses to speed incremental testing and 
> development arrived yesterday, and I will slot it in Monday.
> 
> Additionally Friday's release builds and runs cleanly on the 
> following platforms in production:
> 
> Debian 'testing' 32 bit (i386)
> Debian 'lenny' 64 bit   (amd64)
> OS/X 10.4 PPC           (32 bit)
> CentOS 5 32 bit         (i686)
> CentOS 5 64 bit         (x86_64 multilib)
> RHEL 4 64 bit           (s390 multilib)
> 
> I will speak with the IBM 'chiphopper' team, to get access to 
> Power 5 (64 bit) RHEL turned on for verification of function; 
> I anticipate no surprises or problems there at all.
> 
> The remaining possible platform (Windows 2000 and later with 
> Cygwin 1.7) has a build problem with the MySQL libraries at 
> the moment, and so we do not have function there at the 
> moment.
> 
> -- Russ herrold
> _______________________________________________
> ts-general mailing list
> ts-general at trading-shim.org
> http://www.trading-shim.org/mailman/listinfo/ts-general
-- 
  Justin
  justins at ftml.net

-- 
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again



More information about the ts-general mailing list