Page 2 of 7

Re: API and HTML Examples

Posted: Wed Mar 04, 2009 4:50 am
by lp69
With today's servers, you don't need multiple servers, unless you have at least 5-10000 simultaneous connected users.
But you need a database, and efficient code in PM server.
Our own game platform currently handles 3000 simultaneous users with only 20% CPU usage.

Re: API and HTML Examples

Posted: Wed Mar 04, 2009 10:38 am
by Kent Briggs
lp69 wrote:With today's servers, you don't need multiple servers, unless you have at least 5-10000 simultaneous connected users.
But you need a database, and efficient code in PM server.
Our own game platform currently handles 3000 simultaneous users with only 20% CPU usage.
The CPU usage is less of a concern with Poker Mavens. It's not just raw connections, but the number of threads handling those connections (which consumes lots of RAM) and the bandwidth (which is game specific) that is required that puts a strain on the server.

Re: API and HTML Examples

Posted: Mon Mar 09, 2009 9:53 am
by lp69
What about this cheap alternative to database implementation: use API web calls.
Usually where there is a database, there is a web server.
So, for example, instead of reading the player account file on disk, PM calls http://www.mysite.com/getplayerdata.asp ... me=johndoe
And my web server would be responsible to return information in the format expected by PM.

Another example:
http://www.mysite.com/balancechange.asp ... lance=1500
-> and my web server would write in my database the new balance of this player

etc...

Re: API and HTML Examples

Posted: Mon Mar 09, 2009 11:50 am
by Kent Briggs
lp69 wrote:What about this cheap alternative to database implementation: use API web calls.
Usually where there is a database, there is a web server.
So, for example, instead of reading the player account file on disk, PM calls http://www.mysite.com/getplayerdata.asp ... me=johndoe
And my web server would be responsible to return information in the format expected by PM.
I would likely never rely on an external system to hold the master database for the poker system. That's for a variety of reasons including performance, security, and technical support issues. Most of my customers want a turnkey system, not a reliance on third-party software. Plus every time I made an internal change to a data field, everyone else would have to go restructure their own database and modified all their code around it. Then the tech support requests come flooding in.

Now on the other hand, I do have plans to add "push" features to the API that the admin can set to trigger on specific events. For example, every time a player joins a table, the server can issue an HTTP call to a selected site with the applicable GET/POST parameters. From there, you can do what you want with that information, including keeping your own database in sync with the master database controlled by the poker server. I may also implement a persistent socket connection for the API on a separate port that could be used for live two-way communication with the poker server.

Re: API and HTML Examples

Posted: Mon Mar 09, 2009 9:39 pm
by Kent Briggs
Kent Briggs wrote:Just added to the API page is this PHP routine that allows anyone to search if a player is logged in and gives a list of the tables where they are currently seated:
I've just updated the PHP player search routine so that it works exactly like the one built into the client and now shows the waiting lists that the player is in, also.

http://www.briggsoft.com/docs/pmavens/A ... yer_search

Re: API and HTML Examples

Posted: Wed Mar 11, 2009 7:17 pm
by Alex
How about one where you can save tournament results to a mysql database?

Re: API and HTML Examples

Posted: Wed Mar 11, 2009 8:43 pm
by Kent Briggs
Alex wrote:How about one where you can save tournament results to a mysql database?
Use the TournamentsResults API for that. You'll have to parse the output to get it in the format you need for your own database.

Re: API and HTML Examples

Posted: Thu Mar 12, 2009 7:54 pm
by Alex
The TournamentsResults command shows me this:

Result=Ok
Files=3
Date1=2009-03-12
Name1=Tournament #01
Date2=2009-03-12
Name2=Tournament #04
Date3=2009-03-12
Name3=Tournament #06

if I add a parameter like date or name it gives me the same result...thoughts? I want to see the actual winners, etc.

Re: API and HTML Examples

Posted: Thu Mar 12, 2009 8:05 pm
by Kent Briggs
Alex wrote:if I add a parameter like date or name it gives me the same result...thoughts? I want to see the actual winners, etc.
You have to include both Date and Name, not just one of them. Otherwise it just lists the files available.

Re: API and HTML Examples

Posted: Thu Mar 12, 2009 8:30 pm
by Alex
Command=TournamentsResults&Date=2009-03-12&Name=Tournament #02

sorry for bugging you...but what's wrong with these parameters?