Author Topic: Question About Reading Tournament Data  (Read 4384 times)

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Question About Reading Tournament Data
« on: February 07, 2011, 08:19:51 PM »
I play in a league in portland that uses TD in their establishment. We're talking several hundred players with 6 tournaments + per day.

I'm a c# programmer, and want to create a windows service that will read current data from tournaments AS THEY ARE RUNNING and push this data to the web. (How many players are in, prize pools, etc.) I'd have a timer run and update it like every minute or 3 or so and then push this info to a web service that could publish it to a web site....

Any suggestions?

jodybingo

  • Hero Member
  • *****
  • Posts: 656
    • View Profile
    • Personal Web Site
Re: Question About Reading Tournament Data
« Reply #1 on: February 07, 2011, 10:08:47 PM »
One suggestion...let me know when you've accomplished this. My club would be interested.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Question About Reading Tournament Data
« Reply #2 on: February 08, 2011, 10:31:53 AM »
You'd have to (a) set the program to auto-save the tournament at a pretty high frequency and (b) be able to read and parse the saved tournament file.  Currently, there's no other way to do it.

The best thing I could do to help is to have the software write out a simple status file at specific time intervals.  It would be extremely sparse, with just a few bits of data, so as to take a minimal amount of time.  Something like:

state:inprogress
clock:running
time:13:27
level:Round 2
time:10:25:39
buyins:27
addons:0
rebuys:3
players:14
busted:13
pot:783.22


An external program could read this to get the current tournament information.  This wouldn't be too hard, so I'll consider adding it before 2.6 finally goes out if this would help.

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #3 on: February 08, 2011, 11:05:37 AM »
Yeah corey, if you dumped this data to an 'inprogress.xml' file, or something that was a 'known' place to get this data, that would be really cool. My windows service, or application could then push this XML file to a web service that would publish the data in a small 'live' box on the web site. Would be cool to see how many people were playing, etc. Where can this data be found in the td.db file? Love your software.

John

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #4 on: February 08, 2011, 11:06:35 AM »
Jody bingo,

We could talk about what would be involved in doing this for your club if you're interested.

John

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Question About Reading Tournament Data
« Reply #5 on: February 08, 2011, 03:40:11 PM »
Where can this data be found in the td.db file?

Not sure which data you're referring to, since we're talking about a possible future feature.  But the only things in the td.db file currently are player information for players in your database (ID and name information), league information, and season information.  All tournament data is stored in tournament files.

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #6 on: February 08, 2011, 04:35:26 PM »
Sorry,

If I wanted to read this data now, for existing running tourneys, is that available somewhere?

Would love the feature, don't get me wrong. :)

jodybingo

  • Hero Member
  • *****
  • Posts: 656
    • View Profile
    • Personal Web Site
Re: Question About Reading Tournament Data
« Reply #7 on: February 09, 2011, 09:25:28 PM »
I just spoke to the powers that be here and they are interested in this. They will be streaming live video on our web site soon (our final tables with pocket cams too) and would like this as well. And maybe add the prizes too along with total pot.
Jody Stacey
jodybingo@hotmail.com
www.playgroundpoker.ca

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Question About Reading Tournament Data
« Reply #8 on: February 11, 2011, 12:10:39 PM »
Sorry,

If I wanted to read this data now, for existing running tourneys, is that available somewhere?

Would love the feature, don't get me wrong. :)

Not easily.  You can try to decipher it from the saved tournament file, but it won't be easy - especially since the data you're trying to use isn't actually saved - it's computed.  Thus, you'd have to read the saved tournament file, parse/interpret it, find the stuff you are interested in, then compute it from that.  I would rate it as very difficult.

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #9 on: February 11, 2011, 05:52:03 PM »
Then I vote for a feature. hahahahaa

Cool, thanks for the info. I guess if you offer it as a feature, I could do it for the people that want it here. But I don't think they'll pay too much if it's too complex.

thank you Corey.

J

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Question About Reading Tournament Data
« Reply #10 on: February 15, 2011, 02:07:09 PM »
Another interesting thought is to have the same feature be able to post the information to a web service.  Once the data is put together, the software could just as easily fire off an XMLHttpRequest (aka, AJAX) as write the information to a file.

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #11 on: February 23, 2011, 02:22:13 PM »
Agreed. :)

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #12 on: February 23, 2011, 02:24:02 PM »
It would just need to do it like every minute or two, or a timed option.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: Question About Reading Tournament Data
« Reply #13 on: February 24, 2011, 10:19:21 AM »
That's on the to-do list now.  It will be an option to write the data to a file and/or fire off a GET or POST request to a configurable URL, and the frequency.  No specific release planned, but I'll try to get it into the final 2.6.

johnbatdorf

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Question About Reading Tournament Data
« Reply #14 on: February 26, 2011, 10:10:13 PM »
Awesome. Thanks!