API and HTML Examples

For discussion of the Poker Mavens server module and other administration topics

Re: API and HTML Examples

Postby lp69 » Wed Mar 04, 2009 4:50 am

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

Re: API and HTML Examples

Postby Kent Briggs » Wed Mar 04, 2009 10:38 am

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby lp69 » Mon Mar 09, 2009 9:53 am

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

Re: API and HTML Examples

Postby Kent Briggs » Mon Mar 09, 2009 11:50 am

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 - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby Kent Briggs » Mon Mar 09, 2009 9:39 pm

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/API_Examples.htm#player_search
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby Alex » Wed Mar 11, 2009 7:17 pm

How about one where you can save tournament results to a mysql database?
Alex
 
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

Re: API and HTML Examples

Postby Kent Briggs » Wed Mar 11, 2009 8:43 pm

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby Alex » Thu Mar 12, 2009 7:54 pm

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

Re: API and HTML Examples

Postby Kent Briggs » Thu Mar 12, 2009 8:05 pm

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3831
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby Alex » Thu Mar 12, 2009 8:30 pm

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

sorry for bugging you...but what's wrong with these parameters?
Alex
 
Posts: 53
Joined: Sun Mar 08, 2009 10:08 pm

PreviousNext

Return to Site Administration

Who is online

Users browsing this forum: No registered users and 5 guests

cron