API and HTML Examples

For discussion of the Poker Mavens server module and other administration topics
Post Reply
lp69
Posts: 9
Joined: Sat Sep 20, 2008 2:49 am

Re: API and HTML Examples

Post 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.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post 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.
lp69
Posts: 9
Joined: Sat Sep 20, 2008 2:49 am

Re: API and HTML Examples

Post 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...
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post 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.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post 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
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post by Alex »

How about one where you can save tournament results to a mysql database?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post 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.
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post 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.
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post 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.
Alex
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Post by Alex »

Command=TournamentsResults&Date=2009-03-12&Name=Tournament #02

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