Open Side Menu Go to the Top
Register
XML Standard Format for HH XML Standard Format for HH

12-01-2008 , 08:48 AM
I'm genuinely curious about why you are considering this. I'm not a pro programmer, so i'm probably missing some obvious stuff. I'll work with xml or any other file format and curse them both equally.

Yes, you're missing something obvious...

As a major poker site why is being easy to parse back and strong validation considered a higher technical priority than network traffic size? I imagine a major cost of any site is bandwidth - doubling or tripling data transmission size and processing time[1] sounds incorrect from a technical or business standpoint.

Non sequitur... What makes you think that saving an XML file shall increase network traffic? If the poker client is correctly designed then it already has all the information it needs to persist the hand once the hand is over. Saving a poker hand from a correctly designed client should be purely a client-side facility and should cost exactly zero bytes of bandwith.

Now if some site offers players to "request last 30 days hands" (which is usually not an instant service) and should bandwith be an issue (which is not clear at all), this can be served from another system, not competing with the bandwith of the main server(s).

Seen that one of the point of using XML is to validate complete hands using <hand>...</hand> I hardly see the sites using XML to transmit partial hands while the hand is being played so your question makes little sense.

As for the slowness of the XML parsers, I hardly see a player's PC being unable to persist about one hand every minute in XML... Even if he's playing 24 tables.

The OP said that the format was to represent "single hand" and, maybe, multiple hands. He never said the format was to represent partial hands.
XML Standard Format for HH Quote
12-01-2008 , 10:10 AM
Quote:
Originally Posted by advis0r
this is plain wrong, XML has a well defined document order. only the order of attributes of an element isnt important.
This isn't strictly true. Specification of XML 1.0 states specifically than attributes are unordered, but doesn't mention that elements are specifically ordered. Although almost universally document order is assumed to be correct order by parsers, they aren't constrained to.

http://www.ibm.com/developerworks/xm.../x-eleord.html

I generally think your structure is sound, I would make a few changes personally:

- Use cents/pennies rather than decimal values
- Use seat number as the "ID" to reference players in actions
- Use self-closing tags

It's significantly better than the ipoker format and hte popopop.

For comparison, this is popopop output - the only thing i like about this is the use of seat number to define the actions:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<Session popopopVersion="1_5">
  <SpecificData DataName="Date" DataValue="29.11.08 - 23:08"/>
  <SpecificData DataName="parser_version" DataValue="2.0"/>
  <SpecificData DataName="TableConfig" DataValue="9"/>
  <SpecificData DataName="Poker Room" DataValue="Poker Star"/>
  <SpecificData DataName="Type de Session" DataValue="Ring Game"/>
  <Round highlight="0">
    <SpecificData DataName="Small Blind" DataValue="0.1"/>
    <SpecificData DataName="Boutton" DataValue="5"/>
    <SpecificData DataName="roundDate" DataValue="29.11.08 - 23:08"/>
    <SpecificData DataName="Type de Limit" DataValue="Limit"/>
    <SpecificData DataName="Table" DataValue="ohio ii"/>
    <SpecificData DataName="Jeu n°" DataValue="22486310580"/>
    <SpecificData DataName="Big Blind" DataValue="0.25"/>
    <SpecificData DataName="Type de Jeu" DataValue="Omaha Hi/Low"/>
    <SpecificData DataName="Round Corrompu" DataValue="Non"/>
    <Seat seatNumber="1">
      <Player initialChips="2.50" playerName="yum-yum-yum"/>
    </Seat>
    <Seat seatNumber="2">
      <Player initialChips="8.95" playerName="GammonU"/>
    </Seat>
    <Seat seatNumber="3">
      <Player initialChips="33.15" playerName="mahlonaa"/>
    </Seat>
    <Seat seatNumber="4">
      <Player initialChips="12.15" playerName="RBEX"/>
    </Seat>
    <Seat seatNumber="5">
      <Player initialChips="0.45" playerName="wimpy27"/>
    </Seat>
    <Seat seatNumber="6">
      <Player initialChips="10.85" playerName="minnrm9"/>
    </Seat>
    <Seat seatNumber="7">
      <Player initialChips="12.75" playerName="stubaby"/>
    </Seat>
    <Seat seatNumber="8">
      <Player initialChips="18.65" playerName="nutOmatic">
        <holeCard>8d</holeCard>
        <holeCard>Ah</holeCard>
        <holeCard>3s</holeCard>
        <holeCard>2d</holeCard>
      </Player>
    </Seat>
    <Seat seatNumber="9">
      <Player initialChips="5.95" playerName="juicebones"/>
    </Seat>
    <Action seatNumber="6" actionID="7" firstValue="0.10"/>
    <Action seatNumber="7" actionID="8" firstValue="0.25"/>
    <Action seatNumber="8" actionID="10">
      <boardCard>8d</boardCard>
      <boardCard>Ah</boardCard>
      <boardCard>3s</boardCard>
      <boardCard>2d</boardCard>
    </Action>
    <Action seatNumber="8" actionID="3" firstValue="0.25"/>
    <Action seatNumber="9" actionID="3" firstValue="0.25"/>
    <Action seatNumber="1" actionID="4"/>
    <Action seatNumber="2" actionID="4"/>
    <Action seatNumber="3" actionID="3" firstValue="0.25"/>
    <Action seatNumber="4" actionID="4"/>
    <Action seatNumber="5" actionID="15"/>
    <Action seatNumber="6" actionID="3" firstValue="0.35"/>
    <Action seatNumber="7" actionID="3" firstValue="0.20"/>
    <Action seatNumber="8" actionID="3" firstValue="0.20"/>
    <Action seatNumber="9" actionID="3" firstValue="0.20"/>
    <Action seatNumber="3" actionID="3" firstValue="0.20"/>
    <Action seatNumber="0" actionID="11">
      <boardCard>6c</boardCard>
      <boardCard>7d</boardCard>
      <boardCard>Ac</boardCard>
      <comment>Flop###_###</comment>
    </Action>
    <Action seatNumber="6" actionID="0"/>
    <Action seatNumber="7" actionID="0"/>
    <Action seatNumber="8" actionID="1" firstValue="0.25"/>
    <Action seatNumber="9" actionID="3" firstValue="0.25"/>
    <Action seatNumber="3" actionID="3" firstValue="0.25"/>
    <Action seatNumber="6" actionID="3" firstValue="0.25"/>
    <Action seatNumber="7" actionID="3" firstValue="0.25"/>
    <Action seatNumber="0" actionID="11">
      <boardCard>9h</boardCard>
      <comment>Turn###_###</comment>
    </Action>
    <Action seatNumber="6" actionID="0"/>
    <Action seatNumber="7" actionID="0"/>
    <Action seatNumber="8" actionID="1" firstValue="0.50"/>
    <Action seatNumber="9" actionID="4"/>
    <Action seatNumber="3" actionID="3" firstValue="0.50"/>
    <Action seatNumber="6" actionID="4"/>
    <Action seatNumber="7" actionID="3" firstValue="0.50"/>
    <Action seatNumber="0" actionID="11">
      <boardCard>7c</boardCard>
      <comment>River###_###</comment>
    </Action>
    <Action seatNumber="7" actionID="0"/>
    <Action seatNumber="8" actionID="1" firstValue="0.50"/>
    <Action seatNumber="3" actionID="4"/>
    <Action seatNumber="7" actionID="3" firstValue="0.50"/>
    <Action seatNumber="8" actionID="6">
      <boardCard>8d</boardCard>
      <boardCard>Ah</boardCard>
      <boardCard>3s</boardCard>
      <boardCard>2d</boardCard>
    </Action>
    <Action seatNumber="7" actionID="6">
      <boardCard>Qc</boardCard>
      <boardCard>5c</boardCard>
      <boardCard>7s</boardCard>
      <boardCard>Jd</boardCard>
    </Action>
    <Action seatNumber="5" actionID="5">
      <boardCard>4d</boardCard>
      <boardCard>Qh</boardCard>
      <boardCard>2c</boardCard>
      <boardCard>Qd</boardCard>
    </Action>
    <Comment xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  </Round>
</Session>
XML Standard Format for HH Quote
12-01-2008 , 11:25 AM
Quote:
Originally Posted by tim73
Compared to video streaming or even first-person net multiplayer game sites, the traffic costs must be quite minimal. At max few tens of kilobytes per 30-40 seconds per player. 100 video streamers would be equivalent of 20 000 players constantly hitting the raise button
There have been posts on 2+2 from poker site representatives that indicate that at least some of the sites are pretty sensitive to bandwidth usage. I think some of this has to do with where the servers are located--bandwidth can be relatively expensive in the boondocks.
XML Standard Format for HH Quote
12-01-2008 , 11:54 AM
I don't think it is a good idea to decide to modify one of the proprietary formats unless we have the cooperation of the poker site/whoever. A few reasons:
  1. We don't have their full spec/schema.
  2. They might not like it and start bothering us about copyrights, reverse engineering, violation of their TOS, or whatever. This might be low probability, and low risk, but why bother.
  3. It is better to learn from the existing formats and start with a clean sheet of paper.
Unless somebody has a radical/revolutionary idea a new xml format is going to look something like the existing ones anyway. I see things I like and don't like in all of these xml files (including mine).

If André wants to lead this he should get a group of interested parties on irc (or whatever) to lay out requirements and an overall framework. Then the rest of this will fall together fairly easily with the usual arguments about how to respresent cards and whatever. This project has a chance of actually accomplishing something if Party (or another significant site) wants to participate. If it is just a few 3rd party developers, then I don't think our format would be used or noticed, no matter how good it is.
XML Standard Format for HH Quote
12-01-2008 , 11:57 AM
Quote:
Originally Posted by Eratosthenes
There have been posts on 2+2 from poker site representatives that indicate that at least some of the sites are pretty sensitive to bandwidth usage. I think some of this has to do with where the servers are located--bandwidth can be relatively expensive in the boondocks.
The XML-file will be written by the poker client. So it doens't matter in which format the HH files are.

So, using XML files will not increase needed bandwith, only HH file sizes are bigger.
XML Standard Format for HH Quote
12-01-2008 , 12:04 PM
Quote:
Originally Posted by contravariance
Non sequitur... What makes you think that saving an XML file shall increase network traffic? If the poker client is correctly designed then it already has all the information it needs to persist the hand once the hand is over. Saving a poker hand from a correctly designed client should be purely a client-side facility and should cost exactly zero bytes of bandwith.
XML being useful to transmit formatted data over networks, i assumed on of the benefits would be as a comms format between server and client and have the document format do validation - hence the increase in bandwidth and my comment about doing real work like displaying the data on a clients screen.

Quote:
Originally Posted by contravariance
The OP said that the format was to represent "single hand" and, maybe, multiple hands. He never said the format was to represent partial hands.
Fair enough. I had assumed the biggest benefit would be comms which would require partial hands, as most poker clients dont really do a lot with the hh once written.

OP says For an internal project, we need a XML HH format. This format may also end up being the new format on the PartyPoker client - I dont think this invalidates my assumption that they would use it in the comms stream.
XML Standard Format for HH Quote
12-12-2008 , 12:30 PM
Quote:
Originally Posted by Eratosthenes
That schema validates OK. By that I mean validates in an xml sense.
I was imprecise. I want the format such that validation implies high likelihood that the data represents a valid poker hand.

André
XML Standard Format for HH Quote
12-12-2008 , 12:34 PM
Quote:
Originally Posted by Tikru
The XML-file will be written by the poker client. So it doens't matter in which format the HH files are.

So, using XML files will not increase needed bandwith, only HH file sizes are bigger.
Correct. In fact, file size may end up being smaller, if some of the "English" is taken out. For cases where it really matters (large collection of hand histories, game servers, etc.) you can put in a DB based on the XML format.
(or compress the text files)
XML Standard Format for HH Quote
12-12-2008 , 12:38 PM
[QUOTE=Eratosthenes;7378307]
Quote:
Originally Posted by tim73
Also I would make it so that each game contains general section (=table/tournament details) and the game itself so that each hand would be independent. Something like this:

<game id="123495900435"> in the poker_site element
<general>
<type>TOURNAMENT/CASH/SIT_GO/...</type> tournament element not in this hh
<tablename>My little table</tablename> in the poker_site element
<currency>USD/EUR</currency> in the poker_site element
<small_blind>20</small_blind>in the stakes element
<big_blind>40</big_blind>in the stakes element
<tournamentname></tournamentname>tournament element not in this hh
<tournament id="1239120">tournament element not in this hh
</general>
I really don't know here.

If you only stick one hand history per file, it doesn't really matter - and sites would store hands one by one.
It's later, if one wants to do some processing. Does it help to have the "header" stuff outside, so that you can create a larger XML file of multiple hands without repeating the same header stuff (where appropriate?)


PS: Looks like I messed up my notifier
XML Standard Format for HH Quote
12-12-2008 , 01:08 PM
Quote:
Originally Posted by PartyPoker Rep 2

I really don't know here.

If you only stick one hand history per file, it doesn't really matter - and sites would store hands one by one.
It's later, if one wants to do some processing. Does it help to have the "header" stuff outside, so that you can create a larger XML file of multiple hands without repeating the same header stuff (where appropriate?)


PS: Looks like I messed up my notifier
That quote looks like I was suggesting that some of the HH info be extracted out of the HH xml and put in a header that would apply to multiple hands in a file. I didn't look back at my post, but I'm sure I didn't suggest that because I think it would be a really bad idea. Each HH xml needs to have everything about that hand. People will be pasting these things into converters, mailing them to their mates, etc.
XML Standard Format for HH Quote
12-12-2008 , 02:03 PM
I'm backing up Eratosthenes. Even if a lot of information is redundant from hand to hand, it's still better as each hand is "stand-alone".
XML Standard Format for HH Quote
12-15-2008 , 06:20 PM
Quote:
Originally Posted by Eratosthenes
That quote looks like I was suggesting that some of the HH info be extracted out of the HH xml and put in a header that would apply to multiple hands in a file. I didn't look back at my post, but I'm sure I didn't suggest that because I think it would be a really bad idea. Each HH xml needs to have everything about that hand. People will be pasting these things into converters, mailing them to their mates, etc.
Let me try again. Maybe it is a bad idea, but I want to make sure it was understood first

I think it is important if you later want to store in the hands in a DB for example.

I'm thinking of something along the lines of

<pokerxml>
<table table_stuff>
<holdem hand >
hand stuff
</holdem hand>
</table>
</pokerxml>

as opposed to
<pokerxml>
<holdem hand >
<table table_stuff>
</table>
hand stuff
</holdem hand>
</pokerxml>

The first one, if you want to combine hands together, say in a DB, would be a lot more efficient.

In fact, I don't see any drawbacks to the first one, but I may be particularly obtuse.

André
XML Standard Format for HH Quote
12-15-2008 , 09:39 PM
Quote:
Originally Posted by PartyPoker Rep 2
Let me try again. Maybe it is a bad idea, but I want to make sure it was understood first

I think it is important if you later want to store in the hands in a DB for example.

I'm thinking of something along the lines of

<pokerxml>
<table table_stuff>
<holdem hand >
hand stuff
</holdem hand>
</table>
</pokerxml>

as opposed to
<pokerxml>
<holdem hand >
<table table_stuff>
</table>
hand stuff
</holdem hand>
</pokerxml>

The first one, if you want to combine hands together, say in a DB, would be a lot more efficient.

In fact, I don't see any drawbacks to the first one, but I may be particularly obtuse.

André
OK, I'm an engineer and one of the smart things that engineers do is ask this question: What is the scope? In other words, what are we trying to produce.
  • If we are trying to produce an xml schema for a collection of related hand histories, then pulling all of the common stuff in to a header is fine. If you look at books on xml, one of their favorite examples is the purchase order, because it has header info and line item info. This would be similar to that example.
  • OTOH, if we are trying to produce an xml schema for a hand history, then it should be a complete and self-contained description of a hand history.
If you don't have a written scope for this project, now would be a good time to write one.

I don't think there is much efficiency to be gained to factoring out the common info, because there isn't that much compared to the whole HH: table name (but not for tournaments), max seats, poker room, tournament no., game (but not for mixed games), stakes (but not for tournaments). What you give up for that flexibility is the ability to treat individual HHs without the rest of the collection.
XML Standard Format for HH Quote
12-16-2008 , 06:05 PM
Quote:
Originally Posted by Eratosthenes
OK, I'm an engineer and one of the smart things that engineers do is ask this question: What is the scope? In other words, what are we trying to produce.
Format is for a single hand history.

But to me, both cases as mentioned earlier fit the bill. I see advantages to one, but I don't see advantages to the other.

André
XML Standard Format for HH Quote

      
m