Page 5 of 5 FirstFirst ... 345
Results 61 to 63 of 63

Thread: Is it me or this code has no chance ?

  1. #61
    Post Fiend
    Join Date
    Feb 2009
    Posts
    234
    Quote Originally Posted by TommyB View Post
    "Delphi records serialized into text files" > "DBMS" ?

    if the old utopia could update 30k provs without stopping the game for 2-5 minutes every tick, something must be wrong with database or how it is accessed. the nice and clean seperation of code offered by using a framework like django is useless if the data access is slow. :(

    maybe its time to dig out the old code and have another good look at how the problem of updating provs was solved.
    One way to "solve" this issue is to simply update provinces in advance through out the tick (spread the load so to speak). Then for every interaction with a province that would change its state to the point where the prior calculation would render faulty the province would be flagged for updating and the server would iterate though the flagged provinces while there are any.

    Not the best way of doing it, but compared to a tick-spike even if more resources are consumed total the requirements of the server are less due to resources being spread evenly over the hour.

    This way everything is pre-calculated and the transition becomes as simple as shifting records or perhaps preferably reading data from a different table (one for even ticks, one for odd, switching back and forth keeping the one 'not in use' as buffer), someone more into DBMS should be able to clear that out).

  2. #62
    Post Fiend
    Join Date
    Feb 2009
    Posts
    234
    Time for Pizza. If S&B sees this and has any questions or matters theyd like to discuss dont hesitate to contact me. I got a full department of computer scientists and information scientists in arms reach that is always up for a challenge.

  3. #63
    Member
    Join Date
    Nov 2009
    Posts
    14
    But why not maintain two models. One you update on a completely independent thread and the other model being the one used by the game engine. The game engine leaves game state changes in a queue and the updating model incorporates the changes. At specified intervals, the model is propagated.

    This would give you the ability of something closer to a continuous model and also the ability to spread out the load.

    I think the design clearly requires a primary model which running as a separate process and a secondary model used by the game engine.

    I also wonder if the transactional costs are hurting them. If everything is sitting in MySQL, you are going to have a monster of a time constantly updating that while also retrieving data for every page load or op. For instance, in many GIS applications, the transactions are cached. Future queries are anticipated and loaded ahead of time during times of lower CPU usage.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •