Re: Improve MMO Game Performance
От | Craig Ringer |
---|---|
Тема | Re: Improve MMO Game Performance |
Дата | |
Msg-id | 507A1C13.1020008@ringerc.id.au обсуждение исходный текст |
Ответ на | Improve MMO Game Performance (Arvind Singh <arvindps@hotmail.com>) |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: