Data mining --- While Playing?

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Data mining --- While Playing?

Postby Zengenn » Mon Jun 08, 2009 7:39 pm

I have searched the forums looking for information regarding this subject, and I have been unable to locate anything which would adequately answer this question. If this information does exist someplace within the forums I do apologize simply point me in the right direction...

Preface:
I am currently using Idle Miner along with PT3 (trial version soon to be full version). As I understand it is not possible to use Idle Miner at the same time as playing Fulltilt, as Idle Miner will attempt to shut the gaming window that you're using down. And in case you're wondering why I would be running Idle Miner at the same time as I am playing it is because of idle miners ability to monitor the number of players at the table and open a new table anytime the current table drops below a settable threshold.

Problem:
So my thought process is to have Idle Miner + Fulltilt running on a separate computer which is accessible via network to my main computer which is running PT3 while I am playing on Fulltilt. The main computer would file share the directory which PT3 uses to pull the hand data from Fulltilt so that it would be accessible to the computer which is running Idle Miner+Fulltilt. So this brings me to several questions:

1. Will PT3 get hand data from more than one file located within the directory?
2. And should Idle Miner happen open the same table which I am playing at would this create duplicate hand data and thereby wind up with corrupted data??

Thank you in advance for any response.
Zengenn
Zengenn
 
Posts: 3
Joined: Mon Jun 01, 2009 7:52 pm

Re: Data mining --- While Playing?

Postby kraada » Mon Jun 08, 2009 7:56 pm

(1) Yes, that's how PT3 reads when you're playing at (or observing) multiple tables.

(2) I'm not certain, but regardless you should not have two computers importing to the same database at the same time. That can cause database corruption. What you should do is have each copy of PT3 import to a different database, then have your HUD read from all databases on the machine. You will have duplicate data on your opponents this way (as when you have the same hand in multiple databases it does count double), but if you have enough hands on your opponents it shouldn't cause a whole lot of skew. Especially if you're datamining heavily.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Data mining --- While Playing?

Postby Zengenn » Tue Jun 09, 2009 9:42 pm

kraada wrote:(1) Yes, that's how PT3 reads when you're playing at (or observing) multiple tables.

(2) I'm not certain, but regardless you should not have two computers importing to the same database at the same time. That can cause database corruption. What you should do is have each copy of PT3 import to a different database, then have your HUD read from all databases on the machine. You will have duplicate data on your opponents this way (as when you have the same hand in multiple databases it does count double), but if you have enough hands on your opponents it shouldn't cause a whole lot of skew. Especially if you're datamining heavily.



Kraada thanks for the quick response.

Just one item further, I wasn't considering running 2x PT3's on 2x computers. The idea was to allow one computer for data mining (without PT3 running). And to use the another computer running PT3 and as the game/data processing machine.

Machine #1 running Idle Miner + Fulltilt ----------->>> network >>>>>>>>>> Machine #2 PT3 + Fulltilt
NO DATABASE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>DATABASE
NO STORAGE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>TEXT FILES DROP INTO "FILES PROCESS AREA" BY IDLE MINER
NO PROCESSING OF HANDS SENDS THE HAND DATA HERE>>>> >>>>>>>PT3 PROCESSES TEXT FILES FROM BOTH MACHINE #1 AND #2 INTO DATABASE

Perhaps I'm off base here but doesn't PT3 do some sort of validation of the hand data before storing it in the database? By chance does it check for duplicate hand id numbers (the number given by Fulltilt to each hand)? If not then I understand why, the dup hand could enter the database....otherwise would seem to be a simple matter of updating the data where hand_id doesn't exist. But perhaps I'm missing something.

As a separate note:
Also I'm a bit confused as to why running multi PT3 into one database would cause database corruption, as the postgresql.org website likes to point out postgreSQL has been multi-user for a while now.

Thanks for any insight.
Zengenn
Zengenn
 
Posts: 3
Joined: Mon Jun 01, 2009 7:52 pm

Re: Data mining --- While Playing?

Postby kraada » Wed Jun 10, 2009 8:47 am

Running it in that way you shouldn't have any problem, though obviously things will be slowed down a bit by the extra processing that PT3 has to do.

I believe the issue with corruption occurs as a result of the way we increment on insert.

Imagine your database has X total players in the database, and you have two instances of PT3 running: A and B. Both are going to add a hand with a new player. If they attempt to add the data at the same time both new players will have id_player X+1 - which obviously is quite bad.

There may be other reasons as well that I'm not aware of. However, since PT3 can read from multiple databases for HUD usage, it's much easier to simply have two databases on the same server. That way there is no chance for corruption. (Incidentally even with your current setup you can set the auto import to import observed hands to a different database and I'd recommend you do that - keeping your played database smaller will make queries you run on it much quicker.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Data mining --- While Playing?

Postby Zengenn » Wed Jun 10, 2009 10:28 pm

Kraada,

Thanks! I'll give it a try

Zengenn
Zengenn
 
Posts: 3
Joined: Mon Jun 01, 2009 7:52 pm


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 41 guests

cron