Search Postgresql Archives

Re: Improve MMO Game Performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/13/2012 07:52 PM, Arvind Singh wrote:
we are all aware of the popular trend of MMO games. where players face
each other live.

    My area of concern, is storage of player moves and game results.
    Using Csharp and PostgreSql
    The game client is browser based ASP.NET and calls Csharp functions
    for all database related processing


To understand my query, please consider the following scenario
/we store game progress in a postgres table./

I suspect that this design will scale quite poorly. As others have noted it should work OK right now if tuned correctly. If you expect this to get bigger, though, consider splitting it up a bit.

What I'd want to do is:

- Store data that must remain persistent in the main PostgreSQL DB;
  things like the outcomes of games that have ended, overall scores,
  etc.

- Use memcached or a similar system to cache any data that doesn't
  have to be perfectly up-to-date and/or doesn't change much, like
  rankings or player names;

- Use LISTEN / NOTIFY to do cache invalidation of memcached data
  if necessary; and

- Store transient data in `UNLOGGED` tables with `async_commit` enabled,
  a long `commit_delay`, etc. Possibly on a different DB server. You'll
  certainly want to use different transactions to separate your
  important data where durability matters from your transient data.

  I'd run two different Pg clusters with separate table storage and WAL,
  so the transient-data one could run with the quickest-and-dirtiest
  settings possible.


I might not even store the transient data in Pg at all, I might well use a system that offers much weaker consistency, atomicicty and integrity guarantees.

--
Craig Ringer


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux