Jeremy Smith said:
>
> A typical auction lasts around
> 90 minutes, and consists of a whole lot of furious refreshing of the
> auction board by the participants since each player only has a 2
> minute clock.

You might wish to look into using a different mechanism for this so
you can push the latest bids to the user instead of depending on their
refresh. Java applets can do this, and Flash Shared Objects make this
very easy. They have the obvious drawbacks (accessibility, plugins,
etc.), but when used properly they can significantly reduce the server
load and bandwidth consumption.


> Since there is so much clicking going on, and my php code and mysql
> calls (including the transactions that decide which new player
> should be nominated to the board) obviously happen with each user
> click, is there any way to hide the guts of the work so that when
> they click refresh all they are doing is viewing the state of the
> respective tables at that time.

Have transactions update summary tables (HEAP?) and query those
summary tables.


> In other words, I don't need 4
> people simultaneously calling the functions that decide which player
> should be nominated next, awarded the player that was won to the
> necessary roster, deducting money, etc.  With four people calling
> the function at once, I am forced to lock up the rows and rollback 3
> of the transactions.  Is there any way to have them all call the
> same function that only gets executed once?

There are ways, but they are generally implemented in the middelware,
not the database. The best you can do in the database is use the
summary tables to detect and abort conflicting transactions as early
as possible.

Also, please read
http://www.catb.org/~esr/faqs/smart-questions.html#id2912983

Jochem





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to